Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/Refactor Support Tokens on Manage Endpoints #226

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Deepgram/Models/Manage/v1/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Deepgram.Models.Manage.v1;

public record UsageSummary
public record Result
{
/// <summary>
/// Start date for included requests.
Expand Down
57 changes: 57 additions & 0 deletions Deepgram/Models/Manage/v1/UsageRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright 2021-2024 Deepgram .NET SDK contributors. All Rights Reserved.
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

namespace Deepgram.Models.Manage.v1;

public record UsageRequest
{
/// <summary>
/// Identifier of request.
/// </summary>
[JsonPropertyName("request_id")]
public string? RequestId { get; set; }

/// <summary>
/// UUID of the project.
/// </summary>
[JsonPropertyName("project_uuid")]
public string? ProjectUUID { get; set; }

/// <summary>
/// Date/time when request was created.
/// </summary>
[JsonPropertyName("created")]
public string? Created { get; set; }

/// <summary>
/// Path of endpoint to which request was submitted.
/// </summary>
[JsonPropertyName("path")]
public string? Path { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("accessor")]
public string? Accessor { get; set; }

/// <summary>
/// Identifier of the API Key with which the request was submitted.
/// </summary>
[JsonPropertyName("api_key_id")]
public string? ApiKeyId { get; set; }

/// <summary>
/// Response generated by the request <see cref="Response"/>.
/// </summary>
/// <remarks>If a response has not yet been generated, this object will be empty.</remarks>
[JsonPropertyName("response")]
public Response? Response { get; set; }

/// <summary>
/// Only exists if a callback <see cref="Callback"/> was included in the request.
/// </summary>
[JsonPropertyName("callback")]
public Callback? Callback { get; set; }
}
50 changes: 1 addition & 49 deletions Deepgram/Models/Manage/v1/UsageRequestResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,6 @@

namespace Deepgram.Models.Manage.v1;

public record UsageRequestResponse
public record UsageRequestResponse : UsageRequest
{
/// <summary>
/// Identifier of request.
/// </summary>
[JsonPropertyName("request_id")]
public string? RequestId { get; set; }

/// <summary>
/// UUID of the project.
/// </summary>
[JsonPropertyName("project_uuid")]
public string? ProjectUUID { get; set; }

/// <summary>
/// Date/time when request was created.
/// </summary>
[JsonPropertyName("created")]
public string? Created { get; set; }

/// <summary>
/// Path of endpoint to which request was submitted.
/// </summary>
[JsonPropertyName("path")]
public string? Path { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("accessor")]
public string? Accessor { get; set; }

/// <summary>
/// Identifier of the API Key with which the request was submitted.
/// </summary>
[JsonPropertyName("api_key_id")]
public string? ApiKeyId { get; set; }

/// <summary>
/// Response generated by the request <see cref="Response"/>.
/// </summary>
/// <remarks>If a response has not yet been generated, this object will be empty.</remarks>
[JsonPropertyName("response")]
public Response? Response { get; set; }

/// <summary>
/// Only exists if a callback <see cref="Callback"/> was included in the request.
/// </summary>
[JsonPropertyName("callback")]
public Callback? Callback { get; set; }
}
2 changes: 1 addition & 1 deletion Deepgram/Models/Manage/v1/UsageRequestsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ public record UsageRequestsResponse
/// TODO
/// </summary>
[JsonPropertyName("requests")]
public IReadOnlyList<UsageRequestResponse>? Requests { get; set; }
public IReadOnlyList<UsageRequest>? Requests { get; set; }
}
2 changes: 1 addition & 1 deletion Deepgram/Models/Manage/v1/UsageSummaryResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ public record UsageSummaryResponse
/// Result summaries <see cref="UsageSummary"/>
/// </summary>
[JsonPropertyName("results")]
public IReadOnlyList<UsageSummary>? Results { get; set; }
public IReadOnlyList<Result>? Results { get; set; }
}
Loading