From bc69aa1453742e4e860a4e5454e3a50020fb4850 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Sep 2026 13:52:56 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...GenerationModelPricingQuantityMeasure.g.cs | 53 +++++++ ...onModelPricingQuantityMeasureNullable.g.cs | 60 ++++++++ ....GenerationModelPricingQuantityRound.g.cs} | 14 +- ...ionModelPricingQuantityRoundNullable.g.cs} | 14 +- .../Shotstack.JsonSerializerContext.g.cs | 15 +- .../Shotstack.JsonSerializerContextTypes.g.cs | 32 ++-- .../Shotstack.Models.GenerationModel.g.cs | 4 +- ...otstack.Models.GenerationModelPricing.g.cs | 50 ++----- ...s.GenerationModelPricingQuantity.Json.g.cs | 141 ++++++++++++++++++ ...Models.GenerationModelPricingQuantity.g.cs | 123 +++++++++++++++ ...GenerationModelPricingQuantityMeasure.g.cs | 52 +++++++ ...s.GenerationModelPricingQuantityRound.g.cs | 46 ++++++ ...s.GenerationModelPricingTieredBy.Json.g.cs | 141 ++++++++++++++++++ ...Models.GenerationModelPricingTieredBy.g.cs | 61 ++++++++ ...ack.Models.GenerationModelPricingUnit.g.cs | 64 -------- src/libs/Shotstack/openapi.json | 86 ++++++++--- 16 files changed, 797 insertions(+), 159 deletions(-) create mode 100644 src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasure.g.cs create mode 100644 src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasureNullable.g.cs rename src/libs/Shotstack/Generated/{Shotstack.JsonConverters.GenerationModelPricingUnit.g.cs => Shotstack.JsonConverters.GenerationModelPricingQuantityRound.g.cs} (78%) rename src/libs/Shotstack/Generated/{Shotstack.JsonConverters.GenerationModelPricingUnitNullable.g.cs => Shotstack.JsonConverters.GenerationModelPricingQuantityRoundNullable.g.cs} (79%) create mode 100644 src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.Json.g.cs create mode 100644 src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.g.cs create mode 100644 src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityMeasure.g.cs create mode 100644 src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityRound.g.cs create mode 100644 src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.Json.g.cs create mode 100644 src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.g.cs delete mode 100644 src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingUnit.g.cs diff --git a/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasure.g.cs b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasure.g.cs new file mode 100644 index 0000000..ccdcc60 --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasure.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Shotstack.JsonConverters +{ + /// + public sealed class GenerationModelPricingQuantityMeasureJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Shotstack.GenerationModelPricingQuantityMeasure Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Shotstack.GenerationModelPricingQuantityMeasureExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Shotstack.GenerationModelPricingQuantityMeasure)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Shotstack.GenerationModelPricingQuantityMeasure); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Shotstack.GenerationModelPricingQuantityMeasure value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Shotstack.GenerationModelPricingQuantityMeasureExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasureNullable.g.cs b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasureNullable.g.cs new file mode 100644 index 0000000..c72dd09 --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityMeasureNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Shotstack.JsonConverters +{ + /// + public sealed class GenerationModelPricingQuantityMeasureNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Shotstack.GenerationModelPricingQuantityMeasure? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Shotstack.GenerationModelPricingQuantityMeasureExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Shotstack.GenerationModelPricingQuantityMeasure)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Shotstack.GenerationModelPricingQuantityMeasure?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Shotstack.GenerationModelPricingQuantityMeasure? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Shotstack.GenerationModelPricingQuantityMeasureExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingUnit.g.cs b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityRound.g.cs similarity index 78% rename from src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingUnit.g.cs rename to src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityRound.g.cs index 37544c6..cf352a7 100644 --- a/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingUnit.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityRound.g.cs @@ -3,10 +3,10 @@ namespace Shotstack.JsonConverters { /// - public sealed class GenerationModelPricingUnitJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class GenerationModelPricingQuantityRoundJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Shotstack.GenerationModelPricingUnit Read( + public override global::Shotstack.GenerationModelPricingQuantityRound Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class GenerationModelPricingUnitJsonConverter : global::System.Tex var stringValue = reader.GetString(); if (stringValue != null) { - return global::Shotstack.GenerationModelPricingUnitExtensions.ToEnum(stringValue) ?? default; + return global::Shotstack.GenerationModelPricingQuantityRoundExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class GenerationModelPricingUnitJsonConverter : global::System.Tex case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Shotstack.GenerationModelPricingUnit)numValue; + return (global::Shotstack.GenerationModelPricingQuantityRound)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Shotstack.GenerationModelPricingUnit); + return default(global::Shotstack.GenerationModelPricingQuantityRound); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class GenerationModelPricingUnitJsonConverter : global::System.Tex /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Shotstack.GenerationModelPricingUnit value, + global::Shotstack.GenerationModelPricingQuantityRound value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Shotstack.GenerationModelPricingUnitExtensions.ToValueString(value)); + writer.WriteStringValue(global::Shotstack.GenerationModelPricingQuantityRoundExtensions.ToValueString(value)); } } } diff --git a/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingUnitNullable.g.cs b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityRoundNullable.g.cs similarity index 79% rename from src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingUnitNullable.g.cs rename to src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityRoundNullable.g.cs index d63df0f..dfff833 100644 --- a/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingUnitNullable.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.JsonConverters.GenerationModelPricingQuantityRoundNullable.g.cs @@ -3,10 +3,10 @@ namespace Shotstack.JsonConverters { /// - public sealed class GenerationModelPricingUnitNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class GenerationModelPricingQuantityRoundNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Shotstack.GenerationModelPricingUnit? Read( + public override global::Shotstack.GenerationModelPricingQuantityRound? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class GenerationModelPricingUnitNullableJsonConverter : global::Sy var stringValue = reader.GetString(); if (stringValue != null) { - return global::Shotstack.GenerationModelPricingUnitExtensions.ToEnum(stringValue); + return global::Shotstack.GenerationModelPricingQuantityRoundExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class GenerationModelPricingUnitNullableJsonConverter : global::Sy case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Shotstack.GenerationModelPricingUnit)numValue; + return (global::Shotstack.GenerationModelPricingQuantityRound)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Shotstack.GenerationModelPricingUnit?); + return default(global::Shotstack.GenerationModelPricingQuantityRound?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class GenerationModelPricingUnitNullableJsonConverter : global::Sy /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Shotstack.GenerationModelPricingUnit? value, + global::Shotstack.GenerationModelPricingQuantityRound? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Shotstack.GenerationModelPricingUnitExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Shotstack.GenerationModelPricingQuantityRoundExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContext.g.cs b/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContext.g.cs index 7e24946..b5188fe 100644 --- a/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContext.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContext.g.cs @@ -325,9 +325,13 @@ namespace Shotstack typeof(global::Shotstack.JsonConverters.GenerationResponseStatusNullableJsonConverter), - typeof(global::Shotstack.JsonConverters.GenerationModelPricingUnitJsonConverter), + typeof(global::Shotstack.JsonConverters.GenerationModelPricingQuantityMeasureJsonConverter), - typeof(global::Shotstack.JsonConverters.GenerationModelPricingUnitNullableJsonConverter), + typeof(global::Shotstack.JsonConverters.GenerationModelPricingQuantityMeasureNullableJsonConverter), + + typeof(global::Shotstack.JsonConverters.GenerationModelPricingQuantityRoundJsonConverter), + + typeof(global::Shotstack.JsonConverters.GenerationModelPricingQuantityRoundNullableJsonConverter), typeof(global::Shotstack.JsonConverters.GenerationModelTypeJsonConverter), @@ -618,9 +622,11 @@ namespace Shotstack [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationResponseStatus), TypeInfoPropertyName = "GenerationResponseStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelPricing))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelPricingUnit), TypeInfoPropertyName = "GenerationModelPricingUnit2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.OneOf), TypeInfoPropertyName = "OneOfDoubleObject2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelPricingTieredBy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelPricingQuantity))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelPricingQuantityMeasure), TypeInfoPropertyName = "GenerationModelPricingQuantityMeasure2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelPricingQuantityRound), TypeInfoPropertyName = "GenerationModelPricingQuantityRound2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModel))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelType), TypeInfoPropertyName = "GenerationModelType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Shotstack.GenerationModelListResponse))] @@ -643,7 +649,6 @@ namespace Shotstack [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { diff --git a/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContextTypes.g.cs b/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContextTypes.g.cs index 1334ded..ace7b3e 100644 --- a/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContextTypes.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.JsonSerializerContextTypes.g.cs @@ -989,39 +989,47 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Shotstack.GenerationModelPricingUnit? Type239 { get; set; } + public global::Shotstack.OneOf? Type239 { get; set; } /// /// /// - public global::Shotstack.OneOf? Type240 { get; set; } + public global::Shotstack.GenerationModelPricingTieredBy? Type240 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type241 { get; set; } + public global::Shotstack.GenerationModelPricingQuantity? Type241 { get; set; } /// /// /// - public global::Shotstack.GenerationModel? Type242 { get; set; } + public global::Shotstack.GenerationModelPricingQuantityMeasure? Type242 { get; set; } /// /// /// - public global::Shotstack.GenerationModelType? Type243 { get; set; } + public global::Shotstack.GenerationModelPricingQuantityRound? Type243 { get; set; } /// /// /// - public global::Shotstack.GenerationModelListResponse? Type244 { get; set; } + public global::Shotstack.GenerationModel? Type244 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type245 { get; set; } + public global::Shotstack.GenerationModelType? Type245 { get; set; } /// /// /// - public global::Shotstack.PostGenerateRequest? Type246 { get; set; } + public global::Shotstack.GenerationModelListResponse? Type246 { get; set; } /// /// /// - public global::Shotstack.OneOf? Type247 { get; set; } + public global::System.Collections.Generic.IList? Type247 { get; set; } + /// + /// + /// + public global::Shotstack.PostGenerateRequest? Type248 { get; set; } + /// + /// + /// + public global::Shotstack.OneOf? Type249 { get; set; } /// /// @@ -1090,10 +1098,6 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType16 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType17 { get; set; } + public global::System.Collections.Generic.List? ListType16 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModel.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModel.g.cs index 433d9a3..7ce0edc 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModel.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModel.g.cs @@ -28,7 +28,7 @@ public sealed partial class GenerationModel public required global::Shotstack.GenerationModelType Type { get; set; } /// - /// What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it. + /// What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it. /// [global::System.Text.Json.Serialization.JsonPropertyName("pricing")] public global::Shotstack.GenerationModelPricing? Pricing { get; set; } @@ -57,7 +57,7 @@ public sealed partial class GenerationModel /// Example: video /// /// - /// What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it. + /// What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it. /// /// /// JSON Schema for the model's `options` object. Only returned for a single model, or for a list requested with `expand=options`. Values outside this schema are rejected. diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricing.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricing.g.cs index 61a64d1..58aed32 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricing.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricing.g.cs @@ -4,22 +4,12 @@ namespace Shotstack { /// - /// What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it. + /// What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it. /// public sealed partial class GenerationModelPricing { /// - /// What one unit is. `render` means the whole generation counts as one unit, whatever its size.
- /// Example: second - ///
- /// second - [global::System.Text.Json.Serialization.JsonPropertyName("unit")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.GenerationModelPricingUnitJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Shotstack.GenerationModelPricingUnit Unit { get; set; } - - /// - /// Credits per unit. A number when the rate is flat, or an object keyed by the values of the options named in `tieredBy`.
+ /// Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.
/// Example: {"480p":0.9375,"720p":1.8962,"1080p":4.2625} ///
/// {"480p":0.9375,"720p":1.8962,"1080p":4.2625} @@ -29,20 +19,16 @@ public sealed partial class GenerationModelPricing public required global::Shotstack.OneOf Credits { get; set; } /// - /// The options whose values select the rate, outermost first. Absent when `credits` is a single number.
- /// Example: [resolution] + /// The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed. ///
- /// [resolution] [global::System.Text.Json.Serialization.JsonPropertyName("tieredBy")] - public global::System.Collections.Generic.IList? TieredBy { get; set; } + public global::Shotstack.GenerationModelPricingTieredBy? TieredBy { get; set; } /// - /// The fewest units a generation is charged for, when a model has a minimum charge.
- /// Example: 0.1F + /// How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit. ///
- /// 0.1F - [global::System.Text.Json.Serialization.JsonPropertyName("minUnits")] - public double? MinUnits { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("quantity")] + public global::Shotstack.GenerationModelPricingQuantity? Quantity { get; set; } /// /// The date this rate took effect, or `legacy` for a rate that predates dated pricing.
@@ -62,12 +48,8 @@ public sealed partial class GenerationModelPricing /// /// Initializes a new instance of the class. /// - /// - /// What one unit is. `render` means the whole generation counts as one unit, whatever its size.
- /// Example: second - /// /// - /// Credits per unit. A number when the rate is flat, or an object keyed by the values of the options named in `tieredBy`.
+ /// Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.
/// Example: {"480p":0.9375,"720p":1.8962,"1080p":4.2625} /// /// @@ -75,27 +57,23 @@ public sealed partial class GenerationModelPricing /// Example: 2026-08-13 /// /// - /// The options whose values select the rate, outermost first. Absent when `credits` is a single number.
- /// Example: [resolution] + /// The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed. /// - /// - /// The fewest units a generation is charged for, when a model has a minimum charge.
- /// Example: 0.1F + /// + /// How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GenerationModelPricing( - global::Shotstack.GenerationModelPricingUnit unit, global::Shotstack.OneOf credits, string effectiveFrom, - global::System.Collections.Generic.IList? tieredBy, - double? minUnits) + global::Shotstack.GenerationModelPricingTieredBy? tieredBy, + global::Shotstack.GenerationModelPricingQuantity? quantity) { - this.Unit = unit; this.Credits = credits; this.TieredBy = tieredBy; - this.MinUnits = minUnits; + this.Quantity = quantity; this.EffectiveFrom = effectiveFrom ?? throw new global::System.ArgumentNullException(nameof(effectiveFrom)); } diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.Json.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.Json.g.cs new file mode 100644 index 0000000..0e62c04 --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Shotstack +{ + public sealed partial class GenerationModelPricingQuantity + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Shotstack.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Shotstack.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Shotstack.GenerationModelPricingQuantity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Shotstack.GenerationModelPricingQuantity), + jsonSerializerContext) as global::Shotstack.GenerationModelPricingQuantity; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Shotstack.GenerationModelPricingQuantity? FromJson( + string json) + { + return FromJson( + json, + global::Shotstack.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Shotstack.GenerationModelPricingQuantity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Shotstack.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Shotstack.GenerationModelPricingQuantity), + jsonSerializerContext).ConfigureAwait(false)) as global::Shotstack.GenerationModelPricingQuantity; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Shotstack.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Shotstack.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.g.cs new file mode 100644 index 0000000..b3f65f5 --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantity.g.cs @@ -0,0 +1,123 @@ + +#nullable enable + +namespace Shotstack +{ + /// + /// How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit. + /// + public sealed partial class GenerationModelPricingQuantity + { + /// + /// What the count is taken from, and the scale it is measured in.
+ /// Example: clipSeconds + ///
+ /// clipSeconds + [global::System.Text.Json.Serialization.JsonPropertyName("measure")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.GenerationModelPricingQuantityMeasureJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Shotstack.GenerationModelPricingQuantityMeasure Measure { get; set; } + + /// + /// How many of `measure` make one billable unit.
+ /// Example: 60 + ///
+ /// 60 + [global::System.Text.Json.Serialization.JsonPropertyName("per")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Per { get; set; } + + /// + /// Fewest accepted. A smaller request is charged at this.
+ /// Example: 3 + ///
+ /// 3 + [global::System.Text.Json.Serialization.JsonPropertyName("min")] + public double? Min { get; set; } + + /// + /// Most accepted. A larger request is charged at this.
+ /// Example: 600 + ///
+ /// 600 + [global::System.Text.Json.Serialization.JsonPropertyName("max")] + public double? Max { get; set; } + + /// + /// Assumed when the request carries no value.
+ /// Example: 30 + ///
+ /// 30 + [global::System.Text.Json.Serialization.JsonPropertyName("default")] + public double? Default { get; set; } + + /// + /// Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.
+ /// Example: up + ///
+ /// up + [global::System.Text.Json.Serialization.JsonPropertyName("round")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.GenerationModelPricingQuantityRoundJsonConverter))] + public global::Shotstack.GenerationModelPricingQuantityRound? Round { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// What the count is taken from, and the scale it is measured in.
+ /// Example: clipSeconds + /// + /// + /// How many of `measure` make one billable unit.
+ /// Example: 60 + /// + /// + /// Fewest accepted. A smaller request is charged at this.
+ /// Example: 3 + /// + /// + /// Most accepted. A larger request is charged at this.
+ /// Example: 600 + /// + /// + /// Assumed when the request carries no value.
+ /// Example: 30 + /// + /// + /// Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.
+ /// Example: up + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GenerationModelPricingQuantity( + global::Shotstack.GenerationModelPricingQuantityMeasure measure, + double per, + double? min, + double? max, + double? @default, + global::Shotstack.GenerationModelPricingQuantityRound? round) + { + this.Measure = measure; + this.Per = per; + this.Min = min; + this.Max = max; + this.Default = @default; + this.Round = round; + } + + /// + /// Initializes a new instance of the class. + /// + public GenerationModelPricingQuantity() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityMeasure.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityMeasure.g.cs new file mode 100644 index 0000000..3a82d7e --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityMeasure.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace Shotstack +{ + /// + /// What the count is taken from, and the scale it is measured in.
+ /// Example: clipSeconds + ///
+ public enum GenerationModelPricingQuantityMeasure + { + /// + /// + /// + ClipSeconds, + /// + /// + /// + PromptCharacters, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerationModelPricingQuantityMeasureExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerationModelPricingQuantityMeasure value) + { + return value switch + { + GenerationModelPricingQuantityMeasure.ClipSeconds => "clipSeconds", + GenerationModelPricingQuantityMeasure.PromptCharacters => "promptCharacters", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerationModelPricingQuantityMeasure? ToEnum(string value) + { + return value switch + { + "clipSeconds" => GenerationModelPricingQuantityMeasure.ClipSeconds, + "promptCharacters" => GenerationModelPricingQuantityMeasure.PromptCharacters, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityRound.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityRound.g.cs new file mode 100644 index 0000000..547e369 --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingQuantityRound.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace Shotstack +{ + /// + /// Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.
+ /// Example: up + ///
+ public enum GenerationModelPricingQuantityRound + { + /// + /// + /// + Up, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerationModelPricingQuantityRoundExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerationModelPricingQuantityRound value) + { + return value switch + { + GenerationModelPricingQuantityRound.Up => "up", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerationModelPricingQuantityRound? ToEnum(string value) + { + return value switch + { + "up" => GenerationModelPricingQuantityRound.Up, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.Json.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.Json.g.cs new file mode 100644 index 0000000..75cd5ae --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Shotstack +{ + public sealed partial class GenerationModelPricingTieredBy + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Shotstack.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Shotstack.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Shotstack.GenerationModelPricingTieredBy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Shotstack.GenerationModelPricingTieredBy), + jsonSerializerContext) as global::Shotstack.GenerationModelPricingTieredBy; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Shotstack.GenerationModelPricingTieredBy? FromJson( + string json) + { + return FromJson( + json, + global::Shotstack.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Shotstack.GenerationModelPricingTieredBy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Shotstack.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Shotstack.GenerationModelPricingTieredBy), + jsonSerializerContext).ConfigureAwait(false)) as global::Shotstack.GenerationModelPricingTieredBy; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Shotstack.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Shotstack.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.g.cs new file mode 100644 index 0000000..8b011a7 --- /dev/null +++ b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingTieredBy.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Shotstack +{ + /// + /// The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed. + /// + public sealed partial class GenerationModelPricingTieredBy + { + /// + /// Example: resolution + /// + /// resolution + [global::System.Text.Json.Serialization.JsonPropertyName("option")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Option { get; set; } + + /// + /// Example: 720p + /// + /// 720p + [global::System.Text.Json.Serialization.JsonPropertyName("default")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Default { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Example: resolution + /// + /// + /// Example: 720p + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GenerationModelPricingTieredBy( + string option, + string @default) + { + this.Option = option ?? throw new global::System.ArgumentNullException(nameof(option)); + this.Default = @default ?? throw new global::System.ArgumentNullException(nameof(@default)); + } + + /// + /// Initializes a new instance of the class. + /// + public GenerationModelPricingTieredBy() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingUnit.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingUnit.g.cs deleted file mode 100644 index c06ffcd..0000000 --- a/src/libs/Shotstack/Generated/Shotstack.Models.GenerationModelPricingUnit.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#nullable enable - -namespace Shotstack -{ - /// - /// What one unit is. `render` means the whole generation counts as one unit, whatever its size.
- /// Example: second - ///
- public enum GenerationModelPricingUnit - { - /// - /// - /// - Minute, - /// - /// - /// - Render, - /// - /// - /// - Second, - /// - /// - /// - ThousandCharacters, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class GenerationModelPricingUnitExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this GenerationModelPricingUnit value) - { - return value switch - { - GenerationModelPricingUnit.Minute => "minute", - GenerationModelPricingUnit.Render => "render", - GenerationModelPricingUnit.Second => "second", - GenerationModelPricingUnit.ThousandCharacters => "thousandCharacters", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static GenerationModelPricingUnit? ToEnum(string value) - { - return value switch - { - "minute" => GenerationModelPricingUnit.Minute, - "render" => GenerationModelPricingUnit.Render, - "second" => GenerationModelPricingUnit.Second, - "thousandCharacters" => GenerationModelPricingUnit.ThousandCharacters, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Shotstack/openapi.json b/src/libs/Shotstack/openapi.json index e94f170..60b3840 100644 --- a/src/libs/Shotstack/openapi.json +++ b/src/libs/Shotstack/openapi.json @@ -5741,21 +5741,10 @@ ] }, "GenerationModelPricing": { - "description": "What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.", + "description": "What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.", "properties": { - "unit": { - "description": "What one unit is. `render` means the whole generation counts as one unit, whatever its size.", - "type": "string", - "enum": [ - "render", - "second", - "minute", - "thousandCharacters" - ], - "example": "second" - }, "credits": { - "description": "Credits per unit. A number when the rate is flat, or an object keyed by the values of the options named in `tieredBy`.", + "description": "Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.", "oneOf": [ { "type": "number" @@ -5772,19 +5761,69 @@ } }, "tieredBy": { - "description": "The options whose values select the rate, outermost first. Absent when `credits` is a single number.", - "type": "array", - "items": { - "type": "string" + "description": "The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed.", + "type": "object", + "properties": { + "option": { + "type": "string", + "example": "resolution" + }, + "default": { + "type": "string", + "example": "720p" + } }, - "example": [ - "resolution" + "required": [ + "option", + "default" ] }, - "minUnits": { - "description": "The fewest units a generation is charged for, when a model has a minimum charge.", - "type": "number", - "example": 0.1 + "quantity": { + "description": "How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit.", + "type": "object", + "properties": { + "measure": { + "description": "What the count is taken from, and the scale it is measured in.", + "type": "string", + "enum": [ + "clipSeconds", + "promptCharacters" + ], + "example": "clipSeconds" + }, + "per": { + "description": "How many of `measure` make one billable unit.", + "type": "number", + "example": 60 + }, + "min": { + "description": "Fewest accepted. A smaller request is charged at this.", + "type": "number", + "example": 3 + }, + "max": { + "description": "Most accepted. A larger request is charged at this.", + "type": "number", + "example": 600 + }, + "default": { + "description": "Assumed when the request carries no value.", + "type": "number", + "example": 30 + }, + "round": { + "description": "Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.", + "type": "string", + "enum": [ + "up" + ], + "example": "up" + } + }, + "required": [ + "measure", + "per" + ] }, "effectiveFrom": { "description": "The date this rate took effect, or `legacy` for a rate that predates dated pricing.", @@ -5793,7 +5832,6 @@ } }, "required": [ - "unit", "credits", "effectiveFrom" ],