Skip to content

Commit 9b8faaa

Browse files
azure-sdkchunyu3
andauthored
Update AutoRest C# version to 3.0.0-beta.20230419.1 (Azure#35680)
* Update Generator Version 3.0.0-beta.20230419.1 * Update SDK codes a*,b*,c* * update anomalyDetectore sample * updadte anomalyDetetor --------- Co-authored-by: FAREAST\chunyu <[email protected]>
1 parent 3f29c3e commit 9b8faaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1175
-1169
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
All should have PrivateAssets="All" set so they don't become package dependencies
166166
-->
167167
<ItemGroup>
168-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230413.1" PrivateAssets="All" />
168+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230419.1" PrivateAssets="All" />
169169
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230131.1" PrivateAssets="All" />
170170
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
171171
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" PrivateAssets="All" />

eng/emitter-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"main": "dist/src/index.js",
33
"dependencies": {
4-
"@azure-tools/typespec-csharp": "0.2.0-beta.20230413.1"
4+
"@azure-tools/typespec-csharp": "0.2.0-beta.20230419.1"
55
}
66
}

sdk/anomalydetector/Azure.AI.AnomalyDetector/api/Azure.AI.AnomalyDetector.netstandard2.0.cs

Lines changed: 80 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
namespace Azure.AI.AnomalyDetector
22
{
3-
public enum AlignMode
3+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
4+
public readonly partial struct AlignMode : System.IEquatable<Azure.AI.AnomalyDetector.AlignMode>
45
{
5-
Inner = 0,
6-
Outer = 1,
6+
private readonly object _dummy;
7+
private readonly int _dummyPrimitive;
8+
public AlignMode(string value) { throw null; }
9+
public static Azure.AI.AnomalyDetector.AlignMode Inner { get { throw null; } }
10+
public static Azure.AI.AnomalyDetector.AlignMode Outer { get { throw null; } }
11+
public bool Equals(Azure.AI.AnomalyDetector.AlignMode other) { throw null; }
12+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
13+
public override bool Equals(object obj) { throw null; }
14+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
15+
public override int GetHashCode() { throw null; }
16+
public static bool operator ==(Azure.AI.AnomalyDetector.AlignMode left, Azure.AI.AnomalyDetector.AlignMode right) { throw null; }
17+
public static implicit operator Azure.AI.AnomalyDetector.AlignMode (string value) { throw null; }
18+
public static bool operator !=(Azure.AI.AnomalyDetector.AlignMode left, Azure.AI.AnomalyDetector.AlignMode right) { throw null; }
19+
public override string ToString() { throw null; }
720
}
821
public partial class AlignPolicy
922
{
@@ -179,13 +192,13 @@ public ModelInfo(string dataSource, System.DateTimeOffset startTime, System.Date
179192
public Azure.AI.AnomalyDetector.AlignPolicy AlignPolicy { get { throw null; } set { } }
180193
public Azure.AI.AnomalyDetector.DataSchema? DataSchema { get { throw null; } set { } }
181194
public string DataSource { get { throw null; } set { } }
182-
public Azure.AI.AnomalyDetector.DiagnosticsInfo DiagnosticsInfo { get { throw null; } set { } }
195+
public Azure.AI.AnomalyDetector.DiagnosticsInfo DiagnosticsInfo { get { throw null; } }
183196
public string DisplayName { get { throw null; } set { } }
184197
public System.DateTimeOffset EndTime { get { throw null; } set { } }
185198
public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.ErrorResponse> Errors { get { throw null; } }
186199
public int? SlidingWindow { get { throw null; } set { } }
187200
public System.DateTimeOffset StartTime { get { throw null; } set { } }
188-
public Azure.AI.AnomalyDetector.ModelStatus? Status { get { throw null; } set { } }
201+
public Azure.AI.AnomalyDetector.ModelStatus? Status { get { throw null; } }
189202
}
190203
public partial class ModelState
191204
{
@@ -195,12 +208,25 @@ public ModelState() { }
195208
public System.Collections.Generic.IList<float> TrainLosses { get { throw null; } }
196209
public System.Collections.Generic.IList<float> ValidationLosses { get { throw null; } }
197210
}
198-
public enum ModelStatus
211+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
212+
public readonly partial struct ModelStatus : System.IEquatable<Azure.AI.AnomalyDetector.ModelStatus>
199213
{
200-
Created = 0,
201-
Running = 1,
202-
Ready = 2,
203-
Failed = 3,
214+
private readonly object _dummy;
215+
private readonly int _dummyPrimitive;
216+
public ModelStatus(string value) { throw null; }
217+
public static Azure.AI.AnomalyDetector.ModelStatus Created { get { throw null; } }
218+
public static Azure.AI.AnomalyDetector.ModelStatus Failed { get { throw null; } }
219+
public static Azure.AI.AnomalyDetector.ModelStatus Ready { get { throw null; } }
220+
public static Azure.AI.AnomalyDetector.ModelStatus Running { get { throw null; } }
221+
public bool Equals(Azure.AI.AnomalyDetector.ModelStatus other) { throw null; }
222+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
223+
public override bool Equals(object obj) { throw null; }
224+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
225+
public override int GetHashCode() { throw null; }
226+
public static bool operator ==(Azure.AI.AnomalyDetector.ModelStatus left, Azure.AI.AnomalyDetector.ModelStatus right) { throw null; }
227+
public static implicit operator Azure.AI.AnomalyDetector.ModelStatus (string value) { throw null; }
228+
public static bool operator !=(Azure.AI.AnomalyDetector.ModelStatus left, Azure.AI.AnomalyDetector.ModelStatus right) { throw null; }
229+
public override string ToString() { throw null; }
204230
}
205231
public partial class MultivariateBatchDetectionOptions
206232
{
@@ -218,12 +244,25 @@ internal MultivariateBatchDetectionResultSummary() { }
218244
public Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus Status { get { throw null; } }
219245
public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.VariableState> VariableStates { get { throw null; } }
220246
}
221-
public enum MultivariateBatchDetectionStatus
247+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
248+
public readonly partial struct MultivariateBatchDetectionStatus : System.IEquatable<Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus>
222249
{
223-
Created = 0,
224-
Running = 1,
225-
Ready = 2,
226-
Failed = 3,
250+
private readonly object _dummy;
251+
private readonly int _dummyPrimitive;
252+
public MultivariateBatchDetectionStatus(string value) { throw null; }
253+
public static Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus Created { get { throw null; } }
254+
public static Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus Failed { get { throw null; } }
255+
public static Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus Ready { get { throw null; } }
256+
public static Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus Running { get { throw null; } }
257+
public bool Equals(Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus other) { throw null; }
258+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
259+
public override bool Equals(object obj) { throw null; }
260+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
261+
public override int GetHashCode() { throw null; }
262+
public static bool operator ==(Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus left, Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus right) { throw null; }
263+
public static implicit operator Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus (string value) { throw null; }
264+
public static bool operator !=(Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus left, Azure.AI.AnomalyDetector.MultivariateBatchDetectionStatus right) { throw null; }
265+
public override string ToString() { throw null; }
227266
}
228267
public partial class MultivariateDetectionResult
229268
{
@@ -234,8 +273,8 @@ internal MultivariateDetectionResult() { }
234273
}
235274
public partial class MultivariateLastDetectionOptions
236275
{
237-
public MultivariateLastDetectionOptions(System.Collections.Generic.IEnumerable<Azure.AI.AnomalyDetector.VariableValues> variables, int topContributorCount) { }
238-
public int TopContributorCount { get { throw null; } }
276+
public MultivariateLastDetectionOptions(System.Collections.Generic.IEnumerable<Azure.AI.AnomalyDetector.VariableValues> variables) { }
277+
public int? TopContributorCount { get { throw null; } set { } }
239278
public System.Collections.Generic.IList<Azure.AI.AnomalyDetector.VariableValues> Variables { get { throw null; } }
240279
}
241280
public partial class MultivariateLastDetectionResult
@@ -244,17 +283,30 @@ internal MultivariateLastDetectionResult() { }
244283
public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.AnomalyState> Results { get { throw null; } }
245284
public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.VariableState> VariableStates { get { throw null; } }
246285
}
247-
public enum TimeGranularity
248-
{
249-
Yearly = 0,
250-
Monthly = 1,
251-
Weekly = 2,
252-
Daily = 3,
253-
Hourly = 4,
254-
PerMinute = 5,
255-
PerSecond = 6,
256-
Microsecond = 7,
257-
None = 8,
286+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
287+
public readonly partial struct TimeGranularity : System.IEquatable<Azure.AI.AnomalyDetector.TimeGranularity>
288+
{
289+
private readonly object _dummy;
290+
private readonly int _dummyPrimitive;
291+
public TimeGranularity(string value) { throw null; }
292+
public static Azure.AI.AnomalyDetector.TimeGranularity Daily { get { throw null; } }
293+
public static Azure.AI.AnomalyDetector.TimeGranularity Hourly { get { throw null; } }
294+
public static Azure.AI.AnomalyDetector.TimeGranularity Microsecond { get { throw null; } }
295+
public static Azure.AI.AnomalyDetector.TimeGranularity Monthly { get { throw null; } }
296+
public static Azure.AI.AnomalyDetector.TimeGranularity None { get { throw null; } }
297+
public static Azure.AI.AnomalyDetector.TimeGranularity PerMinute { get { throw null; } }
298+
public static Azure.AI.AnomalyDetector.TimeGranularity PerSecond { get { throw null; } }
299+
public static Azure.AI.AnomalyDetector.TimeGranularity Weekly { get { throw null; } }
300+
public static Azure.AI.AnomalyDetector.TimeGranularity Yearly { get { throw null; } }
301+
public bool Equals(Azure.AI.AnomalyDetector.TimeGranularity other) { throw null; }
302+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
303+
public override bool Equals(object obj) { throw null; }
304+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
305+
public override int GetHashCode() { throw null; }
306+
public static bool operator ==(Azure.AI.AnomalyDetector.TimeGranularity left, Azure.AI.AnomalyDetector.TimeGranularity right) { throw null; }
307+
public static implicit operator Azure.AI.AnomalyDetector.TimeGranularity (string value) { throw null; }
308+
public static bool operator !=(Azure.AI.AnomalyDetector.TimeGranularity left, Azure.AI.AnomalyDetector.TimeGranularity right) { throw null; }
309+
public override string ToString() { throw null; }
258310
}
259311
public partial class TimeSeriesPoint
260312
{

sdk/anomalydetector/Azure.AI.AnomalyDetector/samples/Sample4_MultivariateDetect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private MultivariateLastDetectionResult DetectLast(AnomalyDetectorClient client,
164164
variables.Add(new VariableValues(lastDetectVariables[index].GetProperty("variable").ToString(), JsonConvert.DeserializeObject<IEnumerable<String>>(lastDetectVariables[index].GetProperty("timestamps").ToString()), JsonConvert.DeserializeObject<IEnumerable<float>>(lastDetectVariables[index].GetProperty("values").ToString())));
165165
}
166166
}
167-
MultivariateLastDetectionOptions request = new MultivariateLastDetectionOptions(variables, 1);
167+
MultivariateLastDetectionOptions request = new MultivariateLastDetectionOptions(variables);
168168
MultivariateLastDetectionResult response = client.DetectMultivariateLastAnomaly(model_id, request);
169169
return response;
170170
}

sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AlignMode.Serialization.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AlignMode.cs

Lines changed: 36 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AlignPolicy.Serialization.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AlignPolicy.cs

Lines changed: 9 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)