Skip to content

Commit 197ba76

Browse files
author
SDKAuto
committed
CodeGen from PR 30378 in Azure/azure-rest-api-specs
Merge 13a991f9503d8eb50ab2213ab4540aa952c47272 into 98d74b2db60e46ceb7e3b75755e51519cd500485
1 parent 597a9a7 commit 197ba76

File tree

11 files changed

+922
-84
lines changed

11 files changed

+922
-84
lines changed

sdk/monitor/Azure.Monitor.Ingestion/api/Azure.Monitor.Ingestion.net461.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ public LogsIngestionClient(System.Uri endpoint, Azure.Core.TokenCredential crede
2626
public LogsIngestionClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Monitor.Ingestion.LogsIngestionClientOptions options) { }
2727
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
2828
public virtual Azure.Response Upload(string ruleId, string streamName, Azure.Core.RequestContent content, string contentEncoding = null, Azure.RequestContext context = null) { throw null; }
29+
public virtual Azure.Response Upload(string ruleId, string streamName, System.Collections.Generic.IEnumerable<System.Collections.Generic.IDictionary<string, System.BinaryData>> body, string contentEncoding = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2930
public virtual System.Threading.Tasks.Task<Azure.Response> UploadAsync(string ruleId, string streamName, Azure.Core.RequestContent content, string contentEncoding = null, Azure.RequestContext context = null) { throw null; }
31+
public virtual System.Threading.Tasks.Task<Azure.Response> UploadAsync(string ruleId, string streamName, System.Collections.Generic.IEnumerable<System.Collections.Generic.IDictionary<string, System.BinaryData>> body, string contentEncoding = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3032
public virtual System.Threading.Tasks.Task<Azure.Response> UploadAsync<T>(string ruleId, string streamName, System.Collections.Generic.IEnumerable<T> logs, Azure.Monitor.Ingestion.LogsUploadOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3133
public virtual Azure.Response Upload<T>(string ruleId, string streamName, System.Collections.Generic.IEnumerable<T> logs, Azure.Monitor.Ingestion.LogsUploadOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3234
}

sdk/monitor/Azure.Monitor.Ingestion/api/Azure.Monitor.Ingestion.netstandard2.0.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ public LogsIngestionClient(System.Uri endpoint, Azure.Core.TokenCredential crede
2626
public LogsIngestionClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Monitor.Ingestion.LogsIngestionClientOptions options) { }
2727
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
2828
public virtual Azure.Response Upload(string ruleId, string streamName, Azure.Core.RequestContent content, string contentEncoding = null, Azure.RequestContext context = null) { throw null; }
29+
public virtual Azure.Response Upload(string ruleId, string streamName, System.Collections.Generic.IEnumerable<System.Collections.Generic.IDictionary<string, System.BinaryData>> body, string contentEncoding = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2930
public virtual System.Threading.Tasks.Task<Azure.Response> UploadAsync(string ruleId, string streamName, Azure.Core.RequestContent content, string contentEncoding = null, Azure.RequestContext context = null) { throw null; }
31+
public virtual System.Threading.Tasks.Task<Azure.Response> UploadAsync(string ruleId, string streamName, System.Collections.Generic.IEnumerable<System.Collections.Generic.IDictionary<string, System.BinaryData>> body, string contentEncoding = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3032
public virtual System.Threading.Tasks.Task<Azure.Response> UploadAsync<T>(string ruleId, string streamName, System.Collections.Generic.IEnumerable<T> logs, Azure.Monitor.Ingestion.LogsUploadOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3133
public virtual Azure.Response Upload<T>(string ruleId, string streamName, System.Collections.Generic.IEnumerable<T> logs, Azure.Monitor.Ingestion.LogsUploadOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3234
}

sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml

Lines changed: 129 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,172 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<doc>
33
<members>
4-
<member name="UploadAsync(string,string,RequestContent,string,RequestContext)">
4+
<member name="UploadAsync(string,string,IEnumerable{IDictionary{string,BinaryData}},string,CancellationToken)">
55
<example>
66
This sample shows how to call UploadAsync.
77
<code><![CDATA[
88
Uri endpoint = new Uri("<endpoint>");
99
TokenCredential credential = new DefaultAzureCredential();
1010
LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
1111
12-
using RequestContent content = RequestContent.Create(new object[]
12+
Response response = await client.UploadAsync("c512b59c-4005-40e2-b13d-ac29cfb46af4", "Custom-TestStream", new IDictionary<string, BinaryData>[]
1313
{
14-
new object()
14+
new Dictionary<string, BinaryData>
15+
{
16+
["Time"] = BinaryData.FromObjectAsJson("2021-12-08T23:51:14.1104269Z"),
17+
["Computer"] = BinaryData.FromObjectAsJson("Computer1"),
18+
["AdditionalContext"] = BinaryData.FromObjectAsJson(new Dictionary<string, object>
19+
{
20+
["$id"] = "55",
21+
["InstanceName"] = "user1",
22+
["TimeZone"] = "Pacific Time",
23+
["Level"] = 4,
24+
["CounterName"] = "AppMetric1",
25+
["CounterValue"] = 15.3F
26+
})
27+
},
28+
new Dictionary<string, BinaryData>
29+
{
30+
["Time"] = BinaryData.FromObjectAsJson("2021-12-08T23:51:14.1104269Z"),
31+
["Computer"] = BinaryData.FromObjectAsJson("Computer2"),
32+
["AdditionalContext"] = BinaryData.FromObjectAsJson(new Dictionary<string, object>
33+
{
34+
["$id"] = "61",
35+
["InstanceName"] = "user2",
36+
["TimeZone"] = "Central Time",
37+
["Level"] = 3,
38+
["CounterName"] = "AppMetric1",
39+
["CounterValue"] = 23.5F
40+
})
41+
}
1542
});
16-
Response response = await client.UploadAsync("<ruleId>", "<streamName>", content);
17-
18-
Console.WriteLine(response.Status);
19-
]]></code>
20-
This sample shows how to call UploadAsync with all parameters and request content.
43+
]]></code></example>
44+
</member>
45+
<member name="Upload(string,string,IEnumerable{IDictionary{string,BinaryData}},string,CancellationToken)">
46+
<example>
47+
This sample shows how to call Upload.
2148
<code><![CDATA[
2249
Uri endpoint = new Uri("<endpoint>");
2350
TokenCredential credential = new DefaultAzureCredential();
2451
LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
2552
26-
using RequestContent content = RequestContent.Create(new object[]
53+
Response response = client.Upload("c512b59c-4005-40e2-b13d-ac29cfb46af4", "Custom-TestStream", new IDictionary<string, BinaryData>[]
2754
{
28-
new object()
55+
new Dictionary<string, BinaryData>
56+
{
57+
["Time"] = BinaryData.FromObjectAsJson("2021-12-08T23:51:14.1104269Z"),
58+
["Computer"] = BinaryData.FromObjectAsJson("Computer1"),
59+
["AdditionalContext"] = BinaryData.FromObjectAsJson(new Dictionary<string, object>
60+
{
61+
["$id"] = "55",
62+
["InstanceName"] = "user1",
63+
["TimeZone"] = "Pacific Time",
64+
["Level"] = 4,
65+
["CounterName"] = "AppMetric1",
66+
["CounterValue"] = 15.3F
67+
})
68+
},
69+
new Dictionary<string, BinaryData>
70+
{
71+
["Time"] = BinaryData.FromObjectAsJson("2021-12-08T23:51:14.1104269Z"),
72+
["Computer"] = BinaryData.FromObjectAsJson("Computer2"),
73+
["AdditionalContext"] = BinaryData.FromObjectAsJson(new Dictionary<string, object>
74+
{
75+
["$id"] = "61",
76+
["InstanceName"] = "user2",
77+
["TimeZone"] = "Central Time",
78+
["Level"] = 3,
79+
["CounterName"] = "AppMetric1",
80+
["CounterValue"] = 23.5F
81+
})
82+
}
2983
});
30-
Response response = await client.UploadAsync("<ruleId>", "<streamName>", content, contentEncoding: "<contentEncoding>");
31-
32-
Console.WriteLine(response.Status);
3384
]]></code></example>
3485
</member>
35-
<member name="Upload(string,string,RequestContent,string,RequestContext)">
86+
<member name="UploadAsync(string,string,RequestContent,string,RequestContext)">
3687
<example>
37-
This sample shows how to call Upload.
88+
This sample shows how to call UploadAsync.
3889
<code><![CDATA[
3990
Uri endpoint = new Uri("<endpoint>");
4091
TokenCredential credential = new DefaultAzureCredential();
4192
LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
4293
4394
using RequestContent content = RequestContent.Create(new object[]
4495
{
45-
new object()
96+
new
97+
{
98+
Time = "2021-12-08T23:51:14.1104269Z",
99+
Computer = "Computer1",
100+
AdditionalContext = new Dictionary<string, object>
101+
{
102+
["$id"] = "55",
103+
["InstanceName"] = "user1",
104+
["TimeZone"] = "Pacific Time",
105+
["Level"] = 4,
106+
["CounterName"] = "AppMetric1",
107+
["CounterValue"] = 15.3F
108+
},
109+
},
110+
new
111+
{
112+
Time = "2021-12-08T23:51:14.1104269Z",
113+
Computer = "Computer2",
114+
AdditionalContext = new Dictionary<string, object>
115+
{
116+
["$id"] = "61",
117+
["InstanceName"] = "user2",
118+
["TimeZone"] = "Central Time",
119+
["Level"] = 3,
120+
["CounterName"] = "AppMetric1",
121+
["CounterValue"] = 23.5F
122+
},
123+
}
46124
});
47-
Response response = client.Upload("<ruleId>", "<streamName>", content);
125+
Response response = await client.UploadAsync("c512b59c-4005-40e2-b13d-ac29cfb46af4", "Custom-TestStream", content);
48126
49127
Console.WriteLine(response.Status);
50-
]]></code>
51-
This sample shows how to call Upload with all parameters and request content.
128+
]]></code></example>
129+
</member>
130+
<member name="Upload(string,string,RequestContent,string,RequestContext)">
131+
<example>
132+
This sample shows how to call Upload.
52133
<code><![CDATA[
53134
Uri endpoint = new Uri("<endpoint>");
54135
TokenCredential credential = new DefaultAzureCredential();
55136
LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
56137
57138
using RequestContent content = RequestContent.Create(new object[]
58139
{
59-
new object()
140+
new
141+
{
142+
Time = "2021-12-08T23:51:14.1104269Z",
143+
Computer = "Computer1",
144+
AdditionalContext = new Dictionary<string, object>
145+
{
146+
["$id"] = "55",
147+
["InstanceName"] = "user1",
148+
["TimeZone"] = "Pacific Time",
149+
["Level"] = 4,
150+
["CounterName"] = "AppMetric1",
151+
["CounterValue"] = 15.3F
152+
},
153+
},
154+
new
155+
{
156+
Time = "2021-12-08T23:51:14.1104269Z",
157+
Computer = "Computer2",
158+
AdditionalContext = new Dictionary<string, object>
159+
{
160+
["$id"] = "61",
161+
["InstanceName"] = "user2",
162+
["TimeZone"] = "Central Time",
163+
["Level"] = 3,
164+
["CounterName"] = "AppMetric1",
165+
["CounterValue"] = 23.5F
166+
},
167+
}
60168
});
61-
Response response = client.Upload("<ruleId>", "<streamName>", content, contentEncoding: "<contentEncoding>");
169+
Response response = client.Upload("c512b59c-4005-40e2-b13d-ac29cfb46af4", "Custom-TestStream", content);
62170
63171
Console.WriteLine(response.Status);
64172
]]></code></example>

sdk/monitor/Azure.Monitor.Ingestion/src/Generated/IngestionClientBuilderExtensions.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.

0 commit comments

Comments
 (0)