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

Audit of Manage Model Classes #206

Merged
merged 1 commit into from
Feb 5, 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
8 changes: 4 additions & 4 deletions Deepgram/Models/Manage/v1/BalanceResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ public record BalanceResponse
/// Balance id
/// </summary>
[JsonPropertyName("balance_id")]
public string BalanceId { get; set; }
public string? BalanceId { get; set; }

/// <summary>
/// Balance amount
/// </summary>
[JsonPropertyName("amount")]
public int Amount { get; set; }
public decimal? Amount { get; set; }

/// <summary>
/// Units of the balance. May use usd or hour, depending on the project billing settings
/// </summary>
[JsonPropertyName("units")]
public string Units { get; set; }
public string? Units { get; set; }

/// <summary>
/// Unique identifier of the purchase order associated with the balance
/// </summary>
[JsonPropertyName("purchase")]
public string Purchase { get; set; }
public string? Purchase { get; set; }
}
9 changes: 9 additions & 0 deletions Deepgram/Models/Manage/v1/Callback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

public record Callback
{
/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("attempts")]
public int? Attempts { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("code")]
public int? Code { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("completed")]
public string? Completed { get; set; }
}
40 changes: 21 additions & 19 deletions Deepgram/Models/Manage/v1/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@ public record Config
[JsonPropertyName("alternatives")]
public int? Alternatives { get; set; }

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

/// <summary>
/// Indicates whether topic detection was requested.
/// </summary>
[JsonPropertyName("detect_topics")]
public bool? DetectTopics { get; set; }

/// <summary>
/// Indicates whether diarization was requested.
/// </summary>
Expand All @@ -23,6 +32,12 @@ public record Config
[JsonPropertyName("keywords")]
public IReadOnlyList<string>? Keywords { get; set; }

/// <summary>
/// Indicates whether InterimResults was associated with the request.
/// </summary>
[JsonPropertyName("interim_results")]
public bool? InterimResults { get; set; }

/// <summary>
/// Language associated with the request.
/// </summary>
Expand All @@ -41,18 +56,6 @@ public record Config
[JsonPropertyName("multichannel")]
public bool? Multichannel { get; set; }

/// <summary>
/// Indicates whether named-entity recognition (NER) was requested.
/// </summary>
[JsonPropertyName("ner")]
public bool? Ner { get; set; }

/// <summary>
/// Indicates whether numeral conversion was requested.
/// </summary>
[JsonPropertyName("numerals")]
public bool? Numerals { get; set; }

/// <summary>
/// Indicates whether filtering profanity was requested.
/// </summary>
Expand All @@ -79,10 +82,10 @@ public record Config
public IReadOnlyList<string>? Search { get; set; }

/// <summary>
/// Indicates whether utterance segmentation was requested.
/// Indicates whether SmartFormat was associated with the request.
/// </summary>
[JsonPropertyName("utterances")]
public bool? Utterances { get; set; }
[JsonPropertyName("smart_format")]
public bool? SmartFormat { get; set; }

/// <summary>
/// ReadOnlyList of translations associated with the request.
Expand All @@ -91,9 +94,8 @@ public record Config
public IReadOnlyList<string>? Translation { get; set; }

/// <summary>
/// Indicates whether topic detection was requested.
/// Indicates whether utterance segmentation was requested.
/// </summary>
[JsonPropertyName("detect_topics")]
public bool? DetectTopics { get; set; }

[JsonPropertyName("utterances")]
public bool? Utterances { get; set; }
}
12 changes: 6 additions & 6 deletions Deepgram/Models/Manage/v1/Details.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public record Details
/// Length of time (in hours) of audio processed in the request.
/// </summary>
[JsonPropertyName("duration")]
public decimal? Duration { get; set; }
public double? Duration { get; set; }

/// <summary>
/// Number of audio files processed in the request.
Expand All @@ -36,29 +36,29 @@ public record Details
/// Model applied when running the request.
/// </summary>
[JsonPropertyName("models")]
public IReadOnlyList<string> Models { get; set; }
public IReadOnlyList<string>? Models { get; set; }

/// <summary>
/// Processing method used when running the request.
/// </summary>
[JsonPropertyName("method")]
public string Method { get; set; }
public string? Method { get; set; }

/// <summary>
/// List of tags applied when running the request.
/// </summary>
[JsonPropertyName("tags")]
public IReadOnlyList<string> Tags { get; set; }
public IReadOnlyList<string>? Tags { get; set; }

/// <summary>
/// List of features used when running the request.
/// </summary>
[JsonPropertyName("features")]
public IReadOnlyList<string> Features { get; set; }
public IReadOnlyList<string>? Features { get; set; }

/// <summary>
/// Configuration used when running the request.<see cref="v1.Config"/>
/// </summary>
[JsonPropertyName("config")]
public Config Config { get; set; }
public Config? Config { get; set; }
}
6 changes: 6 additions & 0 deletions Deepgram/Models/Manage/v1/Invite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

public record Invite
{
/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("email")]
public string? Email { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("scope")]
public string? Scope { get; set; }
}
4 changes: 2 additions & 2 deletions Deepgram/Models/Manage/v1/InviteSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ public class InviteSchema(string email, string scope)
/// email of the person being invited
/// </summary>
[JsonPropertyName("email")]
public string Email { get; set; } = email;
public string? Email { get; set; } = email;

/// <summary>
/// scopes to add for the invited person
/// </summary>
[JsonPropertyName("scope")]
public string Scope { get; set; } = scope;
public string? Scope { get; set; } = scope;

}
16 changes: 13 additions & 3 deletions Deepgram/Models/Manage/v1/Key.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,22 @@ public record Key
[JsonPropertyName("comment")]
public string? Comment { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("scopes")]
public IReadOnlyList<string>? Scopes { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("created")]
public DateTime? Created { get; set; }

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("tags")]
public IReadOnlyList<string>? Tags { get; set; }

[JsonPropertyName("created")]
public string? Created { get; set; }
}

25 changes: 1 addition & 24 deletions Deepgram/Models/Manage/v1/KeyResponse.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
namespace Deepgram.Models.Manage.v1;

public record KeyResponse
public record KeyResponse : Key
{
/// <summary>
/// Unique identifier of the Deepgram API key
/// </summary>
[JsonPropertyName("api_key_id")]
public string ApiKeyId { get; set; }

[JsonPropertyName("key")]
public string Key { get; set; }

/// <summary>
/// Comment for the Deepgram API key
/// </summary>
[JsonPropertyName("comment")]
public string Comment { get; set; }

[JsonPropertyName("scopes")]
public IReadOnlyList<string> Scopes { get; set; }

[JsonPropertyName("tags")]
public IReadOnlyList<string> Tags { get; set; }

[JsonPropertyName("created")]
public DateTime Created { get; set; }
}

6 changes: 2 additions & 4 deletions Deepgram/Models/Manage/v1/KeySchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ public class KeySchema(string comment, List<string> scopes)
/// Comment to describe key
/// </summary>
[JsonPropertyName("comment")]
public string Comment { get; set; } = comment;
public string? Comment { get; set; } = comment;

/// <summary>
/// Scopes of the key
/// </summary>
[JsonPropertyName("scopes")]
public List<string> Scopes { get; set; } = scopes;
public List<string>? Scopes { get; set; } = scopes;

/// <summary>
/// Tag names for key
Expand All @@ -32,6 +32,4 @@ public class KeySchema(string comment, List<string> scopes)
/// </summary>
[JsonPropertyName("time_to_live_in_seconds")]
public int? TimeToLiveInSeconds { get; set; }


}
8 changes: 6 additions & 2 deletions Deepgram/Models/Manage/v1/Member.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ public record Member
/// Email address of member
/// </summary>
[JsonPropertyName("email")]
public string? Email { get; set; } = string.Empty;

public string? Email { get; set; }

/// <summary>
/// Scopes of the key
/// </summary>
[JsonPropertyName("scopes")]
public List<string>? Scopes { get; set; }
}
2 changes: 1 addition & 1 deletion Deepgram/Models/Manage/v1/MemberScopeSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ public class MemberScopeSchema(string scope)
/// Scope to add for member
/// </summary>
[JsonPropertyName("scope")]
public string Scope { get; set; } = scope;
public string? Scope { get; set; } = scope;
}
4 changes: 3 additions & 1 deletion Deepgram/Models/Manage/v1/MembersResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

public record MembersResponse
{
/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("members")]
public IReadOnlyList<Member>? Members { get; set; }
}

2 changes: 1 addition & 1 deletion Deepgram/Models/Manage/v1/MessageResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public record MessageResponse
/// A message denoting the success of the operation
/// </summary>
[JsonPropertyName("message")]
public string Message { get; set; }
public string? Message { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
namespace Deepgram.Models.Manage.v1;

public record UsageModel
public record Model
{
/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; set; }

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

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

/// <summary>
/// TODO
/// </summary>
[JsonPropertyName("model_id")]
public string? ModelId { get; set; }
}
Expand Down
7 changes: 6 additions & 1 deletion Deepgram/Models/Manage/v1/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ public record Project
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; set; }
}

/// <summary>
/// Name of the company
/// </summary>
[JsonPropertyName("company")]
public string? Company { get; set; }
}
20 changes: 2 additions & 18 deletions Deepgram/Models/Manage/v1/ProjectResponse.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
namespace Deepgram.Models.Manage.v1;
public record ProjectResponse
{
/// <summary>
/// Unique identifier of the Deepgram project
/// </summary>
[JsonPropertyName("project_id")]
public string? ProjectId { get; set; }

/// <summary>
/// Name of the Deepgram project
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; set; }

/// <summary>
/// Name of the company associated with the Deepgram project
/// </summary>
[JsonPropertyName("company")]
public string? Company { get; set; }
public record ProjectResponse : Project
{
}
1 change: 0 additions & 1 deletion Deepgram/Models/Manage/v1/ProjectSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ public class ProjectSchema
[JsonPropertyName("company")]
public string? Company { get; set; }
}

Loading
Loading