diff --git a/samples/AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml b/samples/AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml
index be4834c07fa..6bd963417bf 100644
--- a/samples/AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml
+++ b/samples/AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml
@@ -2,78 +2,102 @@
-
-This sample shows how to call DetectUnivariateEntireSeriesAsync with required parameters.
+
+This sample shows how to call DetectUnivariateEntireSeriesAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new UnivariateDetectionOptions(new TimeSeriesPoint[]
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- new TimeSeriesPoint(3.14f)
+ new TimeSeriesPoint(123.45F)
+});
+Response response = await client.DetectUnivariateEntireSeriesAsync(options);
+]]>
+This sample shows how to call DetectUnivariateEntireSeriesAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
+ new TimeSeriesPoint(123.45F)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
})
{
Granularity = TimeGranularity.Yearly,
CustomInterval = 1234,
Period = 1234,
- MaxAnomalyRatio = 3.14f,
+ MaxAnomalyRatio = 123.45F,
Sensitivity = 1234,
ImputeMode = ImputeMode.Auto,
- ImputeFixedValue = 3.14f,
+ ImputeFixedValue = 123.45F,
};
-var result = await client.DetectUnivariateEntireSeriesAsync(options);
-]]>
-
+Response response = await client.DetectUnivariateEntireSeriesAsync(options);
+]]>
-
-This sample shows how to call DetectUnivariateEntireSeries with required parameters.
+
+This sample shows how to call DetectUnivariateEntireSeries.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new UnivariateDetectionOptions(new TimeSeriesPoint[]
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- new TimeSeriesPoint(3.14f)
+ new TimeSeriesPoint(123.45F)
+});
+Response response = client.DetectUnivariateEntireSeries(options);
+]]>
+This sample shows how to call DetectUnivariateEntireSeries with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
+ new TimeSeriesPoint(123.45F)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
})
{
Granularity = TimeGranularity.Yearly,
CustomInterval = 1234,
Period = 1234,
- MaxAnomalyRatio = 3.14f,
+ MaxAnomalyRatio = 123.45F,
Sensitivity = 1234,
ImputeMode = ImputeMode.Auto,
- ImputeFixedValue = 3.14f,
+ ImputeFixedValue = 123.45F,
};
-var result = client.DetectUnivariateEntireSeries(options);
-]]>
-
+Response response = client.DetectUnivariateEntireSeries(options);
+]]>
-
-This sample shows how to call DetectUnivariateEntireSeriesAsync with required request content, and how to parse the result.
+
+This sample shows how to call DetectUnivariateEntireSeriesAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
- value = 123.45f,
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-This sample shows how to call DetectUnivariateEntireSeriesAsync with all request content, and how to parse the result.
+This sample shows how to call DetectUnivariateEntireSeriesAsync with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-
+]]>
-
-This sample shows how to call DetectUnivariateEntireSeries with required request content, and how to parse the result.
+
+This sample shows how to call DetectUnivariateEntireSeries and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
- value = 123.45f,
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-This sample shows how to call DetectUnivariateEntireSeries with all request content, and how to parse the result.
+This sample shows how to call DetectUnivariateEntireSeries with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-
+]]>
-
-This sample shows how to call DetectUnivariateLastPointAsync with required parameters.
+
+This sample shows how to call DetectUnivariateLastPointAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new UnivariateDetectionOptions(new TimeSeriesPoint[]
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- new TimeSeriesPoint(3.14f)
+ new TimeSeriesPoint(123.45F)
+});
+Response response = await client.DetectUnivariateLastPointAsync(options);
+]]>
+This sample shows how to call DetectUnivariateLastPointAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
+ new TimeSeriesPoint(123.45F)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
})
{
Granularity = TimeGranularity.Yearly,
CustomInterval = 1234,
Period = 1234,
- MaxAnomalyRatio = 3.14f,
+ MaxAnomalyRatio = 123.45F,
Sensitivity = 1234,
ImputeMode = ImputeMode.Auto,
- ImputeFixedValue = 3.14f,
+ ImputeFixedValue = 123.45F,
};
-var result = await client.DetectUnivariateLastPointAsync(options);
-]]>
-
+Response response = await client.DetectUnivariateLastPointAsync(options);
+]]>
-
-This sample shows how to call DetectUnivariateLastPoint with required parameters.
+
+This sample shows how to call DetectUnivariateLastPoint.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new UnivariateDetectionOptions(new TimeSeriesPoint[]
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- new TimeSeriesPoint(3.14f)
+ new TimeSeriesPoint(123.45F)
+});
+Response response = client.DetectUnivariateLastPoint(options);
+]]>
+This sample shows how to call DetectUnivariateLastPoint with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
+ new TimeSeriesPoint(123.45F)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
})
{
Granularity = TimeGranularity.Yearly,
CustomInterval = 1234,
Period = 1234,
- MaxAnomalyRatio = 3.14f,
+ MaxAnomalyRatio = 123.45F,
Sensitivity = 1234,
ImputeMode = ImputeMode.Auto,
- ImputeFixedValue = 3.14f,
+ ImputeFixedValue = 123.45F,
};
-var result = client.DetectUnivariateLastPoint(options);
-]]>
-
+Response response = client.DetectUnivariateLastPoint(options);
+]]>
-
-This sample shows how to call DetectUnivariateLastPointAsync with required request content, and how to parse the result.
+
+This sample shows how to call DetectUnivariateLastPointAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
- value = 123.45f,
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-This sample shows how to call DetectUnivariateLastPointAsync with all request content, and how to parse the result.
+This sample shows how to call DetectUnivariateLastPointAsync with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-
+]]>
-
-This sample shows how to call DetectUnivariateLastPoint with required request content, and how to parse the result.
+
+This sample shows how to call DetectUnivariateLastPoint and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
- value = 123.45f,
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-This sample shows how to call DetectUnivariateLastPoint with all request content, and how to parse the result.
+This sample shows how to call DetectUnivariateLastPoint with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-
+]]>
-
-This sample shows how to call DetectUnivariateChangePointAsync with required parameters.
+
+This sample shows how to call DetectUnivariateChangePointAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[]
+UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
{
- new TimeSeriesPoint(3.14f)
+ new TimeSeriesPoint(123.45F)
+}, TimeGranularity.Yearly);
+Response response = await client.DetectUnivariateChangePointAsync(options);
+]]>
+This sample shows how to call DetectUnivariateChangePointAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
+ new TimeSeriesPoint(123.45F)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
}, TimeGranularity.Yearly)
{
CustomInterval = 1234,
Period = 1234,
StableTrendWindow = 1234,
- Threshold = 3.14f,
+ Threshold = 123.45F,
};
-var result = await client.DetectUnivariateChangePointAsync(options);
-]]>
-
+Response response = await client.DetectUnivariateChangePointAsync(options);
+]]>
-
-This sample shows how to call DetectUnivariateChangePoint with required parameters.
+
+This sample shows how to call DetectUnivariateChangePoint.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[]
+UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
{
- new TimeSeriesPoint(3.14f)
+ new TimeSeriesPoint(123.45F)
+}, TimeGranularity.Yearly);
+Response response = client.DetectUnivariateChangePoint(options);
+]]>
+This sample shows how to call DetectUnivariateChangePoint with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
+ new TimeSeriesPoint(123.45F)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
}, TimeGranularity.Yearly)
{
CustomInterval = 1234,
Period = 1234,
StableTrendWindow = 1234,
- Threshold = 3.14f,
+ Threshold = 123.45F,
};
-var result = client.DetectUnivariateChangePoint(options);
-]]>
-
+Response response = client.DetectUnivariateChangePoint(options);
+]]>
-
-This sample shows how to call DetectUnivariateChangePointAsync with required request content, and how to parse the result.
+
+This sample shows how to call DetectUnivariateChangePointAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
- value = 123.45f,
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-This sample shows how to call DetectUnivariateChangePointAsync with all request content, and how to parse the result.
+This sample shows how to call DetectUnivariateChangePointAsync with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-
+]]>
-
-This sample shows how to call DetectUnivariateChangePoint with required request content, and how to parse the result.
+
+This sample shows how to call DetectUnivariateChangePoint and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
- value = 123.45f,
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-This sample shows how to call DetectUnivariateChangePoint with all request content, and how to parse the result.
+This sample shows how to call DetectUnivariateChangePoint with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- series = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ series = new List
-
+]]>
-
-This sample shows how to call GetMultivariateBatchDetectionResultAsync with required parameters.
+
+This sample shows how to call GetMultivariateBatchDetectionResultAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var result = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid());
+Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
]]>
-
+This sample shows how to call GetMultivariateBatchDetectionResultAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
+]]>
-
-This sample shows how to call GetMultivariateBatchDetectionResult with required parameters.
+
+This sample shows how to call GetMultivariateBatchDetectionResult.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var result = client.GetMultivariateBatchDetectionResult(Guid.NewGuid());
+Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
]]>
-
+This sample shows how to call GetMultivariateBatchDetectionResult with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
+]]>
-
-This sample shows how to call GetMultivariateBatchDetectionResultAsync with required parameters and parse the result.
+
+This sample shows how to call GetMultivariateBatchDetectionResultAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid(), new RequestContext());
+Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("resultId").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString());
+Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString());
+]]>
+This sample shows how to call GetMultivariateBatchDetectionResultAsync with all parameters and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -578,18 +693,34 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope
Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString());
-]]>
-
+]]>
-
-This sample shows how to call GetMultivariateBatchDetectionResult with required parameters and parse the result.
+
+This sample shows how to call GetMultivariateBatchDetectionResult and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("resultId").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString());
+Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString());
+]]>
+This sample shows how to call GetMultivariateBatchDetectionResult with all parameters and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-Response response = client.GetMultivariateBatchDetectionResult(Guid.NewGuid(), new RequestContext());
+Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -614,193 +745,217 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope
Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString());
-]]>
-
+]]>
-
-This sample shows how to call TrainMultivariateModelAsync with required parameters.
+
+This sample shows how to call TrainMultivariateModelAsync.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+Response response = await client.TrainMultivariateModelAsync(modelInfo);
+]]>
+This sample shows how to call TrainMultivariateModelAsync with all parameters.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var modelInfo = new ModelInfo("", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow)
+ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"))
{
DataSchema = DataSchema.OneTable,
- DisplayName = "",
+ DisplayName = "",
SlidingWindow = 1234,
AlignPolicy = new AlignPolicy()
-{
+ {
AlignMode = AlignMode.Inner,
FillNAMethod = FillNAMethod.Previous,
- PaddingValue = 3.14f,
+ PaddingValue = 123.45F,
},
Status = ModelStatus.Created,
DiagnosticsInfo = new DiagnosticsInfo()
-{
+ {
ModelState = new ModelState()
-{
- EpochIds =
-{
+ {
+ EpochIds =
+ {
1234
},
- TrainLosses =
-{
- 3.14f
+ TrainLosses =
+ {
+ 123.45F
},
- ValidationLosses =
-{
- 3.14f
+ ValidationLosses =
+ {
+ 123.45F
},
- LatenciesInSeconds =
-{
- 3.14f
+ LatenciesInSeconds =
+ {
+ 123.45F
},
},
- VariableStates =
-{
+ VariableStates =
+ {
new VariableState()
-{
- Variable = "",
- FilledNARatio = 3.14f,
+ {
+ Variable = "",
+ FilledNARatio = 123.45F,
EffectiveCount = 1234,
- FirstTimestamp = DateTimeOffset.UtcNow,
- LastTimestamp = DateTimeOffset.UtcNow,
+ FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
},
},
};
-var result = await client.TrainMultivariateModelAsync(modelInfo);
-]]>
-
+Response response = await client.TrainMultivariateModelAsync(modelInfo);
+]]>
-
-This sample shows how to call TrainMultivariateModel with required parameters.
+
+This sample shows how to call TrainMultivariateModel.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var modelInfo = new ModelInfo("", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow)
+ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+Response response = client.TrainMultivariateModel(modelInfo);
+]]>
+This sample shows how to call TrainMultivariateModel with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"))
{
DataSchema = DataSchema.OneTable,
- DisplayName = "",
+ DisplayName = "",
SlidingWindow = 1234,
AlignPolicy = new AlignPolicy()
-{
+ {
AlignMode = AlignMode.Inner,
FillNAMethod = FillNAMethod.Previous,
- PaddingValue = 3.14f,
+ PaddingValue = 123.45F,
},
Status = ModelStatus.Created,
DiagnosticsInfo = new DiagnosticsInfo()
-{
+ {
ModelState = new ModelState()
-{
- EpochIds =
-{
+ {
+ EpochIds =
+ {
1234
},
- TrainLosses =
-{
- 3.14f
+ TrainLosses =
+ {
+ 123.45F
},
- ValidationLosses =
-{
- 3.14f
+ ValidationLosses =
+ {
+ 123.45F
},
- LatenciesInSeconds =
-{
- 3.14f
+ LatenciesInSeconds =
+ {
+ 123.45F
},
},
- VariableStates =
-{
+ VariableStates =
+ {
new VariableState()
-{
- Variable = "",
- FilledNARatio = 3.14f,
+ {
+ Variable = "",
+ FilledNARatio = 123.45F,
EffectiveCount = 1234,
- FirstTimestamp = DateTimeOffset.UtcNow,
- LastTimestamp = DateTimeOffset.UtcNow,
+ FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
}
},
},
};
-var result = client.TrainMultivariateModel(modelInfo);
-]]>
-
+Response response = client.TrainMultivariateModel(modelInfo);
+]]>
-
-This sample shows how to call TrainMultivariateModelAsync with required request content, and how to parse the result.
+
+This sample shows how to call TrainMultivariateModelAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
+RequestContent content = RequestContent.Create(new
+{
dataSource = "",
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
-};
-
-Response response = await client.TrainMultivariateModelAsync(RequestContent.Create(data));
+});
+Response response = await client.TrainMultivariateModelAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
Console.WriteLine(result.GetProperty("createdTime").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString());
]]>
-This sample shows how to call TrainMultivariateModelAsync with all request content, and how to parse the result.
+This sample shows how to call TrainMultivariateModelAsync with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
+RequestContent content = RequestContent.Create(new
+{
dataSource = "",
dataSchema = "OneTable",
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
displayName = "",
slidingWindow = 1234,
- alignPolicy = new {
+ alignPolicy = new
+ {
alignMode = "Inner",
fillNAMethod = "Previous",
- paddingValue = 123.45f,
+ paddingValue = 123.45F,
},
status = "CREATED",
- diagnosticsInfo = new {
- modelState = new {
- epochIds = new[] {
+ diagnosticsInfo = new
+ {
+ modelState = new
+ {
+ epochIds = new List
-
+]]>
-
-This sample shows how to call TrainMultivariateModel with required request content, and how to parse the result.
+
+This sample shows how to call TrainMultivariateModel and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
+RequestContent content = RequestContent.Create(new
+{
dataSource = "",
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
-};
-
-Response response = client.TrainMultivariateModel(RequestContent.Create(data));
+});
+Response response = client.TrainMultivariateModel(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
Console.WriteLine(result.GetProperty("createdTime").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString());
]]>
-This sample shows how to call TrainMultivariateModel with all request content, and how to parse the result.
+This sample shows how to call TrainMultivariateModel with all request content and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
+RequestContent content = RequestContent.Create(new
+{
dataSource = "",
dataSchema = "OneTable",
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
displayName = "",
slidingWindow = 1234,
- alignPolicy = new {
+ alignPolicy = new
+ {
alignMode = "Inner",
fillNAMethod = "Previous",
- paddingValue = 123.45f,
+ paddingValue = 123.45F,
},
status = "CREATED",
- diagnosticsInfo = new {
- modelState = new {
- epochIds = new[] {
+ diagnosticsInfo = new
+ {
+ modelState = new
+ {
+ epochIds = new List()
+ {
1234
},
- trainLosses = new[] {
- 123.45f
+ trainLosses = new List()
+ {
+ 123.45F
},
- validationLosses = new[] {
- 123.45f
+ validationLosses = new List()
+ {
+ 123.45F
},
- latenciesInSeconds = new[] {
- 123.45f
+ latenciesInSeconds = new List()
+ {
+ 123.45F
},
},
- variableStates = new[] {
- new {
+ variableStates = new List()
+ {
+ new
+ {
variable = "",
- filledNARatio = 123.45f,
+ filledNARatio = 123.45F,
effectiveCount = 1234,
firstTimestamp = "2022-05-10T14:57:31.2311892-04:00",
lastTimestamp = "2022-05-10T14:57:31.2311892-04:00",
}
},
},
-};
-
-Response response = client.TrainMultivariateModel(RequestContent.Create(data));
+});
+Response response = client.TrainMultivariateModel(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -924,68 +1087,110 @@ Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo")
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
-]]>
-
+]]>
-
-This sample shows how to call DeleteMultivariateModelAsync with required parameters.
+
+This sample shows how to call DeleteMultivariateModelAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
Response response = await client.DeleteMultivariateModelAsync("");
Console.WriteLine(response.Status);
]]>
-
+This sample shows how to call DeleteMultivariateModelAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = await client.DeleteMultivariateModelAsync("");
+Console.WriteLine(response.Status);
+]]>
-
-This sample shows how to call DeleteMultivariateModel with required parameters.
+
+This sample shows how to call DeleteMultivariateModel.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
Response response = client.DeleteMultivariateModel("");
Console.WriteLine(response.Status);
]]>
-
+This sample shows how to call DeleteMultivariateModel with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = client.DeleteMultivariateModel("");
+Console.WriteLine(response.Status);
+]]>
-
-This sample shows how to call GetMultivariateModelAsync with required parameters.
+
+This sample shows how to call GetMultivariateModelAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var result = await client.GetMultivariateModelAsync("");
+Response response = await client.GetMultivariateModelAsync("");
]]>
-
+This sample shows how to call GetMultivariateModelAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = await client.GetMultivariateModelAsync("");
+]]>
-
-This sample shows how to call GetMultivariateModel with required parameters.
+
+This sample shows how to call GetMultivariateModel.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var result = client.GetMultivariateModel("");
+Response response = client.GetMultivariateModel("");
]]>
-
+This sample shows how to call GetMultivariateModel with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = client.GetMultivariateModel("");
+]]>
-
-This sample shows how to call GetMultivariateModelAsync with required parameters and parse the result.
+
+This sample shows how to call GetMultivariateModelAsync and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = await client.GetMultivariateModelAsync("", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("modelId").ToString());
+Console.WriteLine(result.GetProperty("createdTime").ToString());
+Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString());
+]]>
+This sample shows how to call GetMultivariateModelAsync with all parameters and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-Response response = await client.GetMultivariateModelAsync("", new RequestContext());
+Response response = await client.GetMultivariateModelAsync("", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -1012,18 +1217,30 @@ Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo")
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
-]]>
-
+]]>
-
-This sample shows how to call GetMultivariateModel with required parameters and parse the result.
+
+This sample shows how to call GetMultivariateModel and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-Response response = client.GetMultivariateModel("", new RequestContext());
+Response response = client.GetMultivariateModel("", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("modelId").ToString());
+Console.WriteLine(result.GetProperty("createdTime").ToString());
+Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString());
+]]>
+This sample shows how to call GetMultivariateModel with all parameters and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+Response response = client.GetMultivariateModel("", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -1050,51 +1267,90 @@ Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo")
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
-]]>
-
+]]>
-
-This sample shows how to call DetectMultivariateBatchAnomalyAsync with required parameters.
+
+This sample shows how to call DetectMultivariateBatchAnomalyAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow);
-var result = await client.DetectMultivariateBatchAnomalyAsync("", options);
+MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+Response response = await client.DetectMultivariateBatchAnomalyAsync("", options);
]]>
-
+This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+Response response = await client.DetectMultivariateBatchAnomalyAsync("", options);
+]]>
-
-This sample shows how to call DetectMultivariateBatchAnomaly with required parameters.
+
+This sample shows how to call DetectMultivariateBatchAnomaly.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow);
-var result = client.DetectMultivariateBatchAnomaly("", options);
+MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+Response response = client.DetectMultivariateBatchAnomaly("", options);
]]>
-
+This sample shows how to call DetectMultivariateBatchAnomaly with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+Response response = client.DetectMultivariateBatchAnomaly("", options);
+]]>
-
-This sample shows how to call DetectMultivariateBatchAnomalyAsync with required parameters and request content and parse the result.
+
+This sample shows how to call DetectMultivariateBatchAnomalyAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
+RequestContent content = RequestContent.Create(new
+{
dataSource = "http://localhost:3000",
topContributorCount = 1234,
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
-};
+});
+Response response = await client.DetectMultivariateBatchAnomalyAsync("", content);
-Response response = await client.DetectMultivariateBatchAnomalyAsync("", RequestContent.Create(data));
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("resultId").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString());
+Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString());
+]]>
+This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters and request content and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+RequestContent content = RequestContent.Create(new
+{
+ dataSource = "http://localhost:3000",
+ topContributorCount = 1234,
+ startTime = "2022-05-10T14:57:31.2311892-04:00",
+ endTime = "2022-05-10T14:57:31.2311892-04:00",
+});
+Response response = await client.DetectMultivariateBatchAnomalyAsync("", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -1119,25 +1375,48 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope
Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString());
-]]>
-
+]]>
-
-This sample shows how to call DetectMultivariateBatchAnomaly with required parameters and request content and parse the result.
+
+This sample shows how to call DetectMultivariateBatchAnomaly and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
+RequestContent content = RequestContent.Create(new
+{
dataSource = "http://localhost:3000",
topContributorCount = 1234,
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
-};
+});
+Response response = client.DetectMultivariateBatchAnomaly("", content);
-Response response = client.DetectMultivariateBatchAnomaly("", RequestContent.Create(data));
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("resultId").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString());
+Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString());
+Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString());
+]]>
+This sample shows how to call DetectMultivariateBatchAnomaly with all parameters and request content and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+RequestContent content = RequestContent.Create(new
+{
+ dataSource = "http://localhost:3000",
+ topContributorCount = 1234,
+ startTime = "2022-05-10T14:57:31.2311892-04:00",
+ endTime = "2022-05-10T14:57:31.2311892-04:00",
+});
+Response response = client.DetectMultivariateBatchAnomaly("", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -1162,77 +1441,144 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope
Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString());
-]]>
-
+]]>
-
-This sample shows how to call DetectMultivariateLastAnomalyAsync with required parameters.
+
+This sample shows how to call DetectMultivariateLastAnomalyAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new MultivariateLastDetectionOptions(new VariableValues[]
+MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List()
{
- new VariableValues("", new string[]
-{
- ""
- }, new float[]
-{
- 3.14f
+ new VariableValues("",new List()
+ {
+ ""
+ },new List()
+ {
+ 123.45F
})
}, 1234);
-var result = await client.DetectMultivariateLastAnomalyAsync("", options);
+Response response = await client.DetectMultivariateLastAnomalyAsync("", options);
]]>
-
+This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List()
+{
+ new VariableValues("",new List()
+ {
+ ""
+ },new List()
+ {
+ 123.45F
+ })
+}, 1234);
+Response response = await client.DetectMultivariateLastAnomalyAsync("", options);
+]]>
-
-This sample shows how to call DetectMultivariateLastAnomaly with required parameters.
+
+This sample shows how to call DetectMultivariateLastAnomaly.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var options = new MultivariateLastDetectionOptions(new VariableValues[]
-{
- new VariableValues("", new string[]
+MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List()
{
- ""
- }, new float[]
-{
- 3.14f
+ new VariableValues("",new List()
+ {
+ ""
+ },new List()
+ {
+ 123.45F
})
}, 1234);
-var result = client.DetectMultivariateLastAnomaly("", options);
+Response response = client.DetectMultivariateLastAnomaly("", options);
]]>
-
+This sample shows how to call DetectMultivariateLastAnomaly with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List()
+{
+ new VariableValues("",new List()
+ {
+ ""
+ },new List()
+ {
+ 123.45F
+ })
+}, 1234);
+Response response = client.DetectMultivariateLastAnomaly("", options);
+]]>
-
-This sample shows how to call DetectMultivariateLastAnomalyAsync with required parameters and request content and parse the result.
+
+This sample shows how to call DetectMultivariateLastAnomalyAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- variables = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ variables = new List()
+ {
+ new
+ {
variable = "",
- timestamps = new[] {
- ""
+ timestamps = new List()
+ {
+ ""
},
- values = new[] {
- 123.45f
+ values = new List()
+ {
+ 123.45F
},
}
},
topContributorCount = 1234,
-};
+});
+Response response = await client.DetectMultivariateLastAnomalyAsync("", content);
-Response response = await client.DetectMultivariateLastAnomalyAsync("", RequestContent.Create(data));
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters and request content and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+RequestContent content = RequestContent.Create(new
+{
+ variables = new List()
+ {
+ new
+ {
+ variable = "",
+ timestamps = new List()
+ {
+ ""
+ },
+ values = new List()
+ {
+ 123.45F
+ },
+ }
+ },
+ topContributorCount = 1234,
+});
+Response response = await client.DetectMultivariateLastAnomalyAsync("", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString());
@@ -1249,33 +1595,66 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope
Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString());
-]]>
-
+]]>
-
-This sample shows how to call DetectMultivariateLastAnomaly with required parameters and request content and parse the result.
+
+This sample shows how to call DetectMultivariateLastAnomaly and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-var data = new {
- variables = new[] {
- new {
+RequestContent content = RequestContent.Create(new
+{
+ variables = new List()
+ {
+ new
+ {
variable = "",
- timestamps = new[] {
- ""
+ timestamps = new List()
+ {
+ ""
},
- values = new[] {
- 123.45f
+ values = new List()
+ {
+ 123.45F
},
}
},
topContributorCount = 1234,
-};
+});
+Response response = client.DetectMultivariateLastAnomaly("", content);
-Response response = client.DetectMultivariateLastAnomaly("", RequestContent.Create(data));
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call DetectMultivariateLastAnomaly with all parameters and request content and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+RequestContent content = RequestContent.Create(new
+{
+ variables = new List()
+ {
+ new
+ {
+ variable = "",
+ timestamps = new List()
+ {
+ ""
+ },
+ values = new List()
+ {
+ 123.45F
+ },
+ }
+ },
+ topContributorCount = 1234,
+});
+Response response = client.DetectMultivariateLastAnomaly("", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString());
@@ -1292,114 +1671,157 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope
Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString());
-]]>
-
+]]>
-
-This sample shows how to call GetMultivariateModelsAsync with required parameters.
+
+This sample shows how to call GetMultivariateModelsAsync.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234))
+await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync())
{
}
]]>
-
+This sample shows how to call GetMultivariateModelsAsync with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync(skip: 1234, maxCount: 1234))
+{
+}
+]]>
-
-This sample shows how to call GetMultivariateModels with required parameters.
+
+This sample shows how to call GetMultivariateModels.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-foreach (var item in client.GetMultivariateModels(1234, 1234))
+foreach (AnomalyDetectionModel item in client.GetMultivariateModels())
{
}
]]>
-
+This sample shows how to call GetMultivariateModels with all parameters.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+foreach (AnomalyDetectionModel item in client.GetMultivariateModels(skip: 1234, maxCount: 1234))
+{
+}
+]]>
-
-This sample shows how to call GetMultivariateModelsAsync with required parameters and parse the result.
+
+This sample shows how to call GetMultivariateModelsAsync and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234, new RequestContext()))
+await foreach (BinaryData item in client.GetMultivariateModelsAsync(null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
- Console.WriteLine(result.GetProperty("modelId").ToString());
- Console.WriteLine(result.GetProperty("createdTime").ToString());
- Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
+ Console.WriteLine(result[0].GetProperty("modelId").ToString());
+ Console.WriteLine(result[0].GetProperty("createdTime").ToString());
+ Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString());
}
]]>
-
+This sample shows how to call GetMultivariateModelsAsync with all parameters and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+await foreach (BinaryData item in client.GetMultivariateModelsAsync(1234, 1234, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result[0].GetProperty("modelId").ToString());
+ Console.WriteLine(result[0].GetProperty("createdTime").ToString());
+ Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSource").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSchema").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("startTime").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("endTime").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("displayName").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("slidingWindow").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("status").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
+}
+]]>
-
-This sample shows how to call GetMultivariateModels with required parameters and parse the result.
+
+This sample shows how to call GetMultivariateModels and parse the result.
");
-var endpoint = new Uri("");
-var client = new AnomalyDetectorClient(endpoint, credential);
+Uri endpoint = new Uri("");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
-foreach (var item in client.GetMultivariateModels(1234, 1234, new RequestContext()))
+foreach (BinaryData item in client.GetMultivariateModels(null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
- Console.WriteLine(result.GetProperty("modelId").ToString());
- Console.WriteLine(result.GetProperty("createdTime").ToString());
- Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
- Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
+ Console.WriteLine(result[0].GetProperty("modelId").ToString());
+ Console.WriteLine(result[0].GetProperty("createdTime").ToString());
+ Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString());
}
]]>
-
+This sample shows how to call GetMultivariateModels with all parameters and parse the result.
+");
+AzureKeyCredential credential = new AzureKeyCredential("");
+AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+foreach (BinaryData item in client.GetMultivariateModels(1234, 1234, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result[0].GetProperty("modelId").ToString());
+ Console.WriteLine(result[0].GetProperty("createdTime").ToString());
+ Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSource").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSchema").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("startTime").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("endTime").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("displayName").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("slidingWindow").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("status").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
+ Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
+}
+]]>
\ No newline at end of file
diff --git a/samples/AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs b/samples/AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs
index 8d456fa6a9d..9fdcfc4ccde 100644
--- a/samples/AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs
+++ b/samples/AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs
@@ -7,9 +7,9 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Text.Json;
using System.Threading.Tasks;
+using AnomalyDetector;
using AnomalyDetector.Models;
using Azure;
using Azure.Core;
@@ -24,20 +24,21 @@ public class Samples_AnomalyDetectorClient
[Ignore("Only validating compilation of examples")]
public void Example_DetectUnivariateEntireSeries()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- value = 123.45f,
- }
- },
- };
-
- Response response = client.DetectUnivariateEntireSeries(RequestContent.Create(data));
+ series = new List()
+{
+new
+{
+value = 123.45F,
+}
+},
+ });
+ Response response = client.DetectUnivariateEntireSeries(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -53,28 +54,29 @@ public void Example_DetectUnivariateEntireSeries()
[Ignore("Only validating compilation of examples")]
public void Example_DetectUnivariateEntireSeries_AllParameters()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- timestamp = "2022-05-10T14:57:31.2311892-04:00",
- value = 123.45f,
- }
- },
+ series = new List()
+{
+new
+{
+timestamp = "2022-05-10T14:57:31.2311892-04:00",
+value = 123.45F,
+}
+},
granularity = "yearly",
customInterval = 1234,
period = 1234,
- maxAnomalyRatio = 123.45f,
+ maxAnomalyRatio = 123.45F,
sensitivity = 1234,
imputeMode = "auto",
- imputeFixedValue = 123.45f,
- };
-
- Response response = client.DetectUnivariateEntireSeries(RequestContent.Create(data));
+ imputeFixedValue = 123.45F,
+ });
+ Response response = client.DetectUnivariateEntireSeries(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -89,22 +91,65 @@ public void Example_DetectUnivariateEntireSeries_AllParameters()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task Example_DetectUnivariateEntireSeries_Async()
+ public void Example_DetectUnivariateEntireSeries_Convenience()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
- {
- series = new[] {
- new {
- value = 123.45f,
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+});
+ Response response = client.DetectUnivariateEntireSeries(options);
}
- },
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_DetectUnivariateEntireSeries_AllParameters_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+{
+Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+})
+ {
+ Granularity = TimeGranularity.Yearly,
+ CustomInterval = 1234,
+ Period = 1234,
+ MaxAnomalyRatio = 123.45F,
+ Sensitivity = 1234,
+ ImputeMode = ImputeMode.Auto,
+ ImputeFixedValue = 123.45F,
};
+ Response response = client.DetectUnivariateEntireSeries(options);
+ }
- Response response = await client.DetectUnivariateEntireSeriesAsync(RequestContent.Create(data));
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DetectUnivariateEntireSeries_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ RequestContent content = RequestContent.Create(new
+ {
+ series = new List()
+{
+new
+{
+value = 123.45F,
+}
+},
+ });
+ Response response = await client.DetectUnivariateEntireSeriesAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -120,28 +165,29 @@ public async Task Example_DetectUnivariateEntireSeries_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_DetectUnivariateEntireSeries_AllParameters_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- timestamp = "2022-05-10T14:57:31.2311892-04:00",
- value = 123.45f,
- }
- },
+ series = new List()
+{
+new
+{
+timestamp = "2022-05-10T14:57:31.2311892-04:00",
+value = 123.45F,
+}
+},
granularity = "yearly",
customInterval = 1234,
period = 1234,
- maxAnomalyRatio = 123.45f,
+ maxAnomalyRatio = 123.45F,
sensitivity = 1234,
imputeMode = "auto",
- imputeFixedValue = 123.45f,
- };
-
- Response response = await client.DetectUnivariateEntireSeriesAsync(RequestContent.Create(data));
+ imputeFixedValue = 123.45F,
+ });
+ Response response = await client.DetectUnivariateEntireSeriesAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -158,47 +204,63 @@ public async Task Example_DetectUnivariateEntireSeries_AllParameters_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_DetectUnivariateEntireSeries_Convenience_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var options = new UnivariateDetectionOptions(new TimeSeriesPoint[]
- {
- new TimeSeriesPoint(3.14f)
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
- }
- })
+new TimeSeriesPoint(123.45F)
+});
+ Response response = await client.DetectUnivariateEntireSeriesAsync(options);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DetectUnivariateEntireSeries_AllParameters_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+{
+Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+})
{
Granularity = TimeGranularity.Yearly,
CustomInterval = 1234,
Period = 1234,
- MaxAnomalyRatio = 3.14f,
+ MaxAnomalyRatio = 123.45F,
Sensitivity = 1234,
ImputeMode = ImputeMode.Auto,
- ImputeFixedValue = 3.14f,
+ ImputeFixedValue = 123.45F,
};
- var result = await client.DetectUnivariateEntireSeriesAsync(options);
+ Response response = await client.DetectUnivariateEntireSeriesAsync(options);
}
[Test]
[Ignore("Only validating compilation of examples")]
public void Example_DetectUnivariateLastPoint()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- value = 123.45f,
- }
- },
- };
-
- Response response = client.DetectUnivariateLastPoint(RequestContent.Create(data));
+ series = new List()
+{
+new
+{
+value = 123.45F,
+}
+},
+ });
+ Response response = client.DetectUnivariateLastPoint(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -215,28 +277,29 @@ public void Example_DetectUnivariateLastPoint()
[Ignore("Only validating compilation of examples")]
public void Example_DetectUnivariateLastPoint_AllParameters()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- timestamp = "2022-05-10T14:57:31.2311892-04:00",
- value = 123.45f,
- }
- },
+ series = new List()
+{
+new
+{
+timestamp = "2022-05-10T14:57:31.2311892-04:00",
+value = 123.45F,
+}
+},
granularity = "yearly",
customInterval = 1234,
period = 1234,
- maxAnomalyRatio = 123.45f,
+ maxAnomalyRatio = 123.45F,
sensitivity = 1234,
imputeMode = "auto",
- imputeFixedValue = 123.45f,
- };
-
- Response response = client.DetectUnivariateLastPoint(RequestContent.Create(data));
+ imputeFixedValue = 123.45F,
+ });
+ Response response = client.DetectUnivariateLastPoint(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -252,22 +315,65 @@ public void Example_DetectUnivariateLastPoint_AllParameters()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task Example_DetectUnivariateLastPoint_Async()
+ public void Example_DetectUnivariateLastPoint_Convenience()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
- {
- series = new[] {
- new {
- value = 123.45f,
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+});
+ Response response = client.DetectUnivariateLastPoint(options);
}
- },
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_DetectUnivariateLastPoint_AllParameters_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+{
+Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+})
+ {
+ Granularity = TimeGranularity.Yearly,
+ CustomInterval = 1234,
+ Period = 1234,
+ MaxAnomalyRatio = 123.45F,
+ Sensitivity = 1234,
+ ImputeMode = ImputeMode.Auto,
+ ImputeFixedValue = 123.45F,
};
+ Response response = client.DetectUnivariateLastPoint(options);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DetectUnivariateLastPoint_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = await client.DetectUnivariateLastPointAsync(RequestContent.Create(data));
+ RequestContent content = RequestContent.Create(new
+ {
+ series = new List()
+{
+new
+{
+value = 123.45F,
+}
+},
+ });
+ Response response = await client.DetectUnivariateLastPointAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -284,28 +390,29 @@ public async Task Example_DetectUnivariateLastPoint_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_DetectUnivariateLastPoint_AllParameters_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- timestamp = "2022-05-10T14:57:31.2311892-04:00",
- value = 123.45f,
- }
- },
+ series = new List()
+{
+new
+{
+timestamp = "2022-05-10T14:57:31.2311892-04:00",
+value = 123.45F,
+}
+},
granularity = "yearly",
customInterval = 1234,
period = 1234,
- maxAnomalyRatio = 123.45f,
+ maxAnomalyRatio = 123.45F,
sensitivity = 1234,
imputeMode = "auto",
- imputeFixedValue = 123.45f,
- };
-
- Response response = await client.DetectUnivariateLastPointAsync(RequestContent.Create(data));
+ imputeFixedValue = 123.45F,
+ });
+ Response response = await client.DetectUnivariateLastPointAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -323,48 +430,64 @@ public async Task Example_DetectUnivariateLastPoint_AllParameters_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_DetectUnivariateLastPoint_Convenience_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var options = new UnivariateDetectionOptions(new TimeSeriesPoint[]
- {
- new TimeSeriesPoint(3.14f)
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
- }
- })
+new TimeSeriesPoint(123.45F)
+});
+ Response response = await client.DetectUnivariateLastPointAsync(options);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DetectUnivariateLastPoint_AllParameters_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+{
+Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+})
{
Granularity = TimeGranularity.Yearly,
CustomInterval = 1234,
Period = 1234,
- MaxAnomalyRatio = 3.14f,
+ MaxAnomalyRatio = 123.45F,
Sensitivity = 1234,
ImputeMode = ImputeMode.Auto,
- ImputeFixedValue = 3.14f,
+ ImputeFixedValue = 123.45F,
};
- var result = await client.DetectUnivariateLastPointAsync(options);
+ Response response = await client.DetectUnivariateLastPointAsync(options);
}
[Test]
[Ignore("Only validating compilation of examples")]
public void Example_DetectUnivariateChangePoint()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- value = 123.45f,
- }
- },
+ series = new List()
+{
+new
+{
+value = 123.45F,
+}
+},
granularity = "yearly",
- };
-
- Response response = client.DetectUnivariateChangePoint(RequestContent.Create(data));
+ });
+ Response response = client.DetectUnivariateChangePoint(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
@@ -374,26 +497,27 @@ public void Example_DetectUnivariateChangePoint()
[Ignore("Only validating compilation of examples")]
public void Example_DetectUnivariateChangePoint_AllParameters()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- timestamp = "2022-05-10T14:57:31.2311892-04:00",
- value = 123.45f,
- }
- },
+ series = new List()
+{
+new
+{
+timestamp = "2022-05-10T14:57:31.2311892-04:00",
+value = 123.45F,
+}
+},
granularity = "yearly",
customInterval = 1234,
period = 1234,
stableTrendWindow = 1234,
- threshold = 123.45f,
- };
-
- Response response = client.DetectUnivariateChangePoint(RequestContent.Create(data));
+ threshold = 123.45F,
+ });
+ Response response = client.DetectUnivariateChangePoint(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -403,23 +527,63 @@ public void Example_DetectUnivariateChangePoint_AllParameters()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task Example_DetectUnivariateChangePoint_Async()
+ public void Example_DetectUnivariateChangePoint_Convenience()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
- {
- series = new[] {
- new {
- value = 123.45f,
+ UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+}, TimeGranularity.Yearly);
+ Response response = client.DetectUnivariateChangePoint(options);
}
- },
- granularity = "yearly",
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_DetectUnivariateChangePoint_AllParameters_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+{
+Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+}, TimeGranularity.Yearly)
+ {
+ CustomInterval = 1234,
+ Period = 1234,
+ StableTrendWindow = 1234,
+ Threshold = 123.45F,
};
+ Response response = client.DetectUnivariateChangePoint(options);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DetectUnivariateChangePoint_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data));
+ RequestContent content = RequestContent.Create(new
+ {
+ series = new List()
+{
+new
+{
+value = 123.45F,
+}
+},
+ granularity = "yearly",
+ });
+ Response response = await client.DetectUnivariateChangePointAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
@@ -429,26 +593,27 @@ public async Task Example_DetectUnivariateChangePoint_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_DetectUnivariateChangePoint_AllParameters_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
- series = new[] {
- new {
- timestamp = "2022-05-10T14:57:31.2311892-04:00",
- value = 123.45f,
- }
- },
+ series = new List()
+{
+new
+{
+timestamp = "2022-05-10T14:57:31.2311892-04:00",
+value = 123.45F,
+}
+},
granularity = "yearly",
customInterval = 1234,
period = 1234,
stableTrendWindow = 1234,
- threshold = 123.45f,
- };
-
- Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data));
+ threshold = 123.45F,
+ });
+ Response response = await client.DetectUnivariateChangePointAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
@@ -460,35 +625,50 @@ public async Task Example_DetectUnivariateChangePoint_AllParameters_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_DetectUnivariateChangePoint_Convenience_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[]
- {
- new TimeSeriesPoint(3.14f)
+ UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
{
- Timestamp = DateTimeOffset.UtcNow,
- }
- }, TimeGranularity.Yearly)
+new TimeSeriesPoint(123.45F)
+}, TimeGranularity.Yearly);
+ Response response = await client.DetectUnivariateChangePointAsync(options);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DetectUnivariateChangePoint_AllParameters_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List()
+{
+new TimeSeriesPoint(123.45F)
+{
+Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+}, TimeGranularity.Yearly)
{
CustomInterval = 1234,
Period = 1234,
StableTrendWindow = 1234,
- Threshold = 3.14f,
+ Threshold = 123.45F,
};
- var result = await client.DetectUnivariateChangePointAsync(options);
+ Response response = await client.DetectUnivariateChangePointAsync(options);
}
[Test]
[Ignore("Only validating compilation of examples")]
public void Example_GetMultivariateBatchDetectionResult()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = client.GetMultivariateBatchDetectionResult(Guid.NewGuid(), new RequestContext());
+ Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -504,11 +684,11 @@ public void Example_GetMultivariateBatchDetectionResult()
[Ignore("Only validating compilation of examples")]
public void Example_GetMultivariateBatchDetectionResult_AllParameters()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = client.GetMultivariateBatchDetectionResult(Guid.NewGuid(), new RequestContext());
+ Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -535,15 +715,37 @@ public void Example_GetMultivariateBatchDetectionResult_AllParameters()
Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString());
}
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_GetMultivariateBatchDetectionResult_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_GetMultivariateBatchDetectionResult_AllParameters_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
+ }
+
[Test]
[Ignore("Only validating compilation of examples")]
public async Task Example_GetMultivariateBatchDetectionResult_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid(), new RequestContext());
+ Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -559,11 +761,11 @@ public async Task Example_GetMultivariateBatchDetectionResult_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_GetMultivariateBatchDetectionResult_AllParameters_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid(), new RequestContext());
+ Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("resultId").ToString());
@@ -594,29 +796,39 @@ public async Task Example_GetMultivariateBatchDetectionResult_AllParameters_Asyn
[Ignore("Only validating compilation of examples")]
public async Task Example_GetMultivariateBatchDetectionResult_Convenience_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var result = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid());
+ Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_GetMultivariateBatchDetectionResult_AllParameters_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));
}
[Test]
[Ignore("Only validating compilation of examples")]
public void Example_TrainMultivariateModel()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
dataSource = "",
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
- };
-
- Response response = client.TrainMultivariateModel(RequestContent.Create(data));
+ });
+ Response response = client.TrainMultivariateModel(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -628,11 +840,11 @@ public void Example_TrainMultivariateModel()
[Ignore("Only validating compilation of examples")]
public void Example_TrainMultivariateModel_AllParameters()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
dataSource = "",
dataSchema = "OneTable",
@@ -644,39 +856,44 @@ public void Example_TrainMultivariateModel_AllParameters()
{
alignMode = "Inner",
fillNAMethod = "Previous",
- paddingValue = 123.45f,
+ paddingValue = 123.45F,
},
status = "CREATED",
diagnosticsInfo = new
{
modelState = new
{
- epochIds = new[] {
- 1234
- },
- trainLosses = new[] {
- 123.45f
- },
- validationLosses = new[] {
- 123.45f
- },
- latenciesInSeconds = new[] {
- 123.45f
- },
+ epochIds = new List()
+{
+1234
+},
+ trainLosses = new List()
+{
+123.45F
+},
+ validationLosses = new List()
+{
+123.45F
+},
+ latenciesInSeconds = new List()
+{
+123.45F
+},
},
- variableStates = new[] {
- new {
- variable = "",
- filledNARatio = 123.45f,
- effectiveCount = 1234,
- firstTimestamp = "2022-05-10T14:57:31.2311892-04:00",
- lastTimestamp = "2022-05-10T14:57:31.2311892-04:00",
- }
- },
+ variableStates = new List()
+{
+new
+{
+variable = "",
+filledNARatio = 123.45F,
+effectiveCount = 1234,
+firstTimestamp = "2022-05-10T14:57:31.2311892-04:00",
+lastTimestamp = "2022-05-10T14:57:31.2311892-04:00",
+}
+},
},
- };
-
- Response response = client.TrainMultivariateModel(RequestContent.Create(data));
+ });
+ Response response = client.TrainMultivariateModel(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -705,22 +922,90 @@ public void Example_TrainMultivariateModel_AllParameters()
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
}
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_TrainMultivariateModel_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+ Response response = client.TrainMultivariateModel(modelInfo);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_TrainMultivariateModel_AllParameters_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"))
+ {
+ DataSchema = DataSchema.OneTable,
+ DisplayName = "",
+ SlidingWindow = 1234,
+ AlignPolicy = new AlignPolicy()
+ {
+ AlignMode = AlignMode.Inner,
+ FillNAMethod = FillNAMethod.Previous,
+ PaddingValue = 123.45F,
+ },
+ Status = ModelStatus.Created,
+ DiagnosticsInfo = new DiagnosticsInfo()
+ {
+ ModelState = new ModelState()
+ {
+ EpochIds =
+{
+1234
+},
+ TrainLosses =
+{
+123.45F
+},
+ ValidationLosses =
+{
+123.45F
+},
+ LatenciesInSeconds =
+{
+123.45F
+},
+ },
+ VariableStates =
+{
+new VariableState()
+{
+Variable = "",
+FilledNARatio = 123.45F,
+EffectiveCount = 1234,
+FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+},
+ },
+ };
+ Response response = client.TrainMultivariateModel(modelInfo);
+ }
+
[Test]
[Ignore("Only validating compilation of examples")]
public async Task Example_TrainMultivariateModel_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
dataSource = "",
startTime = "2022-05-10T14:57:31.2311892-04:00",
endTime = "2022-05-10T14:57:31.2311892-04:00",
- };
-
- Response response = await client.TrainMultivariateModelAsync(RequestContent.Create(data));
+ });
+ Response response = await client.TrainMultivariateModelAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -732,11 +1017,11 @@ public async Task Example_TrainMultivariateModel_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_TrainMultivariateModel_AllParameters_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var data = new
+ RequestContent content = RequestContent.Create(new
{
dataSource = "",
dataSchema = "OneTable",
@@ -748,39 +1033,44 @@ public async Task Example_TrainMultivariateModel_AllParameters_Async()
{
alignMode = "Inner",
fillNAMethod = "Previous",
- paddingValue = 123.45f,
+ paddingValue = 123.45F,
},
status = "CREATED",
diagnosticsInfo = new
{
modelState = new
{
- epochIds = new[] {
- 1234
- },
- trainLosses = new[] {
- 123.45f
- },
- validationLosses = new[] {
- 123.45f
- },
- latenciesInSeconds = new[] {
- 123.45f
- },
+ epochIds = new List()
+{
+1234
+},
+ trainLosses = new List()
+{
+123.45F
+},
+ validationLosses = new List()
+{
+123.45F
+},
+ latenciesInSeconds = new List()
+{
+123.45F
+},
},
- variableStates = new[] {
- new {
- variable = "",
- filledNARatio = 123.45f,
- effectiveCount = 1234,
- firstTimestamp = "2022-05-10T14:57:31.2311892-04:00",
- lastTimestamp = "2022-05-10T14:57:31.2311892-04:00",
- }
- },
+ variableStates = new List()
+{
+new
+{
+variable = "",
+filledNARatio = 123.45F,
+effectiveCount = 1234,
+firstTimestamp = "2022-05-10T14:57:31.2311892-04:00",
+lastTimestamp = "2022-05-10T14:57:31.2311892-04:00",
+}
+},
},
- };
-
- Response response = await client.TrainMultivariateModelAsync(RequestContent.Create(data));
+ });
+ Response response = await client.TrainMultivariateModelAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -813,20 +1103,32 @@ public async Task Example_TrainMultivariateModel_AllParameters_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_TrainMultivariateModel_Convenience_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"));
+ Response response = await client.TrainMultivariateModelAsync(modelInfo);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_TrainMultivariateModel_AllParameters_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- var modelInfo = new ModelInfo("", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow)
+ ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"))
{
DataSchema = DataSchema.OneTable,
- DisplayName = "",
+ DisplayName = "",
SlidingWindow = 1234,
AlignPolicy = new AlignPolicy()
{
AlignMode = AlignMode.Inner,
FillNAMethod = FillNAMethod.Previous,
- PaddingValue = 3.14f,
+ PaddingValue = 123.45F,
},
Status = ModelStatus.Created,
DiagnosticsInfo = new DiagnosticsInfo()
@@ -835,44 +1137,44 @@ public async Task Example_TrainMultivariateModel_Convenience_Async()
{
EpochIds =
{
- 1234
- },
+1234
+},
TrainLosses =
{
- 3.14f
- },
+123.45F
+},
ValidationLosses =
{
- 3.14f
- },
+123.45F
+},
LatenciesInSeconds =
{
- 3.14f
- },
+123.45F
+},
},
VariableStates =
{
- new VariableState()
+new VariableState()
{
- Variable = "",
- FilledNARatio = 3.14f,
- EffectiveCount = 1234,
- FirstTimestamp = DateTimeOffset.UtcNow,
- LastTimestamp = DateTimeOffset.UtcNow,
- }
- },
+Variable = "",
+FilledNARatio = 123.45F,
+EffectiveCount = 1234,
+FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+}
+},
},
};
- var result = await client.TrainMultivariateModelAsync(modelInfo);
+ Response response = await client.TrainMultivariateModelAsync(modelInfo);
}
[Test]
[Ignore("Only validating compilation of examples")]
public void Example_DeleteMultivariateModel()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
Response response = client.DeleteMultivariateModel("");
Console.WriteLine(response.Status);
@@ -882,9 +1184,9 @@ public void Example_DeleteMultivariateModel()
[Ignore("Only validating compilation of examples")]
public void Example_DeleteMultivariateModel_AllParameters()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
Response response = client.DeleteMultivariateModel("");
Console.WriteLine(response.Status);
@@ -894,9 +1196,9 @@ public void Example_DeleteMultivariateModel_AllParameters()
[Ignore("Only validating compilation of examples")]
public async Task Example_DeleteMultivariateModel_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
Response response = await client.DeleteMultivariateModelAsync("");
Console.WriteLine(response.Status);
@@ -906,9 +1208,9 @@ public async Task Example_DeleteMultivariateModel_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_DeleteMultivariateModel_AllParameters_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
Response response = await client.DeleteMultivariateModelAsync("");
Console.WriteLine(response.Status);
@@ -918,11 +1220,11 @@ public async Task Example_DeleteMultivariateModel_AllParameters_Async()
[Ignore("Only validating compilation of examples")]
public void Example_GetMultivariateModel()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = client.GetMultivariateModel("", new RequestContext());
+ Response response = client.GetMultivariateModel("", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -934,11 +1236,11 @@ public void Example_GetMultivariateModel()
[Ignore("Only validating compilation of examples")]
public void Example_GetMultivariateModel_AllParameters()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = client.GetMultivariateModel("", new RequestContext());
+ Response response = client.GetMultivariateModel("", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -967,15 +1269,37 @@ public void Example_GetMultivariateModel_AllParameters()
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());
}
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_GetMultivariateModel_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ Response response = client.GetMultivariateModel("");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_GetMultivariateModel_AllParameters_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
+
+ Response response = client.GetMultivariateModel("");
+ }
+
[Test]
[Ignore("Only validating compilation of examples")]
public async Task Example_GetMultivariateModel_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = await client.GetMultivariateModelAsync("", new RequestContext());
+ Response response = await client.GetMultivariateModelAsync("", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
@@ -987,11 +1311,11 @@ public async Task Example_GetMultivariateModel_Async()
[Ignore("Only validating compilation of examples")]
public async Task Example_GetMultivariateModel_AllParameters_Async()
{
- var credential = new AzureKeyCredential("");
- var endpoint = new Uri("");
- var client = new AnomalyDetectorClient(endpoint, credential);
+ Uri endpoint = new Uri("");
+ AzureKeyCredential credential = new AzureKeyCredential("");
+ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential);
- Response response = await client.GetMultivariateModelAsync("", new RequestContext());
+ Response response = await client.GetMultivariateModelAsync("