Skip to content

Commit fec4b08

Browse files
azure-sdkchunyu3
andauthored
Update AutoRest C# version to 3.0.0-beta.20230823.3 (Azure#38346)
* Update Generator Version 3.0.0-beta.20230823.3 * Update SDK codes * regen openai and contentsafety --------- Co-authored-by: FAREAST\chunyu <chunyu@microsoft.com>
1 parent 2c1d884 commit fec4b08

20 files changed

+57
-57
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
All should have PrivateAssets="All" set so they don't become package dependencies
175175
-->
176176
<ItemGroup>
177-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230821.3" PrivateAssets="All" />
177+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230823.3" PrivateAssets="All" />
178178
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230822.1" PrivateAssets="All" />
179179
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
180180
<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.20230821.3"
4+
"@azure-tools/typespec-csharp": "0.2.0-beta.20230823.3"
55
}
66
}

sdk/contentsafety/Azure.AI.ContentSafety/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ if (response.Value.BlocklistsMatchResults != null)
179179

180180
```C# Snippet:Azure_AI_ContentSafety_AnalyzeImage
181181
string datapath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Samples", "sample_data", "image.jpg");
182-
ImageData image = new ImageData() { Content = BinaryData.FromBytes(File.ReadAllBytes(datapath)) };
182+
ContentSafetyImageData image = new ContentSafetyImageData() { Content = BinaryData.FromBytes(File.ReadAllBytes(datapath)) };
183183

184184
var request = new AnalyzeImageOptions(image);
185185

sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public static partial class AIContentSafetyModelFactory
2323
}
2424
public partial class AnalyzeImageOptions
2525
{
26-
public AnalyzeImageOptions(Azure.AI.ContentSafety.ImageData image) { }
26+
public AnalyzeImageOptions(Azure.AI.ContentSafety.ContentSafetyImageData image) { }
2727
public System.Collections.Generic.IList<Azure.AI.ContentSafety.ImageCategory> Categories { get { throw null; } }
28-
public Azure.AI.ContentSafety.ImageData Image { get { throw null; } }
28+
public Azure.AI.ContentSafety.ContentSafetyImageData Image { get { throw null; } }
2929
}
3030
public partial class AnalyzeImageResult
3131
{
@@ -103,6 +103,12 @@ public enum ServiceVersion
103103
V2023_04_30_Preview = 1,
104104
}
105105
}
106+
public partial class ContentSafetyImageData
107+
{
108+
public ContentSafetyImageData() { }
109+
public System.Uri BlobUrl { get { throw null; } set { } }
110+
public System.BinaryData Content { get { throw null; } set { } }
111+
}
106112
public partial class ImageAnalyzeSeverityResult
107113
{
108114
internal ImageAnalyzeSeverityResult() { }
@@ -129,12 +135,6 @@ internal ImageAnalyzeSeverityResult() { }
129135
public static bool operator !=(Azure.AI.ContentSafety.ImageCategory left, Azure.AI.ContentSafety.ImageCategory right) { throw null; }
130136
public override string ToString() { throw null; }
131137
}
132-
public partial class ImageData
133-
{
134-
public ImageData() { }
135-
public System.Uri BlobUrl { get { throw null; } set { } }
136-
public System.BinaryData Content { get { throw null; } set { } }
137-
}
138138
public partial class RemoveBlockItemsOptions
139139
{
140140
public RemoveBlockItemsOptions(System.Collections.Generic.IEnumerable<string> blockItemIds) { }

sdk/contentsafety/Azure.AI.ContentSafety/samples/Sample2_AnalyzeImage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You can download our [sample data](https://github.com/Azure/azure-sdk-for-net/bl
2222

2323
```C# Snippet:Azure_AI_ContentSafety_AnalyzeImage
2424
string datapath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Samples", "sample_data", "image.jpg");
25-
ImageData image = new ImageData() { Content = BinaryData.FromBytes(File.ReadAllBytes(datapath)) };
25+
ContentSafetyImageData image = new ContentSafetyImageData() { Content = BinaryData.FromBytes(File.ReadAllBytes(datapath)) };
2626

2727
var request = new AnalyzeImageOptions(image);
2828

sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs

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

sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.Serialization.cs renamed to sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyImageData.Serialization.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.cs renamed to sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyImageData.cs

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

sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ var credential = new AzureKeyCredential("<key>");
163163
var endpoint = new Uri("<https://my-service.azure.com>");
164164
var client = new ContentSafetyClient(endpoint, credential);
165165
166-
var body = new AnalyzeImageOptions(new ImageData()
166+
var body = new AnalyzeImageOptions(new ContentSafetyImageData()
167167
{
168168
Content = BinaryData.FromString("<your binary data content>"),
169169
BlobUrl = new Uri("http://localhost:3000"),
@@ -186,7 +186,7 @@ var credential = new AzureKeyCredential("<key>");
186186
var endpoint = new Uri("<https://my-service.azure.com>");
187187
var client = new ContentSafetyClient(endpoint, credential);
188188
189-
var body = new AnalyzeImageOptions(new ImageData()
189+
var body = new AnalyzeImageOptions(new ContentSafetyImageData()
190190
{
191191
Content = BinaryData.FromString("<your binary data content>"),
192192
BlobUrl = new Uri("http://localhost:3000"),

sdk/contentsafety/Azure.AI.ContentSafety/tests/ContentSafetyLiveTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public async Task TestAnalyzeImage()
6161
{
6262
var client = CreateContentSafetyClient();
6363

64-
var image = new ImageData()
64+
var image = new ContentSafetyImageData()
6565
{
6666
Content = BinaryData.FromBytes(File.ReadAllBytes(TestData.TestImageLocation))
6767
};

0 commit comments

Comments
 (0)