openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
fe4d6cf1ccfea48fa5c2baf67103495ac9b459dd

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

OpenAI/src/Generated/CollectionResults/AudioClientGetVoiceConsentsAsyncCollectionResult.cs

43lines · modecode

1// <auto-generated/>
2
3#nullable disable
4
5using System.ClientModel;
6using System.ClientModel.Primitives;
7using System.Collections.Generic;
8using System.Threading.Tasks;
9
10namespace OpenAI.Audio
11{
12 internal partial class AudioClientGetVoiceConsentsAsyncCollectionResult : AsyncCollectionResult
13 {
14 private readonly AudioClient _client;
15 private readonly string _after;
16 private readonly int? _limit;
17 private readonly RequestOptions _options;
18
19 public AudioClientGetVoiceConsentsAsyncCollectionResult(AudioClient client, string after, int? limit, RequestOptions options)
20 {
21 _client = client;
22 _after = after;
23 _limit = limit;
24 _options = options;
25 }
26
27 public override async IAsyncEnumerable<ClientResult> GetRawPagesAsync()
28 {
29 PipelineMessage message = _client.CreateGetVoiceConsentsRequest(_after, _limit, _options);
30 yield return await GetNextResponseAsync(message).ConfigureAwait(false);
31 }
32
33 public override ContinuationToken GetContinuationToken(ClientResult page)
34 {
35 return null;
36 }
37
38 private async ValueTask<ClientResult> GetNextResponseAsync(PipelineMessage message)
39 {
40 return ClientResult.FromResponse(await _client.Pipeline.ProcessMessageAsync(message, _options).ConfigureAwait(false));
41 }
42 }
43}
44