From bbeeb5e7d729b6148f9ccf2fa4630f5b0c63989b Mon Sep 17 00:00:00 2001 From: dvonthenen Date: Wed, 7 Feb 2024 17:05:40 -0800 Subject: [PATCH] Fix Support Tokens on Manage Endpoints --- Deepgram/Models/Manage/v1/Result.cs | 2 +- Deepgram/Models/Manage/v1/UsageRequest.cs | 57 +++++++++++++++++++ .../Models/Manage/v1/UsageRequestResponse.cs | 50 +--------------- .../Models/Manage/v1/UsageRequestsResponse.cs | 2 +- .../Models/Manage/v1/UsageSummaryResponse.cs | 2 +- 5 files changed, 61 insertions(+), 52 deletions(-) create mode 100644 Deepgram/Models/Manage/v1/UsageRequest.cs diff --git a/Deepgram/Models/Manage/v1/Result.cs b/Deepgram/Models/Manage/v1/Result.cs index 0b82d107..00dbb9e7 100644 --- a/Deepgram/Models/Manage/v1/Result.cs +++ b/Deepgram/Models/Manage/v1/Result.cs @@ -4,7 +4,7 @@ namespace Deepgram.Models.Manage.v1; -public record UsageSummary +public record Result { /// /// Start date for included requests. diff --git a/Deepgram/Models/Manage/v1/UsageRequest.cs b/Deepgram/Models/Manage/v1/UsageRequest.cs new file mode 100644 index 00000000..c3dfe8b5 --- /dev/null +++ b/Deepgram/Models/Manage/v1/UsageRequest.cs @@ -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 +{ + /// + /// Identifier of request. + /// + [JsonPropertyName("request_id")] + public string? RequestId { get; set; } + + /// + /// UUID of the project. + /// + [JsonPropertyName("project_uuid")] + public string? ProjectUUID { get; set; } + + /// + /// Date/time when request was created. + /// + [JsonPropertyName("created")] + public string? Created { get; set; } + + /// + /// Path of endpoint to which request was submitted. + /// + [JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// TODO + /// + [JsonPropertyName("accessor")] + public string? Accessor { get; set; } + + /// + /// Identifier of the API Key with which the request was submitted. + /// + [JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// Response generated by the request . + /// + /// If a response has not yet been generated, this object will be empty. + [JsonPropertyName("response")] + public Response? Response { get; set; } + + /// + /// Only exists if a callback was included in the request. + /// + [JsonPropertyName("callback")] + public Callback? Callback { get; set; } +} diff --git a/Deepgram/Models/Manage/v1/UsageRequestResponse.cs b/Deepgram/Models/Manage/v1/UsageRequestResponse.cs index 5924af49..8dd9ba3c 100644 --- a/Deepgram/Models/Manage/v1/UsageRequestResponse.cs +++ b/Deepgram/Models/Manage/v1/UsageRequestResponse.cs @@ -4,54 +4,6 @@ namespace Deepgram.Models.Manage.v1; -public record UsageRequestResponse +public record UsageRequestResponse : UsageRequest { - /// - /// Identifier of request. - /// - [JsonPropertyName("request_id")] - public string? RequestId { get; set; } - - /// - /// UUID of the project. - /// - [JsonPropertyName("project_uuid")] - public string? ProjectUUID { get; set; } - - /// - /// Date/time when request was created. - /// - [JsonPropertyName("created")] - public string? Created { get; set; } - - /// - /// Path of endpoint to which request was submitted. - /// - [JsonPropertyName("path")] - public string? Path { get; set; } - - /// - /// TODO - /// - [JsonPropertyName("accessor")] - public string? Accessor { get; set; } - - /// - /// Identifier of the API Key with which the request was submitted. - /// - [JsonPropertyName("api_key_id")] - public string? ApiKeyId { get; set; } - - /// - /// Response generated by the request . - /// - /// If a response has not yet been generated, this object will be empty. - [JsonPropertyName("response")] - public Response? Response { get; set; } - - /// - /// Only exists if a callback was included in the request. - /// - [JsonPropertyName("callback")] - public Callback? Callback { get; set; } } diff --git a/Deepgram/Models/Manage/v1/UsageRequestsResponse.cs b/Deepgram/Models/Manage/v1/UsageRequestsResponse.cs index 90948375..6716322a 100644 --- a/Deepgram/Models/Manage/v1/UsageRequestsResponse.cs +++ b/Deepgram/Models/Manage/v1/UsageRequestsResponse.cs @@ -22,5 +22,5 @@ public record UsageRequestsResponse /// TODO /// [JsonPropertyName("requests")] - public IReadOnlyList? Requests { get; set; } + public IReadOnlyList? Requests { get; set; } } diff --git a/Deepgram/Models/Manage/v1/UsageSummaryResponse.cs b/Deepgram/Models/Manage/v1/UsageSummaryResponse.cs index 772fcf49..57e96299 100644 --- a/Deepgram/Models/Manage/v1/UsageSummaryResponse.cs +++ b/Deepgram/Models/Manage/v1/UsageSummaryResponse.cs @@ -28,5 +28,5 @@ public record UsageSummaryResponse /// Result summaries /// [JsonPropertyName("results")] - public IReadOnlyList? Results { get; set; } + public IReadOnlyList? Results { get; set; } }