-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fixed generation for implicit array enums.
- Loading branch information
Showing
147 changed files
with
2,554 additions
and
3,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...ests/Snapshots/Replicate/NewtonsoftJson/_#G.Api.EndPoints.CancelPredictions.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//HintName: G.Api.EndPoints.CancelPredictions.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class Api | ||
{ | ||
/// <summary> | ||
/// Cancel a prediction | ||
/// </summary> | ||
/// <param name="predictionId"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task CancelPredictionsAsync( | ||
string predictionId, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Post, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/predictions/{predictionId}/cancel", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...tTests/Snapshots/Replicate/NewtonsoftJson/_#G.Api.EndPoints.CancelTrainings.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//HintName: G.Api.EndPoints.CancelTrainings.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class Api | ||
{ | ||
/// <summary> | ||
/// Cancel a training | ||
/// </summary> | ||
/// <param name="trainingId"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task CancelTrainingsAsync( | ||
string trainingId, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Post, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/trainings/{trainingId}/cancel", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ests/Snapshots/Replicate/NewtonsoftJson/_#G.Api.EndPoints.CreateDeployments.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//HintName: G.Api.EndPoints.CreateDeployments.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class Api | ||
{ | ||
/// <summary> | ||
/// Create a deployment | ||
/// </summary> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task CreateDeploymentsAsync( | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Post, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + "/deployments", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
79 changes: 0 additions & 79 deletions
79
...pshotTests/Snapshots/Replicate/NewtonsoftJson/_#G.Api.EndPoints.CreateModel.g.verified.cs
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...shotTests/Snapshots/Replicate/NewtonsoftJson/_#G.Api.EndPoints.CreateModels.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//HintName: G.Api.EndPoints.CreateModels.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class Api | ||
{ | ||
/// <summary> | ||
/// Create a model | ||
/// </summary> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task CreateModelsAsync( | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Post, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + "/models", global::System.UriKind.RelativeOrAbsolute)); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
...ots/Replicate/NewtonsoftJson/_#G.Api.EndPoints.CreatePredictionsDeployments.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
//HintName: G.Api.EndPoints.CreatePredictionsDeployments.g.cs | ||
|
||
#nullable enable | ||
|
||
namespace G | ||
{ | ||
public partial class Api | ||
{ | ||
/// <summary> | ||
/// Create a prediction using a deployment | ||
/// </summary> | ||
/// <param name="deploymentOwner"></param> | ||
/// <param name="deploymentName"></param> | ||
/// <param name="request"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task CreatePredictionsDeploymentsAsync( | ||
string deploymentOwner, | ||
string deploymentName, | ||
PredictionRequest request, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
request = request ?? throw new global::System.ArgumentNullException(nameof(request)); | ||
|
||
using var httpRequest = new global::System.Net.Http.HttpRequestMessage( | ||
method: global::System.Net.Http.HttpMethod.Post, | ||
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri + $"/deployments/{deploymentOwner}/{deploymentName}/predictions", global::System.UriKind.RelativeOrAbsolute)); | ||
httpRequest.Content = new global::System.Net.Http.StringContent( | ||
content: global::Newtonsoft.Json.JsonConvert.SerializeObject(request), | ||
encoding: global::System.Text.Encoding.UTF8, | ||
mediaType: "application/json"); | ||
|
||
using var response = await _httpClient.SendAsync( | ||
request: httpRequest, | ||
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
response.EnsureSuccessStatusCode(); | ||
} | ||
|
||
/// <summary> | ||
/// Create a prediction using a deployment | ||
/// </summary> | ||
/// <param name="deploymentOwner"></param> | ||
/// <param name="deploymentName"></param> | ||
/// <param name="input"></param> | ||
/// <param name="stream"></param> | ||
/// <param name="webhook"></param> | ||
/// <param name="webhookEventsFilter"></param> | ||
/// <param name="cancellationToken">The token to cancel the operation with</param> | ||
/// <exception cref="global::System.InvalidOperationException"></exception> | ||
public async global::System.Threading.Tasks.Task CreatePredictionsDeploymentsAsync( | ||
string deploymentOwner, | ||
string deploymentName, | ||
PredictionRequestInput input, | ||
bool stream = default, | ||
string? webhook = default, | ||
global::System.Collections.Generic.IList<PredictionRequestWebhookEventsFilter?>? webhookEventsFilter = default, | ||
global::System.Threading.CancellationToken cancellationToken = default) | ||
{ | ||
var request = new PredictionRequest | ||
{ | ||
Input = input, | ||
Stream = stream, | ||
Webhook = webhook, | ||
WebhookEventsFilter = webhookEventsFilter, | ||
}; | ||
|
||
await CreatePredictionsDeploymentsAsync( | ||
deploymentOwner: deploymentOwner, | ||
deploymentName: deploymentName, | ||
request: request, | ||
cancellationToken: cancellationToken).ConfigureAwait(false); | ||
} | ||
} | ||
} |
Oops, something went wrong.