From b03e6cf08bbb9dff47b39123461add5a0f168fc4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 26 Oct 2026 20:18:36 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Commands/APIEndpointsApiGroupCommand.g.cs | 1 + ...intsImportDriveMediaCommandApiCommand.g.cs | 147 ++++ ...ApiEndpointsListJobsCommandApiCommand.g.cs | 2 +- ...t.ApiEndpointsClient.ImportDriveMedia.g.cs | 705 ++++++++++++++++++ .../Descript.ApiEndpointsClient.ListJobs.g.cs | 4 +- ....IApiEndpointsClient.ImportDriveMedia.g.cs | 97 +++ ...Descript.IApiEndpointsClient.ListJobs.g.cs | 4 +- ...ers.DriveMediaImportJobStatusJobState.g.cs | 53 ++ ...eMediaImportJobStatusJobStateNullable.g.cs | 60 ++ ...ters.DriveMediaImportJobStatusJobType.g.cs | 53 ++ ...veMediaImportJobStatusJobTypeNullable.g.cs | 60 ++ ...StatusResultVariant1MediaStatusStatus.g.cs | 53 ++ ...sultVariant1MediaStatusStatusNullable.g.cs | 60 ++ ...iaImportJobStatusResultVariant1Status.g.cs | 53 ++ ...JobStatusResultVariant1StatusNullable.g.cs | 60 ++ ...iaImportJobStatusResultVariant2Status.g.cs | 53 ++ ...JobStatusResultVariant2StatusNullable.g.cs | 60 ++ .../Descript.JsonConverters.JobStatus.g.cs | 15 + .../Descript.JsonConverters.OneOf2.g.cs | 177 +++++ .../Descript.JsonConverters.Result3.g.cs | 28 +- ...s => Descript.JsonConverters.Result4.g.cs} | 36 +- .../Descript.JsonSerializerContext.g.cs | 57 +- .../Descript.JsonSerializerContextTypes.g.cs | 296 +++++--- .../Descript.Models.AgentJobStatus.g.cs | 6 +- ...Models.DriveMediaImportJobStatus.Json.g.cs | 141 ++++ ...ript.Models.DriveMediaImportJobStatus.g.cs | 150 ++++ ...els.DriveMediaImportJobStatusJobState.g.cs | 63 ++ ...dels.DriveMediaImportJobStatusJobType.g.cs | 45 ++ ...riveMediaImportJobStatusProgress.Json.g.cs | 141 ++++ ...els.DriveMediaImportJobStatusProgress.g.cs | 102 +++ ...diaImportJobStatusResultVariant1.Json.g.cs | 141 ++++ ...iveMediaImportJobStatusResultVariant1.g.cs | 63 ++ ...bStatusResultVariant1MediaStatus.Json.g.cs | 141 ++++ ...ortJobStatusResultVariant1MediaStatus.g.cs | 19 + ...StatusResultVariant1MediaStatus2.Json.g.cs | 141 ++++ ...rtJobStatusResultVariant1MediaStatus2.g.cs | 63 ++ ...StatusResultVariant1MediaStatusStatus.g.cs | 51 ++ ...iaImportJobStatusResultVariant1Status.g.cs | 51 ++ ...diaImportJobStatusResultVariant2.Json.g.cs | 141 ++++ ...iveMediaImportJobStatusResultVariant2.g.cs | 54 ++ ...iaImportJobStatusResultVariant2Status.g.cs | 45 ++ ...t.Models.DriveMediaImportRequest.Json.g.cs | 141 ++++ ...script.Models.DriveMediaImportRequest.g.cs | 73 ++ ....DriveMediaImportRequestAddMedia.Json.g.cs | 141 ++++ ...odels.DriveMediaImportRequestAddMedia.g.cs | 21 + ....Models.DriveMediaImportResponse.Json.g.cs | 141 ++++ ...cript.Models.DriveMediaImportResponse.g.cs | 96 +++ ...iveMediaImportResponseUploadUrls.Json.g.cs | 141 ++++ ...ls.DriveMediaImportResponseUploadUrls.g.cs | 19 + ...veMediaImportResponseUploadUrls2.Json.g.cs | 141 ++++ ...s.DriveMediaImportResponseUploadUrls2.g.cs | 68 ++ .../Generated/Descript.Models.JobStatus.g.cs | 109 ++- ....Models.JobStatusDiscriminatorJobType.g.cs | 6 + .../Descript.Models.ListJobsType.g.cs | 12 + ...ript.Models.MediaUploadReference.Json.g.cs | 141 ++++ .../Descript.Models.MediaUploadReference.g.cs | 70 ++ ...escript.Models.MediaUrlReference.Json.g.cs | 141 ++++ .../Descript.Models.MediaUrlReference.g.cs | 58 ++ .../Descript.Models.PublishJobStatus.g.cs | 6 +- .../Generated/Descript.Models.Result3.g.cs | 64 +- ...g.cs => Descript.Models.Result4.Json.g.cs} | 26 +- ...ult2.g.cs => Descript.Models.Result4.g.cs} | 78 +- .../Generated/Descript.OneOf.2.Json.g.cs | 141 ++++ .../Descript/Generated/Descript.OneOf.2.g.cs | 294 ++++++++ .../Generated/autosdk.generated-examples.json | 2 +- src/libs/Descript/openapi.yaml | 253 ++++++- 66 files changed, 5821 insertions(+), 254 deletions(-) create mode 100644 src/cli/Descript.CLI/Commands/ApiEndpointsImportDriveMediaCommandApiCommand.g.cs create mode 100644 src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportDriveMedia.g.cs create mode 100644 src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportDriveMedia.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobState.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobStateNullable.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobType.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobTypeNullable.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatusNullable.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1Status.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1StatusNullable.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2Status.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2StatusNullable.g.cs create mode 100644 src/libs/Descript/Generated/Descript.JsonConverters.OneOf2.g.cs rename src/libs/Descript/Generated/{Descript.JsonConverters.Result2.g.cs => Descript.JsonConverters.Result4.g.cs} (67%) create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobState.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobType.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1Status.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2Status.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.MediaUploadReference.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.MediaUploadReference.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.MediaUrlReference.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.Models.MediaUrlReference.g.cs rename src/libs/Descript/Generated/{Descript.Models.Result2.Json.g.cs => Descript.Models.Result4.Json.g.cs} (91%) rename src/libs/Descript/Generated/{Descript.Models.Result2.g.cs => Descript.Models.Result4.g.cs} (65%) create mode 100644 src/libs/Descript/Generated/Descript.OneOf.2.Json.g.cs create mode 100644 src/libs/Descript/Generated/Descript.OneOf.2.g.cs diff --git a/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs b/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs index 5912615..79db068 100644 --- a/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs +++ b/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs @@ -18,6 +18,7 @@ public static Command Create() command.Subcommands.Add(ApiEndpointsGetJobCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsGetProjectCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsGetStatusCommandApiCommand.Create()); + command.Subcommands.Add(ApiEndpointsImportDriveMediaCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsImportProjectMediaCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsListAgentModelsCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsListJobsCommandApiCommand.Create()); diff --git a/src/cli/Descript.CLI/Commands/ApiEndpointsImportDriveMediaCommandApiCommand.g.cs b/src/cli/Descript.CLI/Commands/ApiEndpointsImportDriveMediaCommandApiCommand.g.cs new file mode 100644 index 0000000..755d43b --- /dev/null +++ b/src/cli/Descript.CLI/Commands/ApiEndpointsImportDriveMediaCommandApiCommand.g.cs @@ -0,0 +1,147 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Descript.CLI.Commands; + +internal static partial class ApiEndpointsImportDriveMediaCommandApiCommand +{ + private static Option FolderId { get; } = new( + name: @"--folder-id") + { + Description = @"Target drive media folder ID (UUID) or ""root"" for the root folder. If not provided, defaults to root.", + }; + + private static Option AddMedia { get; } = new( + name: @"--add-media") + { + Description = @"Map of media reference IDs to their import definitions. Key is the display name +or path (e.g. ""video.mp4"" or ""Folder/SubFolder/video.mp4""). Paths with forward +slashes create nested folders automatically. +", + Required = true, + }; + + private static Option CallbackUrl { get; } = new( + name: @"--callback-url") + { + Description = @"Optional callback URL to receive notifications about job status changes.", + }; + private static Option Input { get; } = new(@"--input") + { + Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", + }; + + private static Option RequestJson { get; } = new(@"--request-json") + { + Description = "Request body as JSON.", + Hidden = true, + }; + + private static Option RequestFile { get; } = new(@"--request-file") + { + Description = "Path to a JSON request file, or '-' for stdin.", + Hidden = true, + }; + + private static string FormatResponse(ParseResult parseResult, global::Descript.DriveMediaImportResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::Descript.DriveMediaImportResponse value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + static partial void CustomizeCommand(ref Command command); + + public static Command Create(string? commandName = null) + { + var command = new Command(commandName ?? @"import-drive-media", @"Import media to drive library +Import media files into the drive media library (shared workspace-level media collection). + +Unlike project media import, this endpoint adds files to the drive's shared media library +rather than to a specific project. Files can optionally be placed in a folder. + +### Media URL requirements +- URLs must be accessible by Descript servers +- URLs must support HTTP Range requests +- Recommended to sign URLs for 12-48 hours to reduce chance of failure +- [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types) + +### Direct file upload + +Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough. + +### Async Operations + +Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint. + +### Dynamic webhook + +If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). +"); + command.Options.Add(FolderId); + command.Options.Add(AddMedia); + command.Options.Add(CallbackUrl); + command.Options.Add(Input); + command.Options.Add(RequestJson); + command.Options.Add(RequestFile); + command.Validators.Add(result => + { + var hasInput = result.GetResult(Input) is not null; + var hasRequestJson = result.GetResult(RequestJson) is not null; + var hasRequestFile = result.GetResult(RequestFile) is not null; + var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); + if (specifiedCount > 1) + { + result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + } + }); + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( + parseResult, + Input, + RequestJson, + RequestFile, + global::Descript.SourceGenerationContext.Default, + cancellationToken).ConfigureAwait(false); + var folderId = CliRuntime.WasSpecified(parseResult, FolderId) ? parseResult.GetValue(FolderId) : (__requestBase is { } __FolderIdBaseValue ? __FolderIdBaseValue.FolderId : default); + var addMedia = parseResult.GetRequiredValue(AddMedia); + var callbackUrl = CliRuntime.WasSpecified(parseResult, CallbackUrl) ? parseResult.GetValue(CallbackUrl) : (__requestBase is { } __CallbackUrlBaseValue ? __CallbackUrlBaseValue.CallbackUrl : default); + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.ApiEndpoints.ImportDriveMediaAsync( + folderId: folderId, + addMedia: addMedia, + callbackUrl: callbackUrl, + cancellationToken: cancellationToken).ConfigureAwait(false); + + + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::Descript.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); + return command; + } +} \ No newline at end of file diff --git a/src/cli/Descript.CLI/Commands/ApiEndpointsListJobsCommandApiCommand.g.cs b/src/cli/Descript.CLI/Commands/ApiEndpointsListJobsCommandApiCommand.g.cs index 0ca8cc2..5e6ce03 100644 --- a/src/cli/Descript.CLI/Commands/ApiEndpointsListJobsCommandApiCommand.g.cs +++ b/src/cli/Descript.CLI/Commands/ApiEndpointsListJobsCommandApiCommand.g.cs @@ -78,7 +78,7 @@ fetch subsequent pages. Query parameters allow you to filter the results: * Filter by `project_id` to see all jobs for a project -* Filter by `type` to see specific job types (import/project_media, agent) +* Filter by `type` to see specific job types (import/project_media, import/drive_media, agent, publish) "); command.Options.Add(ProjectId); command.Options.Add(Type); diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportDriveMedia.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportDriveMedia.g.cs new file mode 100644 index 0000000..2902195 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportDriveMedia.g.cs @@ -0,0 +1,705 @@ + +#nullable enable + +namespace Descript +{ + public partial class ApiEndpointsClient + { + + + private static readonly global::Descript.EndPointSecurityRequirement s_ImportDriveMediaSecurityRequirement0 = + new global::Descript.EndPointSecurityRequirement + { + Authorizations = new global::Descript.EndPointAuthorizationRequirement[] + { new global::Descript.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Descript.EndPointSecurityRequirement[] s_ImportDriveMediaSecurityRequirements = + new global::Descript.EndPointSecurityRequirement[] + { s_ImportDriveMediaSecurityRequirement0, + }; + partial void PrepareImportDriveMediaArguments( + global::System.Net.Http.HttpClient httpClient, + global::Descript.DriveMediaImportRequest request); + partial void PrepareImportDriveMediaRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Descript.DriveMediaImportRequest request); + partial void ProcessImportDriveMediaResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessImportDriveMediaResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Import media to drive library
+ /// Import media files into the drive media library (shared workspace-level media collection).
+ /// Unlike project media import, this endpoint adds files to the drive's shared media library
+ /// rather than to a specific project. Files can optionally be placed in a folder.
+ /// ### Media URL requirements
+ /// - URLs must be accessible by Descript servers
+ /// - URLs must support HTTP Range requests
+ /// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
+ /// - [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types)
+ /// ### Direct file upload
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// ### Async Operations
+ /// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
+ /// ### Dynamic webhook
+ /// If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ImportDriveMediaAsync( + + global::Descript.DriveMediaImportRequest request, + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ImportDriveMediaAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Import media to drive library
+ /// Import media files into the drive media library (shared workspace-level media collection).
+ /// Unlike project media import, this endpoint adds files to the drive's shared media library
+ /// rather than to a specific project. Files can optionally be placed in a folder.
+ /// ### Media URL requirements
+ /// - URLs must be accessible by Descript servers
+ /// - URLs must support HTTP Range requests
+ /// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
+ /// - [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types)
+ /// ### Direct file upload
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// ### Async Operations
+ /// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
+ /// ### Dynamic webhook
+ /// If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ImportDriveMediaAsResponseAsync( + + global::Descript.DriveMediaImportRequest request, + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareImportDriveMediaArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Descript.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ImportDriveMediaSecurityRequirements, + operationName: "ImportDriveMediaAsync"); + + using var __timeoutCancellationTokenSource = global::Descript.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Descript.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Descript.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Descript.PathBuilder( + path: "/jobs/import/drive_media", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Descript.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Descript.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportDriveMediaRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Descript.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportDriveMedia", + methodName: "ImportDriveMediaAsync", + pathTemplate: "\"/jobs/import/drive_media\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Descript.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Descript.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportDriveMedia", + methodName: "ImportDriveMediaAsync", + pathTemplate: "\"/jobs/import/drive_media\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Descript.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Descript.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Descript.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Descript.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportDriveMedia", + methodName: "ImportDriveMediaAsync", + pathTemplate: "\"/jobs/import/drive_media\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Descript.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessImportDriveMediaResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Descript.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportDriveMedia", + methodName: "ImportDriveMediaAsync", + pathTemplate: "\"/jobs/import/drive_media\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Descript.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportDriveMedia", + methodName: "ImportDriveMediaAsync", + pathTemplate: "\"/jobs/import/drive_media\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessImportDriveMediaResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Descript.DriveMediaImportResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Descript.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Descript.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Descript.DriveMediaImportResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Descript.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Descript.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Import media to drive library
+ /// Import media files into the drive media library (shared workspace-level media collection).
+ /// Unlike project media import, this endpoint adds files to the drive's shared media library
+ /// rather than to a specific project. Files can optionally be placed in a folder.
+ /// ### Media URL requirements
+ /// - URLs must be accessible by Descript servers
+ /// - URLs must support HTTP Range requests
+ /// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
+ /// - [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types)
+ /// ### Direct file upload
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// ### Async Operations
+ /// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
+ /// ### Dynamic webhook
+ /// If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). + ///
+ /// + /// Target drive media folder ID (UUID) or "root" for the root folder. If not provided, defaults to root. + /// + /// + /// Map of media reference IDs to their import definitions. Key is the display name
+ /// or path (e.g. "video.mp4" or "Folder/SubFolder/video.mp4"). Paths with forward
+ /// slashes create nested folders automatically. + /// + /// + /// Optional callback URL to receive notifications about job status changes. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ImportDriveMediaAsync( + object addMedia, + string? folderId = default, + string? callbackUrl = default, + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Descript.DriveMediaImportRequest + { + FolderId = folderId, + AddMedia = addMedia, + CallbackUrl = callbackUrl, + }; + + return await ImportDriveMediaAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListJobs.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListJobs.g.cs index 5506ec3..a751cae 100644 --- a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListJobs.g.cs +++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListJobs.g.cs @@ -60,7 +60,7 @@ partial void ProcessListJobsResponseContent( /// fetch subsequent pages.
/// Query parameters allow you to filter the results:
/// * Filter by `project_id` to see all jobs for a project
- /// * Filter by `type` to see specific job types (import/project_media, agent) + /// * Filter by `type` to see specific job types (import/project_media, import/drive_media, agent, publish) /// /// /// @@ -105,7 +105,7 @@ partial void ProcessListJobsResponseContent( /// fetch subsequent pages.
/// Query parameters allow you to filter the results:
/// * Filter by `project_id` to see all jobs for a project
- /// * Filter by `type` to see specific job types (import/project_media, agent) + /// * Filter by `type` to see specific job types (import/project_media, import/drive_media, agent, publish) /// /// /// diff --git a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportDriveMedia.g.cs b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportDriveMedia.g.cs new file mode 100644 index 0000000..b696073 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportDriveMedia.g.cs @@ -0,0 +1,97 @@ +#nullable enable + +namespace Descript +{ + public partial interface IApiEndpointsClient + { + /// + /// Import media to drive library
+ /// Import media files into the drive media library (shared workspace-level media collection).
+ /// Unlike project media import, this endpoint adds files to the drive's shared media library
+ /// rather than to a specific project. Files can optionally be placed in a folder.
+ /// ### Media URL requirements
+ /// - URLs must be accessible by Descript servers
+ /// - URLs must support HTTP Range requests
+ /// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
+ /// - [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types)
+ /// ### Direct file upload
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// ### Async Operations
+ /// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
+ /// ### Dynamic webhook
+ /// If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ImportDriveMediaAsync( + + global::Descript.DriveMediaImportRequest request, + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import media to drive library
+ /// Import media files into the drive media library (shared workspace-level media collection).
+ /// Unlike project media import, this endpoint adds files to the drive's shared media library
+ /// rather than to a specific project. Files can optionally be placed in a folder.
+ /// ### Media URL requirements
+ /// - URLs must be accessible by Descript servers
+ /// - URLs must support HTTP Range requests
+ /// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
+ /// - [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types)
+ /// ### Direct file upload
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// ### Async Operations
+ /// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
+ /// ### Dynamic webhook
+ /// If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ImportDriveMediaAsResponseAsync( + + global::Descript.DriveMediaImportRequest request, + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import media to drive library
+ /// Import media files into the drive media library (shared workspace-level media collection).
+ /// Unlike project media import, this endpoint adds files to the drive's shared media library
+ /// rather than to a specific project. Files can optionally be placed in a folder.
+ /// ### Media URL requirements
+ /// - URLs must be accessible by Descript servers
+ /// - URLs must support HTTP Range requests
+ /// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
+ /// - [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types)
+ /// ### Direct file upload
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// ### Async Operations
+ /// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
+ /// ### Dynamic webhook
+ /// If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). + ///
+ /// + /// Target drive media folder ID (UUID) or "root" for the root folder. If not provided, defaults to root. + /// + /// + /// Map of media reference IDs to their import definitions. Key is the display name
+ /// or path (e.g. "video.mp4" or "Folder/SubFolder/video.mp4"). Paths with forward
+ /// slashes create nested folders automatically. + /// + /// + /// Optional callback URL to receive notifications about job status changes. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ImportDriveMediaAsync( + object addMedia, + string? folderId = default, + string? callbackUrl = default, + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ListJobs.g.cs b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ListJobs.g.cs index 8002bd4..6474154 100644 --- a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ListJobs.g.cs +++ b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ListJobs.g.cs @@ -13,7 +13,7 @@ public partial interface IApiEndpointsClient /// fetch subsequent pages.
/// Query parameters allow you to filter the results:
/// * Filter by `project_id` to see all jobs for a project
- /// * Filter by `type` to see specific job types (import/project_media, agent) + /// * Filter by `type` to see specific job types (import/project_media, import/drive_media, agent, publish) /// /// /// @@ -44,7 +44,7 @@ public partial interface IApiEndpointsClient /// fetch subsequent pages.
/// Query parameters allow you to filter the results:
/// * Filter by `project_id` to see all jobs for a project
- /// * Filter by `type` to see specific job types (import/project_media, agent) + /// * Filter by `type` to see specific job types (import/project_media, import/drive_media, agent, publish) /// /// /// diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobState.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobState.g.cs new file mode 100644 index 0000000..16af01a --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobState.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusJobStateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusJobState 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::Descript.DriveMediaImportJobStatusJobStateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusJobState)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusJobState); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusJobState value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.DriveMediaImportJobStatusJobStateExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobStateNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobStateNullable.g.cs new file mode 100644 index 0000000..868606c --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobStateNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusJobStateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusJobState? 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::Descript.DriveMediaImportJobStatusJobStateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusJobState)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusJobState?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusJobState? 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::Descript.DriveMediaImportJobStatusJobStateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobType.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobType.g.cs new file mode 100644 index 0000000..1398b5a --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusJobTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusJobType 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::Descript.DriveMediaImportJobStatusJobTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusJobType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusJobType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusJobType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.DriveMediaImportJobStatusJobTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobTypeNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobTypeNullable.g.cs new file mode 100644 index 0000000..135d440 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusJobTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusJobTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusJobType? 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::Descript.DriveMediaImportJobStatusJobTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusJobType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusJobType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusJobType? 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::Descript.DriveMediaImportJobStatusJobTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs new file mode 100644 index 0000000..97a308a --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusResultVariant1MediaStatusStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus 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::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatusNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatusNullable.g.cs new file mode 100644 index 0000000..242d4bd --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusResultVariant1MediaStatusStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus? 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::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus? 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::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1Status.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1Status.g.cs new file mode 100644 index 0000000..e2dfc39 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1Status.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusResultVariant1StatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusResultVariant1Status 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::Descript.DriveMediaImportJobStatusResultVariant1StatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusResultVariant1Status)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusResultVariant1Status); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusResultVariant1Status value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.DriveMediaImportJobStatusResultVariant1StatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1StatusNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1StatusNullable.g.cs new file mode 100644 index 0000000..528f5ef --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1StatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusResultVariant1StatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusResultVariant1Status? 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::Descript.DriveMediaImportJobStatusResultVariant1StatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusResultVariant1Status)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusResultVariant1Status?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusResultVariant1Status? 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::Descript.DriveMediaImportJobStatusResultVariant1StatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2Status.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2Status.g.cs new file mode 100644 index 0000000..caf3d3c --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2Status.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusResultVariant2StatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusResultVariant2Status 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::Descript.DriveMediaImportJobStatusResultVariant2StatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusResultVariant2Status)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusResultVariant2Status); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusResultVariant2Status value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.DriveMediaImportJobStatusResultVariant2StatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2StatusNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2StatusNullable.g.cs new file mode 100644 index 0000000..b7322c8 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2StatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class DriveMediaImportJobStatusResultVariant2StatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.DriveMediaImportJobStatusResultVariant2Status? 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::Descript.DriveMediaImportJobStatusResultVariant2StatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.DriveMediaImportJobStatusResultVariant2Status)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.DriveMediaImportJobStatusResultVariant2Status?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.DriveMediaImportJobStatusResultVariant2Status? 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::Descript.DriveMediaImportJobStatusResultVariant2StatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.JobStatus.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.JobStatus.g.cs index a2dab16..5de9115 100644 --- a/src/libs/Descript/Generated/Descript.JsonConverters.JobStatus.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonConverters.JobStatus.g.cs @@ -28,6 +28,13 @@ public class JobStatusJsonConverter : global::System.Text.Json.Serialization.Jso throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.ImportJobStatus)}"); importProjectMedia = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + global::Descript.DriveMediaImportJobStatus? importDriveMedia = default; + if (discriminator?.JobType == global::Descript.JobStatusDiscriminatorJobType.ImportDriveMedia) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.DriveMediaImportJobStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.DriveMediaImportJobStatus)}"); + importDriveMedia = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } global::Descript.AgentJobStatus? agent = default; if (discriminator?.JobType == global::Descript.JobStatusDiscriminatorJobType.Agent) { @@ -47,6 +54,8 @@ public class JobStatusJsonConverter : global::System.Text.Json.Serialization.Jso discriminator?.JobType, importProjectMedia, + importDriveMedia, + agent, publish @@ -70,6 +79,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.ImportJobStatus).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImportProjectMedia(), typeInfo); } + else if (value.IsImportDriveMedia) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.DriveMediaImportJobStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.DriveMediaImportJobStatus).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImportDriveMedia(), typeInfo); + } else if (value.IsAgent) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentJobStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.OneOf2.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.OneOf2.g.cs new file mode 100644 index 0000000..fc369e7 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.OneOf2.g.cs @@ -0,0 +1,177 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::Descript.OneOf Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + } + } + + var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } + var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + T1? value1 = default; + T2? value2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + catch (global::System.ArgumentOutOfRangeException __enumTokenException) when (__enumTokenException.ParamName == "reader") + { + // Legacy enum converters signal an incompatible JSON token with this exception. + } + } + + else if (__bestIndex == 1) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + catch (global::System.ArgumentOutOfRangeException __enumTokenException) when (__enumTokenException.ParamName == "reader") + { + // Legacy enum converters signal an incompatible JSON token with this exception. + } + } + } + + if (value1 == null && value2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + catch (global::System.ArgumentOutOfRangeException __enumTokenException) when (__enumTokenException.ParamName == "reader") + { + // Legacy enum converters signal an incompatible JSON token with this exception. + } + } + + if (value1 == null && value2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + catch (global::System.ArgumentOutOfRangeException __enumTokenException) when (__enumTokenException.ParamName == "reader") + { + // Legacy enum converters signal an incompatible JSON token with this exception. + } + } + + var __value = new global::Descript.OneOf( + value1, + + value2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.OneOf value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsValue1) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue1(), typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue2(), typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.Result3.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.Result3.g.cs index d00e8c7..4eb0241 100644 --- a/src/libs/Descript/Generated/Descript.JsonConverters.Result3.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonConverters.Result3.g.cs @@ -17,22 +17,22 @@ public class Result3JsonConverter : global::System.Text.Json.Serialization.JsonC var readerCopy = reader; - var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishJobStatusResultDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.PublishJobStatusResultDiscriminator)}"); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentJobStatusResultDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.AgentJobStatusResultDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::Descript.PublishSuccessResult? success = default; - if (discriminator?.Status == global::Descript.PublishJobStatusResultDiscriminatorStatus.Success) + global::Descript.AgentSuccessResult? success = default; + if (discriminator?.Status == global::Descript.AgentJobStatusResultDiscriminatorStatus.Success) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.PublishSuccessResult)}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.AgentSuccessResult)}"); success = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::Descript.PublishErrorResult? error = default; - if (discriminator?.Status == global::Descript.PublishJobStatusResultDiscriminatorStatus.Error) + global::Descript.AgentErrorResult? error = default; + if (discriminator?.Status == global::Descript.AgentJobStatusResultDiscriminatorStatus.Error) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.PublishErrorResult)}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.AgentErrorResult)}"); error = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } @@ -57,14 +57,14 @@ public override void Write( if (value.IsSuccess) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.PublishSuccessResult).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.AgentSuccessResult).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSuccess(), typeInfo); } else if (value.IsError) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.PublishErrorResult).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.AgentErrorResult).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickError(), typeInfo); } } diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.Result2.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.Result4.g.cs similarity index 67% rename from src/libs/Descript/Generated/Descript.JsonConverters.Result2.g.cs rename to src/libs/Descript/Generated/Descript.JsonConverters.Result4.g.cs index fd761d7..3eb959e 100644 --- a/src/libs/Descript/Generated/Descript.JsonConverters.Result2.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonConverters.Result4.g.cs @@ -4,10 +4,10 @@ namespace Descript.JsonConverters { /// - public class Result2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + public class Result4JsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Descript.Result2 Read( + public override global::Descript.Result4 Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -17,26 +17,26 @@ public class Result2JsonConverter : global::System.Text.Json.Serialization.JsonC var readerCopy = reader; - var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentJobStatusResultDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.AgentJobStatusResultDiscriminator)}"); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishJobStatusResultDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.PublishJobStatusResultDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::Descript.AgentSuccessResult? success = default; - if (discriminator?.Status == global::Descript.AgentJobStatusResultDiscriminatorStatus.Success) + global::Descript.PublishSuccessResult? success = default; + if (discriminator?.Status == global::Descript.PublishJobStatusResultDiscriminatorStatus.Success) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.AgentSuccessResult)}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.PublishSuccessResult)}"); success = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::Descript.AgentErrorResult? error = default; - if (discriminator?.Status == global::Descript.AgentJobStatusResultDiscriminatorStatus.Error) + global::Descript.PublishErrorResult? error = default; + if (discriminator?.Status == global::Descript.PublishJobStatusResultDiscriminatorStatus.Error) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.AgentErrorResult)}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.PublishErrorResult)}"); error = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - var __value = new global::Descript.Result2( + var __value = new global::Descript.Result4( discriminator?.Status, success, @@ -49,7 +49,7 @@ public class Result2JsonConverter : global::System.Text.Json.Serialization.JsonC /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Descript.Result2 value, + global::Descript.Result4 value, global::System.Text.Json.JsonSerializerOptions options) { options = options ?? throw new global::System.ArgumentNullException(nameof(options)); @@ -57,14 +57,14 @@ public override void Write( if (value.IsSuccess) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.AgentSuccessResult).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishSuccessResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.PublishSuccessResult).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSuccess(), typeInfo); } else if (value.IsError) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.AgentErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.AgentErrorResult).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.PublishErrorResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.PublishErrorResult).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickError(), typeInfo); } } diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs index cc23b2d..bf45198 100644 --- a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs @@ -91,6 +91,26 @@ namespace Descript typeof(global::Descript.JsonConverters.ImportJobStatusResultDiscriminatorStatusNullableJsonConverter), + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusJobTypeJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusJobTypeNullableJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusJobStateJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusJobStateNullableJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1StatusJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1StatusNullableJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatusJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatusNullableJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2StatusJsonConverter), + + typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2StatusNullableJsonConverter), + typeof(global::Descript.JsonConverters.AgentSuccessResultStatusJsonConverter), typeof(global::Descript.JsonConverters.AgentSuccessResultStatusNullableJsonConverter), @@ -213,14 +233,18 @@ namespace Descript typeof(global::Descript.JsonConverters.ResultJsonConverter), - typeof(global::Descript.JsonConverters.Result2JsonConverter), - typeof(global::Descript.JsonConverters.Result3JsonConverter), + typeof(global::Descript.JsonConverters.Result4JsonConverter), + typeof(global::Descript.JsonConverters.JobStatusJsonConverter), typeof(global::Descript.JsonConverters.OneOfJsonConverter), + typeof(global::Descript.JsonConverters.OneOfJsonConverter), + + typeof(global::Descript.JsonConverters.OneOfJsonConverter), + typeof(global::Descript.JsonConverters.OneOfJsonConverter), typeof(global::Descript.JsonConverters.UnixTimestampJsonConverter), @@ -276,6 +300,15 @@ namespace Descript [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishedProjectConflictError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishedProjectConflictErrorError), TypeInfoPropertyName = "PublishedProjectConflictErrorError2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishedProjectConflictErrorState), TypeInfoPropertyName = "PublishedProjectConflictErrorState2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.MediaUrlReference))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.MediaUploadReference))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.OneOf), TypeInfoPropertyName = "OneOfMediaUrlReferenceMediaUploadReference2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportResponseUploadUrls2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportSuccessResult))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportSuccessResultStatus), TypeInfoPropertyName = "ImportSuccessResultStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] @@ -291,19 +324,31 @@ namespace Descript [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportJobStatusJobType), TypeInfoPropertyName = "ImportJobStatusJobType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportJobStatusJobState), TypeInfoPropertyName = "ImportJobStatusJobState2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportJobStatusProgress))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.Result), TypeInfoPropertyName = "Result2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.Result), TypeInfoPropertyName = "Result2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportJobStatusResultDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportJobStatusResultDiscriminatorStatus), TypeInfoPropertyName = "ImportJobStatusResultDiscriminatorStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatus))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusJobType), TypeInfoPropertyName = "DriveMediaImportJobStatusJobType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusJobState), TypeInfoPropertyName = "DriveMediaImportJobStatusJobState2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusProgress))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.OneOf), TypeInfoPropertyName = "OneOfDriveMediaImportJobStatusResultVariant1DriveMediaImportJobStatusResultVariant22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusResultVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusResultVariant1Status), TypeInfoPropertyName = "DriveMediaImportJobStatusResultVariant1Status2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus), TypeInfoPropertyName = "DriveMediaImportJobStatusResultVariant1MediaStatusStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusResultVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.DriveMediaImportJobStatusResultVariant2Status), TypeInfoPropertyName = "DriveMediaImportJobStatusResultVariant2Status2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentSuccessResult))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentSuccessResultStatus), TypeInfoPropertyName = "AgentSuccessResultStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentErrorResult))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentErrorResultStatus), TypeInfoPropertyName = "AgentErrorResultStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentJobStatus))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentJobStatusJobType), TypeInfoPropertyName = "AgentJobStatusJobType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentJobStatusJobState), TypeInfoPropertyName = "AgentJobStatusJobState2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentJobStatusProgress))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.Result2), TypeInfoPropertyName = "Result22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.Result3), TypeInfoPropertyName = "Result32")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentJobStatusResultDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentJobStatusResultDiscriminatorStatus), TypeInfoPropertyName = "AgentJobStatusResultDiscriminatorStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishSuccessResult))] @@ -315,7 +360,7 @@ namespace Descript [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobStatusJobType), TypeInfoPropertyName = "PublishJobStatusJobType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobStatusJobState), TypeInfoPropertyName = "PublishJobStatusJobState2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobStatusProgress))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.Result3), TypeInfoPropertyName = "Result32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.Result4), TypeInfoPropertyName = "Result42")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobStatusResultDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobStatusResultDiscriminatorStatus), TypeInfoPropertyName = "PublishJobStatusResultDiscriminatorStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.JobStatus), TypeInfoPropertyName = "JobStatus2")] diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs index ea1e154..6d75380 100644 --- a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs @@ -218,427 +218,511 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Descript.ImportSuccessResult? Type45 { get; set; } + public global::Descript.MediaUrlReference? Type45 { get; set; } /// /// /// - public global::Descript.ImportSuccessResultStatus? Type46 { get; set; } + public global::Descript.MediaUploadReference? Type46 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type47 { get; set; } + public long? Type47 { get; set; } /// /// /// - public global::Descript.ImportSuccessResultMediaStatus2? Type48 { get; set; } + public global::Descript.DriveMediaImportRequest? Type48 { get; set; } /// /// /// - public global::Descript.ImportSuccessResultMediaStatusStatus? Type49 { get; set; } + public object? Type49 { get; set; } /// /// /// - public float? Type50 { get; set; } + public global::Descript.OneOf? Type50 { get; set; } /// /// /// - public int? Type51 { get; set; } + public global::Descript.DriveMediaImportResponse? Type51 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type52 { get; set; } + public global::System.Collections.Generic.Dictionary? Type52 { get; set; } /// /// /// - public global::Descript.ImportSuccessResultCreatedComposition? Type53 { get; set; } + public global::Descript.DriveMediaImportResponseUploadUrls2? Type53 { get; set; } /// /// /// - public global::Descript.ImportErrorResult? Type54 { get; set; } + public global::Descript.ImportSuccessResult? Type54 { get; set; } /// /// /// - public global::Descript.ImportErrorResultStatus? Type55 { get; set; } + public global::Descript.ImportSuccessResultStatus? Type55 { get; set; } /// /// /// - public global::Descript.ImportJobStatus? Type56 { get; set; } + public global::System.Collections.Generic.Dictionary? Type56 { get; set; } /// /// /// - public global::Descript.ImportJobStatusJobType? Type57 { get; set; } + public global::Descript.ImportSuccessResultMediaStatus2? Type57 { get; set; } /// /// /// - public global::Descript.ImportJobStatusJobState? Type58 { get; set; } + public global::Descript.ImportSuccessResultMediaStatusStatus? Type58 { get; set; } /// /// /// - public global::Descript.ImportJobStatusProgress? Type59 { get; set; } + public float? Type59 { get; set; } /// /// /// - public global::Descript.Result? Type60 { get; set; } + public int? Type60 { get; set; } /// /// /// - public global::Descript.ImportJobStatusResultDiscriminator? Type61 { get; set; } + public global::System.Collections.Generic.IList? Type61 { get; set; } /// /// /// - public global::Descript.ImportJobStatusResultDiscriminatorStatus? Type62 { get; set; } + public global::Descript.ImportSuccessResultCreatedComposition? Type62 { get; set; } /// /// /// - public global::Descript.AgentSuccessResult? Type63 { get; set; } + public global::Descript.ImportErrorResult? Type63 { get; set; } /// /// /// - public global::Descript.AgentSuccessResultStatus? Type64 { get; set; } + public global::Descript.ImportErrorResultStatus? Type64 { get; set; } /// /// /// - public bool? Type65 { get; set; } + public global::Descript.ImportJobStatus? Type65 { get; set; } /// /// /// - public global::Descript.AgentErrorResult? Type66 { get; set; } + public global::Descript.ImportJobStatusJobType? Type66 { get; set; } /// /// /// - public global::Descript.AgentErrorResultStatus? Type67 { get; set; } + public global::Descript.ImportJobStatusJobState? Type67 { get; set; } /// /// /// - public global::Descript.AgentJobStatus? Type68 { get; set; } + public global::Descript.ImportJobStatusProgress? Type68 { get; set; } /// /// /// - public global::Descript.AgentJobStatusJobType? Type69 { get; set; } + public global::Descript.Result? Type69 { get; set; } /// /// /// - public global::Descript.AgentJobStatusJobState? Type70 { get; set; } + public global::Descript.ImportJobStatusResultDiscriminator? Type70 { get; set; } /// /// /// - public global::Descript.AgentJobStatusProgress? Type71 { get; set; } + public global::Descript.ImportJobStatusResultDiscriminatorStatus? Type71 { get; set; } /// /// /// - public global::Descript.Result2? Type72 { get; set; } + public global::Descript.DriveMediaImportJobStatus? Type72 { get; set; } /// /// /// - public global::Descript.AgentJobStatusResultDiscriminator? Type73 { get; set; } + public global::Descript.DriveMediaImportJobStatusJobType? Type73 { get; set; } /// /// /// - public global::Descript.AgentJobStatusResultDiscriminatorStatus? Type74 { get; set; } + public global::Descript.DriveMediaImportJobStatusJobState? Type74 { get; set; } /// /// /// - public global::Descript.PublishSuccessResult? Type75 { get; set; } + public global::Descript.DriveMediaImportJobStatusProgress? Type75 { get; set; } /// /// /// - public global::Descript.PublishSuccessResultStatus? Type76 { get; set; } + public bool? Type76 { get; set; } /// /// /// - public global::Descript.PublishSuccessResultMediaType? Type77 { get; set; } + public global::Descript.OneOf? Type77 { get; set; } /// /// /// - public global::Descript.PublishErrorResult? Type78 { get; set; } + public global::Descript.DriveMediaImportJobStatusResultVariant1? Type78 { get; set; } /// /// /// - public global::Descript.PublishErrorResultStatus? Type79 { get; set; } + public global::Descript.DriveMediaImportJobStatusResultVariant1Status? Type79 { get; set; } /// /// /// - public global::Descript.PublishJobStatus? Type80 { get; set; } + public global::System.Collections.Generic.Dictionary? Type80 { get; set; } /// /// /// - public global::Descript.PublishJobStatusJobType? Type81 { get; set; } + public global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2? Type81 { get; set; } /// /// /// - public global::Descript.PublishJobStatusJobState? Type82 { get; set; } + public global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus? Type82 { get; set; } /// /// /// - public global::Descript.PublishJobStatusProgress? Type83 { get; set; } + public global::Descript.DriveMediaImportJobStatusResultVariant2? Type83 { get; set; } /// /// /// - public global::Descript.Result3? Type84 { get; set; } + public global::Descript.DriveMediaImportJobStatusResultVariant2Status? Type84 { get; set; } /// /// /// - public global::Descript.PublishJobStatusResultDiscriminator? Type85 { get; set; } + public global::Descript.AgentSuccessResult? Type85 { get; set; } /// /// /// - public global::Descript.PublishJobStatusResultDiscriminatorStatus? Type86 { get; set; } + public global::Descript.AgentSuccessResultStatus? Type86 { get; set; } /// /// /// - public global::Descript.JobStatus? Type87 { get; set; } + public global::Descript.AgentErrorResult? Type87 { get; set; } /// /// /// - public global::Descript.JobStatusDiscriminator? Type88 { get; set; } + public global::Descript.AgentErrorResultStatus? Type88 { get; set; } /// /// /// - public global::Descript.JobStatusDiscriminatorJobType? Type89 { get; set; } + public global::Descript.AgentJobStatus? Type89 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequest? Type90 { get; set; } + public global::Descript.AgentJobStatusJobType? Type90 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequestTeamAccess? Type91 { get; set; } + public global::Descript.AgentJobStatusJobState? Type91 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequestAddMediaUrlImport? Type92 { get; set; } + public global::Descript.AgentJobStatusProgress? Type92 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequestAddMediaDirectUpload? Type93 { get; set; } + public global::Descript.Result3? Type93 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequence? Type94 { get; set; } + public global::Descript.AgentJobStatusResultDiscriminator? Type94 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type95 { get; set; } + public global::Descript.AgentJobStatusResultDiscriminatorStatus? Type95 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequenceTrack? Type96 { get; set; } + public global::Descript.PublishSuccessResult? Type96 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type97 { get; set; } + public global::Descript.PublishSuccessResultStatus? Type97 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequestAddComposition? Type98 { get; set; } + public global::Descript.PublishSuccessResultMediaType? Type98 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type99 { get; set; } + public global::Descript.PublishErrorResult? Type99 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaRequestAddCompositionClip? Type100 { get; set; } + public global::Descript.PublishErrorResultStatus? Type100 { get; set; } /// /// /// - public global::Descript.AgentEditJobRequest? Type101 { get; set; } + public global::Descript.PublishJobStatus? Type101 { get; set; } /// /// /// - public global::Descript.AgentEditJobRequestTeamAccess? Type102 { get; set; } + public global::Descript.PublishJobStatusJobType? Type102 { get; set; } /// /// /// - public global::Descript.PublishJobRequest? Type103 { get; set; } + public global::Descript.PublishJobStatusJobState? Type103 { get; set; } /// /// /// - public global::Descript.PublishJobRequestMediaType? Type104 { get; set; } + public global::Descript.PublishJobStatusProgress? Type104 { get; set; } /// /// /// - public global::Descript.PublishJobRequestResolution? Type105 { get; set; } + public global::Descript.Result4? Type105 { get; set; } /// /// /// - public global::Descript.PublishJobRequestAccessLevel? Type106 { get; set; } + public global::Descript.PublishJobStatusResultDiscriminator? Type106 { get; set; } /// /// /// - public global::Descript.ExportTranscriptRequest? Type107 { get; set; } + public global::Descript.PublishJobStatusResultDiscriminatorStatus? Type107 { get; set; } /// /// /// - public global::Descript.ExportTranscriptRequestFormat? Type108 { get; set; } + public global::Descript.JobStatus? Type108 { get; set; } /// /// /// - public global::Descript.ExportTranscriptRequestIncludeSpeakerLabels? Type109 { get; set; } + public global::Descript.JobStatusDiscriminator? Type109 { get; set; } /// /// /// - public global::Descript.ExportTranscriptRequestTimecodes? Type110 { get; set; } + public global::Descript.JobStatusDiscriminatorJobType? Type110 { get; set; } /// /// /// - public global::Descript.ListJobsType? Type111 { get; set; } + public global::Descript.ImportProjectMediaRequest? Type111 { get; set; } /// /// /// - public global::Descript.ListProjectsSort? Type112 { get; set; } + public global::Descript.ImportProjectMediaRequestTeamAccess? Type112 { get; set; } /// /// /// - public global::Descript.ListProjectsDirection? Type113 { get; set; } + public global::Descript.ImportProjectMediaRequestAddMediaUrlImport? Type113 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type114 { get; set; } + public global::Descript.ImportProjectMediaRequestAddMediaDirectUpload? Type114 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type115 { get; set; } + public global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequence? Type115 { get; set; } /// /// /// - public global::Descript.SearchTypeItem? Type116 { get; set; } + public global::System.Collections.Generic.IList? Type116 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type117 { get; set; } + public global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequenceTrack? Type117 { get; set; } /// /// /// - public global::Descript.SearchMatchItem? Type118 { get; set; } + public global::System.Collections.Generic.IList? Type118 { get; set; } /// /// /// - public global::Descript.SearchSort? Type119 { get; set; } + public global::Descript.ImportProjectMediaRequestAddComposition? Type119 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaResponse? Type120 { get; set; } + public global::System.Collections.Generic.IList? Type120 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type121 { get; set; } + public global::Descript.ImportProjectMediaRequestAddCompositionClip? Type121 { get; set; } /// /// /// - public global::Descript.ImportProjectMediaResponseUploadUrls2? Type122 { get; set; } + public global::Descript.AgentEditJobRequest? Type122 { get; set; } /// /// /// - public global::Descript.AgentEditJobResponse? Type123 { get; set; } + public global::Descript.AgentEditJobRequestTeamAccess? Type123 { get; set; } /// /// /// - public global::Descript.ListAgentModelsResponse? Type124 { get; set; } + public global::Descript.PublishJobRequest? Type124 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type125 { get; set; } + public global::Descript.PublishJobRequestMediaType? Type125 { get; set; } /// /// /// - public global::Descript.ListAgentModelsResponseAvailableModel? Type126 { get; set; } + public global::Descript.PublishJobRequestResolution? Type126 { get; set; } /// /// /// - public global::Descript.ListAgentModelsResponseAvailableModelCost? Type127 { get; set; } + public global::Descript.PublishJobRequestAccessLevel? Type127 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type128 { get; set; } + public global::Descript.ExportTranscriptRequest? Type128 { get; set; } /// /// /// - public global::Descript.ListAgentModelsResponseAliase? Type129 { get; set; } + public global::Descript.ExportTranscriptRequestFormat? Type129 { get; set; } /// /// /// - public global::Descript.ListAgentModelsResponseAliaseCost? Type130 { get; set; } + public global::Descript.ExportTranscriptRequestIncludeSpeakerLabels? Type130 { get; set; } /// /// /// - public global::Descript.PublishJobResponse? Type131 { get; set; } + public global::Descript.ExportTranscriptRequestTimecodes? Type131 { get; set; } /// /// /// - public byte[]? Type132 { get; set; } + public global::Descript.ListJobsType? Type132 { get; set; } /// /// /// - public global::Descript.ListJobsResponse? Type133 { get; set; } + public global::Descript.ListProjectsSort? Type133 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type134 { get; set; } + public global::Descript.ListProjectsDirection? Type134 { get; set; } /// /// /// - public global::Descript.ListJobsResponsePagination? Type135 { get; set; } + public global::System.Collections.Generic.IList? Type135 { get; set; } /// /// /// - public global::Descript.ListProjectsResponse? Type136 { get; set; } + public global::System.Collections.Generic.IList? Type136 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type137 { get; set; } + public global::Descript.SearchTypeItem? Type137 { get; set; } /// /// /// - public global::Descript.ListProjectsResponseDataItem? Type138 { get; set; } + public global::System.Collections.Generic.IList? Type138 { get; set; } /// /// /// - public global::Descript.ListProjectsResponsePagination? Type139 { get; set; } + public global::Descript.SearchMatchItem? Type139 { get; set; } /// /// /// - public global::Descript.GetProjectResponse? Type140 { get; set; } + public global::Descript.SearchSort? Type140 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type141 { get; set; } + public global::Descript.ImportProjectMediaResponse? Type141 { get; set; } /// /// /// - public global::Descript.GetProjectResponseMediaFiles2? Type142 { get; set; } + public global::System.Collections.Generic.Dictionary? Type142 { get; set; } /// /// /// - public global::Descript.GetProjectResponseMediaFilesType? Type143 { get; set; } + public global::Descript.ImportProjectMediaResponseUploadUrls2? Type143 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type144 { get; set; } + public global::Descript.AgentEditJobResponse? Type144 { get; set; } /// /// /// - public global::Descript.GetProjectResponseComposition? Type145 { get; set; } + public global::Descript.ListAgentModelsResponse? Type145 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type146 { get; set; } + public global::System.Collections.Generic.IList? Type146 { get; set; } /// /// /// - public global::Descript.GetProjectResponsePublishe? Type147 { get; set; } + public global::Descript.ListAgentModelsResponseAvailableModel? Type147 { get; set; } /// /// /// - public global::Descript.GetProjectResponsePublisheAccessLevel? Type148 { get; set; } + public global::Descript.ListAgentModelsResponseAvailableModelCost? Type148 { get; set; } /// /// /// - public global::Descript.GetProjectResponsePublisheMediaType? Type149 { get; set; } + public global::System.Collections.Generic.IList? Type149 { get; set; } /// /// /// - public global::Descript.GetStatusResponse? Type150 { get; set; } + public global::Descript.ListAgentModelsResponseAliase? Type150 { get; set; } + /// + /// + /// + public global::Descript.ListAgentModelsResponseAliaseCost? Type151 { get; set; } + /// + /// + /// + public global::Descript.PublishJobResponse? Type152 { get; set; } + /// + /// + /// + public byte[]? Type153 { get; set; } + /// + /// + /// + public global::Descript.ListJobsResponse? Type154 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type155 { get; set; } + /// + /// + /// + public global::Descript.ListJobsResponsePagination? Type156 { get; set; } + /// + /// + /// + public global::Descript.ListProjectsResponse? Type157 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type158 { get; set; } + /// + /// + /// + public global::Descript.ListProjectsResponseDataItem? Type159 { get; set; } + /// + /// + /// + public global::Descript.ListProjectsResponsePagination? Type160 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponse? Type161 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type162 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponseMediaFiles2? Type163 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponseMediaFilesType? Type164 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type165 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponseComposition? Type166 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type167 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponsePublishe? Type168 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponsePublisheAccessLevel? Type169 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponsePublisheMediaType? Type170 { get; set; } + /// + /// + /// + public global::Descript.GetStatusResponse? Type171 { get; set; } /// /// diff --git a/src/libs/Descript/Generated/Descript.Models.AgentJobStatus.g.cs b/src/libs/Descript/Generated/Descript.Models.AgentJobStatus.g.cs index 95f4b19..0607fa9 100644 --- a/src/libs/Descript/Generated/Descript.Models.AgentJobStatus.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.AgentJobStatus.g.cs @@ -94,8 +94,8 @@ public sealed partial class AgentJobStatus /// Job result (only present when job_state is stopped) /// [global::System.Text.Json.Serialization.JsonPropertyName("result")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.Result2JsonConverter))] - public global::Descript.Result2? Result { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.Result3JsonConverter))] + public global::Descript.Result3? Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -161,7 +161,7 @@ public AgentJobStatus( global::Descript.AgentJobStatusJobType jobType, global::System.DateTime? stoppedAt, global::Descript.AgentJobStatusProgress? progress, - global::Descript.Result2? result) + global::Descript.Result3? result) { this.JobId = jobId; this.JobType = jobType; diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.Json.g.cs new file mode 100644 index 0000000..0af5ead --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportJobStatus + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportJobStatus), + jsonSerializerContext) as global::Descript.DriveMediaImportJobStatus; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatus? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportJobStatus; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.g.cs new file mode 100644 index 0000000..3a9ca61 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatus.g.cs @@ -0,0 +1,150 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Job status for a drive media import job. + /// + public sealed partial class DriveMediaImportJobStatus + { + /// + /// The job ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusJobTypeJsonConverter))] + public global::Descript.DriveMediaImportJobStatusJobType JobType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_state")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusJobStateJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Descript.DriveMediaImportJobStatusJobState JobState { get; set; } + + /// + /// When the job was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// When the job stopped (only present when job_state is stopped or cancelled). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stopped_at")] + public global::System.DateTime? StoppedAt { get; set; } + + /// + /// The drive ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("drive_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DriveId { get; set; } + + /// + /// Human-readable name of the connected drive (workspace)
+ /// Example: My Team Workspace + ///
+ /// My Team Workspace + [global::System.Text.Json.Serialization.JsonPropertyName("drive_name")] + public string? DriveName { get; set; } + + /// + /// The target folder ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FolderId { get; set; } + + /// + /// Progress information for the workflow (only present when job_state is running) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("progress")] + public global::Descript.DriveMediaImportJobStatusProgress? Progress { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("result")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.OneOfJsonConverter))] + public global::Descript.OneOf? Result { 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. + /// + /// + /// The job ID. + /// + /// + /// + /// When the job was created. + /// + /// + /// The drive ID. + /// + /// + /// The target folder ID. + /// + /// + /// + /// When the job stopped (only present when job_state is stopped or cancelled). + /// + /// + /// Human-readable name of the connected drive (workspace)
+ /// Example: My Team Workspace + /// + /// + /// Progress information for the workflow (only present when job_state is running) + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportJobStatus( + string jobId, + global::Descript.DriveMediaImportJobStatusJobState jobState, + global::System.DateTime createdAt, + string driveId, + string folderId, + global::Descript.DriveMediaImportJobStatusJobType jobType, + global::System.DateTime? stoppedAt, + string? driveName, + global::Descript.DriveMediaImportJobStatusProgress? progress, + global::Descript.OneOf? result) + { + this.JobId = jobId ?? throw new global::System.ArgumentNullException(nameof(jobId)); + this.JobType = jobType; + this.JobState = jobState; + this.CreatedAt = createdAt; + this.StoppedAt = stoppedAt; + this.DriveId = driveId ?? throw new global::System.ArgumentNullException(nameof(driveId)); + this.DriveName = driveName; + this.FolderId = folderId ?? throw new global::System.ArgumentNullException(nameof(folderId)); + this.Progress = progress; + this.Result = result; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportJobStatus() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobState.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobState.g.cs new file mode 100644 index 0000000..c8509df --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobState.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public enum DriveMediaImportJobStatusJobState + { + /// + /// + /// + Cancelled, + /// + /// + /// + Queued, + /// + /// + /// + Running, + /// + /// + /// + Stopped, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DriveMediaImportJobStatusJobStateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DriveMediaImportJobStatusJobState value) + { + return value switch + { + DriveMediaImportJobStatusJobState.Cancelled => "cancelled", + DriveMediaImportJobStatusJobState.Queued => "queued", + DriveMediaImportJobStatusJobState.Running => "running", + DriveMediaImportJobStatusJobState.Stopped => "stopped", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DriveMediaImportJobStatusJobState? ToEnum(string value) + { + return value switch + { + "cancelled" => DriveMediaImportJobStatusJobState.Cancelled, + "queued" => DriveMediaImportJobStatusJobState.Queued, + "running" => DriveMediaImportJobStatusJobState.Running, + "stopped" => DriveMediaImportJobStatusJobState.Stopped, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobType.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobType.g.cs new file mode 100644 index 0000000..b9a4fe1 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusJobType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public enum DriveMediaImportJobStatusJobType + { + /// + /// + /// + ImportDriveMedia, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DriveMediaImportJobStatusJobTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DriveMediaImportJobStatusJobType value) + { + return value switch + { + DriveMediaImportJobStatusJobType.ImportDriveMedia => "import/drive_media", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DriveMediaImportJobStatusJobType? ToEnum(string value) + { + return value switch + { + "import/drive_media" => DriveMediaImportJobStatusJobType.ImportDriveMedia, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.Json.g.cs new file mode 100644 index 0000000..c770e14 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportJobStatusProgress + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusProgress? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportJobStatusProgress), + jsonSerializerContext) as global::Descript.DriveMediaImportJobStatusProgress; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusProgress? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusProgress? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusProgress), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportJobStatusProgress; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.g.cs new file mode 100644 index 0000000..d4b7537 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusProgress.g.cs @@ -0,0 +1,102 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Progress information for the workflow (only present when job_state is running) + /// + public sealed partial class DriveMediaImportJobStatusProgress + { + /// + /// Human-readable label describing the current action + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Label { get; set; } + + /// + /// Percentage of the workflow that has been completed + /// + [global::System.Text.Json.Serialization.JsonPropertyName("percent")] + public int? Percent { get; set; } + + /// + /// When the progress was last updated + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_update_at")] + public global::System.DateTime? LastUpdateAt { get; set; } + + /// + /// Whether the job is still waiting for direct uploads to finish + /// + [global::System.Text.Json.Serialization.JsonPropertyName("waiting_for_uploads")] + public bool? WaitingForUploads { get; set; } + + /// + /// Number of direct upload files received so far + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uploaded_artifacts")] + public int? UploadedArtifacts { get; set; } + + /// + /// Total number of direct upload files expected + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_artifacts")] + public int? TotalArtifacts { 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. + /// + /// + /// Human-readable label describing the current action + /// + /// + /// Percentage of the workflow that has been completed + /// + /// + /// When the progress was last updated + /// + /// + /// Whether the job is still waiting for direct uploads to finish + /// + /// + /// Number of direct upload files received so far + /// + /// + /// Total number of direct upload files expected + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportJobStatusProgress( + string label, + int? percent, + global::System.DateTime? lastUpdateAt, + bool? waitingForUploads, + int? uploadedArtifacts, + int? totalArtifacts) + { + this.Label = label ?? throw new global::System.ArgumentNullException(nameof(label)); + this.Percent = percent; + this.LastUpdateAt = lastUpdateAt; + this.WaitingForUploads = waitingForUploads; + this.UploadedArtifacts = uploadedArtifacts; + this.TotalArtifacts = totalArtifacts; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportJobStatusProgress() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.Json.g.cs new file mode 100644 index 0000000..5ce45e1 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportJobStatusResultVariant1 + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportJobStatusResultVariant1), + jsonSerializerContext) as global::Descript.DriveMediaImportJobStatusResultVariant1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant1? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportJobStatusResultVariant1; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.g.cs new file mode 100644 index 0000000..8d31a96 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class DriveMediaImportJobStatusResultVariant1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1StatusJsonConverter))] + public global::Descript.DriveMediaImportJobStatusResultVariant1Status? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("media_status")] + public global::System.Collections.Generic.Dictionary? MediaStatus { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("media_seconds_used")] + public double? MediaSecondsUsed { 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. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportJobStatusResultVariant1( + global::Descript.DriveMediaImportJobStatusResultVariant1Status? status, + global::System.Collections.Generic.Dictionary? mediaStatus, + double? mediaSecondsUsed) + { + this.Status = status; + this.MediaStatus = mediaStatus; + this.MediaSecondsUsed = mediaSecondsUsed; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportJobStatusResultVariant1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.Json.g.cs new file mode 100644 index 0000000..ce7891a --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportJobStatusResultVariant1MediaStatus + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus), + jsonSerializerContext) as global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.g.cs new file mode 100644 index 0000000..c222b81 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class DriveMediaImportJobStatusResultVariant1MediaStatus + { + + /// + /// 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(); + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.Json.g.cs new file mode 100644 index 0000000..4aae5f1 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportJobStatusResultVariant1MediaStatus2 + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2), + jsonSerializerContext) as global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatus2; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.g.cs new file mode 100644 index 0000000..38e0f07 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatus2.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class DriveMediaImportJobStatusResultVariant1MediaStatus2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant1MediaStatusStatusJsonConverter))] + public global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_message")] + public string? ErrorMessage { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("duration_seconds")] + public double? DurationSeconds { 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. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportJobStatusResultVariant1MediaStatus2( + global::Descript.DriveMediaImportJobStatusResultVariant1MediaStatusStatus? status, + string? errorMessage, + double? durationSeconds) + { + this.Status = status; + this.ErrorMessage = errorMessage; + this.DurationSeconds = durationSeconds; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportJobStatusResultVariant1MediaStatus2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs new file mode 100644 index 0000000..203f648 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1MediaStatusStatus.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public enum DriveMediaImportJobStatusResultVariant1MediaStatusStatus + { + /// + /// + /// + Error, + /// + /// + /// + Success, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DriveMediaImportJobStatusResultVariant1MediaStatusStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DriveMediaImportJobStatusResultVariant1MediaStatusStatus value) + { + return value switch + { + DriveMediaImportJobStatusResultVariant1MediaStatusStatus.Error => "error", + DriveMediaImportJobStatusResultVariant1MediaStatusStatus.Success => "success", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DriveMediaImportJobStatusResultVariant1MediaStatusStatus? ToEnum(string value) + { + return value switch + { + "error" => DriveMediaImportJobStatusResultVariant1MediaStatusStatus.Error, + "success" => DriveMediaImportJobStatusResultVariant1MediaStatusStatus.Success, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1Status.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1Status.g.cs new file mode 100644 index 0000000..57ba812 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant1Status.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public enum DriveMediaImportJobStatusResultVariant1Status + { + /// + /// + /// + Partial, + /// + /// + /// + Success, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DriveMediaImportJobStatusResultVariant1StatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DriveMediaImportJobStatusResultVariant1Status value) + { + return value switch + { + DriveMediaImportJobStatusResultVariant1Status.Partial => "partial", + DriveMediaImportJobStatusResultVariant1Status.Success => "success", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DriveMediaImportJobStatusResultVariant1Status? ToEnum(string value) + { + return value switch + { + "partial" => DriveMediaImportJobStatusResultVariant1Status.Partial, + "success" => DriveMediaImportJobStatusResultVariant1Status.Success, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.Json.g.cs new file mode 100644 index 0000000..109ee27 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportJobStatusResultVariant2 + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportJobStatusResultVariant2), + jsonSerializerContext) as global::Descript.DriveMediaImportJobStatusResultVariant2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportJobStatusResultVariant2? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportJobStatusResultVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportJobStatusResultVariant2; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.g.cs new file mode 100644 index 0000000..6c87683 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class DriveMediaImportJobStatusResultVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.DriveMediaImportJobStatusResultVariant2StatusJsonConverter))] + public global::Descript.DriveMediaImportJobStatusResultVariant2Status? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_message")] + public string? ErrorMessage { 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. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportJobStatusResultVariant2( + global::Descript.DriveMediaImportJobStatusResultVariant2Status? status, + string? errorMessage) + { + this.Status = status; + this.ErrorMessage = errorMessage; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportJobStatusResultVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2Status.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2Status.g.cs new file mode 100644 index 0000000..1465a02 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportJobStatusResultVariant2Status.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public enum DriveMediaImportJobStatusResultVariant2Status + { + /// + /// + /// + Error, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DriveMediaImportJobStatusResultVariant2StatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DriveMediaImportJobStatusResultVariant2Status value) + { + return value switch + { + DriveMediaImportJobStatusResultVariant2Status.Error => "error", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DriveMediaImportJobStatusResultVariant2Status? ToEnum(string value) + { + return value switch + { + "error" => DriveMediaImportJobStatusResultVariant2Status.Error, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.Json.g.cs new file mode 100644 index 0000000..ffb3931 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportRequest + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportRequest), + jsonSerializerContext) as global::Descript.DriveMediaImportRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportRequest? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportRequest; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.g.cs new file mode 100644 index 0000000..28298e3 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequest.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class DriveMediaImportRequest + { + /// + /// Target drive media folder ID (UUID) or "root" for the root folder. If not provided, defaults to root. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] + public string? FolderId { get; set; } + + /// + /// Map of media reference IDs to their import definitions. Key is the display name
+ /// or path (e.g. "video.mp4" or "Folder/SubFolder/video.mp4"). Paths with forward
+ /// slashes create nested folders automatically. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("add_media")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object AddMedia { get; set; } + + /// + /// Optional callback URL to receive notifications about job status changes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("callback_url")] + public string? CallbackUrl { 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. + /// + /// + /// Map of media reference IDs to their import definitions. Key is the display name
+ /// or path (e.g. "video.mp4" or "Folder/SubFolder/video.mp4"). Paths with forward
+ /// slashes create nested folders automatically. + /// + /// + /// Target drive media folder ID (UUID) or "root" for the root folder. If not provided, defaults to root. + /// + /// + /// Optional callback URL to receive notifications about job status changes. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportRequest( + object addMedia, + string? folderId, + string? callbackUrl) + { + this.FolderId = folderId; + this.AddMedia = addMedia ?? throw new global::System.ArgumentNullException(nameof(addMedia)); + this.CallbackUrl = callbackUrl; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.Json.g.cs new file mode 100644 index 0000000..0f71c2a --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportRequestAddMedia + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportRequestAddMedia? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportRequestAddMedia), + jsonSerializerContext) as global::Descript.DriveMediaImportRequestAddMedia; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportRequestAddMedia? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportRequestAddMedia? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportRequestAddMedia), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportRequestAddMedia; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.g.cs new file mode 100644 index 0000000..574e8e1 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportRequestAddMedia.g.cs @@ -0,0 +1,21 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Map of media reference IDs to their import definitions. Key is the display name
+ /// or path (e.g. "video.mp4" or "Folder/SubFolder/video.mp4"). Paths with forward
+ /// slashes create nested folders automatically. + ///
+ public sealed partial class DriveMediaImportRequestAddMedia + { + + /// + /// 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(); + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.Json.g.cs new file mode 100644 index 0000000..3f02654 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportResponse + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportResponse), + jsonSerializerContext) as global::Descript.DriveMediaImportResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportResponse? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportResponse; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.g.cs new file mode 100644 index 0000000..5c728ec --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponse.g.cs @@ -0,0 +1,96 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class DriveMediaImportResponse + { + /// + /// The ID of the created import job. Use this to query job status. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// The drive ID where the media is being imported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("drive_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DriveId { get; set; } + + /// + /// Human-readable name of the connected drive (workspace)
+ /// Example: My Team Workspace + ///
+ /// My Team Workspace + [global::System.Text.Json.Serialization.JsonPropertyName("drive_name")] + public string? DriveName { get; set; } + + /// + /// The target folder ID in the drive media library. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FolderId { get; set; } + + /// + /// Signed upload URLs for direct upload media items. Only present when the request includes direct upload references. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("upload_urls")] + public global::System.Collections.Generic.Dictionary? UploadUrls { 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. + /// + /// + /// The ID of the created import job. Use this to query job status. + /// + /// + /// The drive ID where the media is being imported. + /// + /// + /// The target folder ID in the drive media library. + /// + /// + /// Human-readable name of the connected drive (workspace)
+ /// Example: My Team Workspace + /// + /// + /// Signed upload URLs for direct upload media items. Only present when the request includes direct upload references. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportResponse( + string jobId, + string driveId, + string folderId, + string? driveName, + global::System.Collections.Generic.Dictionary? uploadUrls) + { + this.JobId = jobId ?? throw new global::System.ArgumentNullException(nameof(jobId)); + this.DriveId = driveId ?? throw new global::System.ArgumentNullException(nameof(driveId)); + this.DriveName = driveName; + this.FolderId = folderId ?? throw new global::System.ArgumentNullException(nameof(folderId)); + this.UploadUrls = uploadUrls; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.Json.g.cs new file mode 100644 index 0000000..b977e36 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportResponseUploadUrls + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportResponseUploadUrls? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportResponseUploadUrls), + jsonSerializerContext) as global::Descript.DriveMediaImportResponseUploadUrls; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportResponseUploadUrls? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportResponseUploadUrls? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportResponseUploadUrls), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportResponseUploadUrls; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.g.cs new file mode 100644 index 0000000..ef782ea --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Signed upload URLs for direct upload media items. Only present when the request includes direct upload references. + /// + public sealed partial class DriveMediaImportResponseUploadUrls + { + + /// + /// 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(); + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.Json.g.cs new file mode 100644 index 0000000..38ce311 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class DriveMediaImportResponseUploadUrls2 + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportResponseUploadUrls2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.DriveMediaImportResponseUploadUrls2), + jsonSerializerContext) as global::Descript.DriveMediaImportResponseUploadUrls2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.DriveMediaImportResponseUploadUrls2? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportResponseUploadUrls2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.DriveMediaImportResponseUploadUrls2), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.DriveMediaImportResponseUploadUrls2; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.g.cs b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.g.cs new file mode 100644 index 0000000..8b337b5 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.DriveMediaImportResponseUploadUrls2.g.cs @@ -0,0 +1,68 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class DriveMediaImportResponseUploadUrls2 + { + /// + /// Signed URL to PUT the file bytes to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("upload_url")] + public string? UploadUrl { get; set; } + + /// + /// The asset ID for the uploaded file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("asset_id")] + public string? AssetId { get; set; } + + /// + /// The artifact ID for the uploaded file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("artifact_id")] + public string? ArtifactId { 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. + /// + /// + /// Signed URL to PUT the file bytes to. + /// + /// + /// The asset ID for the uploaded file. + /// + /// + /// The artifact ID for the uploaded file. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DriveMediaImportResponseUploadUrls2( + string? uploadUrl, + string? assetId, + string? artifactId) + { + this.UploadUrl = uploadUrl; + this.AssetId = assetId; + this.ArtifactId = artifactId; + } + + /// + /// Initializes a new instance of the class. + /// + public DriveMediaImportResponseUploadUrls2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.JobStatus.g.cs b/src/libs/Descript/Generated/Descript.Models.JobStatus.g.cs index 05082cb..df90ae5 100644 --- a/src/libs/Descript/Generated/Descript.Models.JobStatus.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.JobStatus.g.cs @@ -52,6 +52,43 @@ public bool TryPickImportProjectMedia( ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImportProjectMedia' but the value was {ToString()}."); + /// + /// Job status for a drive media import job. + /// +#if NET6_0_OR_GREATER + public global::Descript.DriveMediaImportJobStatus? ImportDriveMedia { get; init; } +#else + public global::Descript.DriveMediaImportJobStatus? ImportDriveMedia { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImportDriveMedia))] +#endif + public bool IsImportDriveMedia => ImportDriveMedia != null; + + /// + /// + /// + public bool TryPickImportDriveMedia( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Descript.DriveMediaImportJobStatus? value) + { + value = ImportDriveMedia; + return IsImportDriveMedia; + } + + /// + /// + /// + public global::Descript.DriveMediaImportJobStatus PickImportDriveMedia() => ImportDriveMedia is { } value + ? value + : throw new global::System.InvalidOperationException($"Expected union variant 'ImportDriveMedia' but the value was {ToString()}."); + /// /// Status of an Agent edit job /// @@ -148,6 +185,29 @@ public JobStatus(global::Descript.ImportJobStatus? value) ///
public static JobStatus FromImportProjectMedia(global::Descript.ImportJobStatus? value) => new JobStatus(value); + /// + /// + /// + public static implicit operator JobStatus(global::Descript.DriveMediaImportJobStatus value) => new JobStatus((global::Descript.DriveMediaImportJobStatus?)value); + + /// + /// + /// + public static implicit operator global::Descript.DriveMediaImportJobStatus?(JobStatus @this) => @this.ImportDriveMedia; + + /// + /// + /// + public JobStatus(global::Descript.DriveMediaImportJobStatus? value) + { + ImportDriveMedia = value; + } + + /// + /// + /// + public static JobStatus FromImportDriveMedia(global::Descript.DriveMediaImportJobStatus? value) => new JobStatus(value); + /// /// /// @@ -200,6 +260,7 @@ public JobStatus(global::Descript.PublishJobStatus? value) public JobStatus( global::Descript.JobStatusDiscriminatorJobType? jobType, global::Descript.ImportJobStatus? importProjectMedia, + global::Descript.DriveMediaImportJobStatus? importDriveMedia, global::Descript.AgentJobStatus? agent, global::Descript.PublishJobStatus? publish ) @@ -207,6 +268,7 @@ public JobStatus( JobType = jobType; ImportProjectMedia = importProjectMedia; + ImportDriveMedia = importDriveMedia; Agent = agent; Publish = publish; } @@ -217,6 +279,7 @@ public JobStatus( public object? Object => Publish as object ?? Agent as object ?? + ImportDriveMedia as object ?? ImportProjectMedia as object ; @@ -225,6 +288,7 @@ ImportProjectMedia as object /// public override string? ToString() => ImportProjectMedia?.ToString() ?? + ImportDriveMedia?.ToString() ?? Agent?.ToString() ?? Publish?.ToString() ; @@ -234,7 +298,7 @@ ImportProjectMedia as object /// public bool Validate() { - return IsImportProjectMedia && !IsAgent && !IsPublish || !IsImportProjectMedia && IsAgent && !IsPublish || !IsImportProjectMedia && !IsAgent && IsPublish; + return IsImportProjectMedia && !IsImportDriveMedia && !IsAgent && !IsPublish || !IsImportProjectMedia && IsImportDriveMedia && !IsAgent && !IsPublish || !IsImportProjectMedia && !IsImportDriveMedia && IsAgent && !IsPublish || !IsImportProjectMedia && !IsImportDriveMedia && !IsAgent && IsPublish; } /// @@ -242,6 +306,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? importProjectMedia = null, + global::System.Func? importDriveMedia = null, global::System.Func? agent = null, global::System.Func? publish = null, bool validate = true) @@ -255,13 +320,17 @@ public bool Validate() { return importProjectMedia(__value0); } - else if (Agent is { } __value1 && agent != null) + else if (ImportDriveMedia is { } __value1 && importDriveMedia != null) + { + return importDriveMedia(__value1); + } + else if (Agent is { } __value2 && agent != null) { - return agent(__value1); + return agent(__value2); } - else if (Publish is { } __value2 && publish != null) + else if (Publish is { } __value3 && publish != null) { - return publish(__value2); + return publish(__value3); } return default(TResult); @@ -273,6 +342,8 @@ public bool Validate() public void Match( global::System.Action? importProjectMedia = null, + global::System.Action? importDriveMedia = null, + global::System.Action? agent = null, global::System.Action? publish = null, @@ -287,13 +358,17 @@ public void Match( { importProjectMedia?.Invoke(__value0); } - else if (Agent is { } __value1) + else if (ImportDriveMedia is { } __value1) + { + importDriveMedia?.Invoke(__value1); + } + else if (Agent is { } __value2) { - agent?.Invoke(__value1); + agent?.Invoke(__value2); } - else if (Publish is { } __value2) + else if (Publish is { } __value3) { - publish?.Invoke(__value2); + publish?.Invoke(__value3); } } @@ -302,6 +377,7 @@ public void Match( /// public void Switch( global::System.Action? importProjectMedia = null, + global::System.Action? importDriveMedia = null, global::System.Action? agent = null, global::System.Action? publish = null, bool validate = true) @@ -315,13 +391,17 @@ public void Switch( { importProjectMedia?.Invoke(__value0); } - else if (Agent is { } __value1) + else if (ImportDriveMedia is { } __value1) + { + importDriveMedia?.Invoke(__value1); + } + else if (Agent is { } __value2) { - agent?.Invoke(__value1); + agent?.Invoke(__value2); } - else if (Publish is { } __value2) + else if (Publish is { } __value3) { - publish?.Invoke(__value2); + publish?.Invoke(__value3); } } @@ -334,6 +414,8 @@ public override int GetHashCode() { ImportProjectMedia, typeof(global::Descript.ImportJobStatus), + ImportDriveMedia, + typeof(global::Descript.DriveMediaImportJobStatus), Agent, typeof(global::Descript.AgentJobStatus), Publish, @@ -355,6 +437,7 @@ public bool Equals(JobStatus other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(ImportProjectMedia, other.ImportProjectMedia) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImportDriveMedia, other.ImportDriveMedia) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Agent, other.Agent) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Publish, other.Publish) ; diff --git a/src/libs/Descript/Generated/Descript.Models.JobStatusDiscriminatorJobType.g.cs b/src/libs/Descript/Generated/Descript.Models.JobStatusDiscriminatorJobType.g.cs index ef2e438..cc2212d 100644 --- a/src/libs/Descript/Generated/Descript.Models.JobStatusDiscriminatorJobType.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.JobStatusDiscriminatorJobType.g.cs @@ -15,6 +15,10 @@ public enum JobStatusDiscriminatorJobType /// /// /// + ImportDriveMedia, + /// + /// + /// ImportProjectMedia, /// /// @@ -35,6 +39,7 @@ public static string ToValueString(this JobStatusDiscriminatorJobType value) return value switch { JobStatusDiscriminatorJobType.Agent => "agent", + JobStatusDiscriminatorJobType.ImportDriveMedia => "import/drive_media", JobStatusDiscriminatorJobType.ImportProjectMedia => "import/project_media", JobStatusDiscriminatorJobType.Publish => "publish", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), @@ -48,6 +53,7 @@ public static string ToValueString(this JobStatusDiscriminatorJobType value) return value switch { "agent" => JobStatusDiscriminatorJobType.Agent, + "import/drive_media" => JobStatusDiscriminatorJobType.ImportDriveMedia, "import/project_media" => JobStatusDiscriminatorJobType.ImportProjectMedia, "publish" => JobStatusDiscriminatorJobType.Publish, _ => null, diff --git a/src/libs/Descript/Generated/Descript.Models.ListJobsType.g.cs b/src/libs/Descript/Generated/Descript.Models.ListJobsType.g.cs index 6f0fa7b..c4afe9c 100644 --- a/src/libs/Descript/Generated/Descript.Models.ListJobsType.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.ListJobsType.g.cs @@ -15,7 +15,15 @@ public enum ListJobsType /// /// /// + ImportDriveMedia, + /// + /// + /// ImportProjectMedia, + /// + /// + /// + Publish, } /// @@ -31,7 +39,9 @@ public static string ToValueString(this ListJobsType value) return value switch { ListJobsType.Agent => "agent", + ListJobsType.ImportDriveMedia => "import/drive_media", ListJobsType.ImportProjectMedia => "import/project_media", + ListJobsType.Publish => "publish", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -43,7 +53,9 @@ public static string ToValueString(this ListJobsType value) return value switch { "agent" => ListJobsType.Agent, + "import/drive_media" => ListJobsType.ImportDriveMedia, "import/project_media" => ListJobsType.ImportProjectMedia, + "publish" => ListJobsType.Publish, _ => null, }; } diff --git a/src/libs/Descript/Generated/Descript.Models.MediaUploadReference.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.MediaUploadReference.Json.g.cs new file mode 100644 index 0000000..cd2e256 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.MediaUploadReference.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class MediaUploadReference + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.MediaUploadReference? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.MediaUploadReference), + jsonSerializerContext) as global::Descript.MediaUploadReference; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.MediaUploadReference? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.MediaUploadReference? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.MediaUploadReference), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.MediaUploadReference; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.MediaUploadReference.g.cs b/src/libs/Descript/Generated/Descript.Models.MediaUploadReference.g.cs new file mode 100644 index 0000000..cea05cd --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.MediaUploadReference.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class MediaUploadReference + { + /// + /// MIME type of the file to upload (e.g. "video/mp4"). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content_type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ContentType { get; set; } + + /// + /// File size in bytes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_size")] + [global::System.Text.Json.Serialization.JsonRequired] + public required long FileSize { get; set; } + + /// + /// ISO 639-1 language code for transcription (e.g., "en", "es"). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { 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. + /// + /// + /// MIME type of the file to upload (e.g. "video/mp4"). + /// + /// + /// File size in bytes. + /// + /// + /// ISO 639-1 language code for transcription (e.g., "en", "es"). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MediaUploadReference( + string contentType, + long fileSize, + string? language) + { + this.ContentType = contentType ?? throw new global::System.ArgumentNullException(nameof(contentType)); + this.FileSize = fileSize; + this.Language = language; + } + + /// + /// Initializes a new instance of the class. + /// + public MediaUploadReference() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.MediaUrlReference.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.MediaUrlReference.Json.g.cs new file mode 100644 index 0000000..6dabbab --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.MediaUrlReference.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class MediaUrlReference + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.MediaUrlReference? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.MediaUrlReference), + jsonSerializerContext) as global::Descript.MediaUrlReference; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.MediaUrlReference? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.MediaUrlReference? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.MediaUrlReference), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.MediaUrlReference; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.MediaUrlReference.g.cs b/src/libs/Descript/Generated/Descript.Models.MediaUrlReference.g.cs new file mode 100644 index 0000000..db2cec8 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.MediaUrlReference.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class MediaUrlReference + { + /// + /// URL to download the media file from. Recommended signed for 12+ hours. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { get; set; } + + /// + /// ISO 639-1 language code for transcription (e.g., "en", "es"). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { 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. + /// + /// + /// URL to download the media file from. Recommended signed for 12+ hours. + /// + /// + /// ISO 639-1 language code for transcription (e.g., "en", "es"). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MediaUrlReference( + string url, + string? language) + { + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + this.Language = language; + } + + /// + /// Initializes a new instance of the class. + /// + public MediaUrlReference() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.PublishJobStatus.g.cs b/src/libs/Descript/Generated/Descript.Models.PublishJobStatus.g.cs index 339fa85..c8671bc 100644 --- a/src/libs/Descript/Generated/Descript.Models.PublishJobStatus.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.PublishJobStatus.g.cs @@ -92,8 +92,8 @@ public sealed partial class PublishJobStatus /// Job result (only present when job_state is stopped) /// [global::System.Text.Json.Serialization.JsonPropertyName("result")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.Result3JsonConverter))] - public global::Descript.Result3? Result { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.Result4JsonConverter))] + public global::Descript.Result4? Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -158,7 +158,7 @@ public PublishJobStatus( global::Descript.PublishJobStatusJobType jobType, global::System.DateTime? stoppedAt, global::Descript.PublishJobStatusProgress? progress, - global::Descript.Result3? result) + global::Descript.Result4? result) { this.JobId = jobId; this.JobType = jobType; diff --git a/src/libs/Descript/Generated/Descript.Models.Result3.g.cs b/src/libs/Descript/Generated/Descript.Models.Result3.g.cs index 9d57c51..0be3ecd 100644 --- a/src/libs/Descript/Generated/Descript.Models.Result3.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.Result3.g.cs @@ -12,15 +12,15 @@ namespace Descript /// /// /// - public global::Descript.PublishJobStatusResultDiscriminatorStatus? Status { get; } + public global::Descript.AgentJobStatusResultDiscriminatorStatus? Status { get; } /// - /// Result when publish completed successfully + /// Result when Agent edit completed successfully /// #if NET6_0_OR_GREATER - public global::Descript.PublishSuccessResult? Success { get; init; } + public global::Descript.AgentSuccessResult? Success { get; init; } #else - public global::Descript.PublishSuccessResult? Success { get; } + public global::Descript.AgentSuccessResult? Success { get; } #endif /// @@ -38,7 +38,7 @@ public bool TryPickSuccess( #if NET6_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out global::Descript.PublishSuccessResult? value) + out global::Descript.AgentSuccessResult? value) { value = Success; return IsSuccess; @@ -47,17 +47,17 @@ public bool TryPickSuccess( /// /// /// - public global::Descript.PublishSuccessResult PickSuccess() => Success is { } value + public global::Descript.AgentSuccessResult PickSuccess() => Success is { } value ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Success' but the value was {ToString()}."); /// - /// Result when publish failed + /// Result when Agent edit failed /// #if NET6_0_OR_GREATER - public global::Descript.PublishErrorResult? Error { get; init; } + public global::Descript.AgentErrorResult? Error { get; init; } #else - public global::Descript.PublishErrorResult? Error { get; } + public global::Descript.AgentErrorResult? Error { get; } #endif /// @@ -75,7 +75,7 @@ public bool TryPickError( #if NET6_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out global::Descript.PublishErrorResult? value) + out global::Descript.AgentErrorResult? value) { value = Error; return IsError; @@ -84,23 +84,23 @@ public bool TryPickError( /// /// /// - public global::Descript.PublishErrorResult PickError() => Error is { } value + public global::Descript.AgentErrorResult PickError() => Error is { } value ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Error' but the value was {ToString()}."); /// /// /// - public static implicit operator Result3(global::Descript.PublishSuccessResult value) => new Result3((global::Descript.PublishSuccessResult?)value); + public static implicit operator Result3(global::Descript.AgentSuccessResult value) => new Result3((global::Descript.AgentSuccessResult?)value); /// /// /// - public static implicit operator global::Descript.PublishSuccessResult?(Result3 @this) => @this.Success; + public static implicit operator global::Descript.AgentSuccessResult?(Result3 @this) => @this.Success; /// /// /// - public Result3(global::Descript.PublishSuccessResult? value) + public Result3(global::Descript.AgentSuccessResult? value) { Success = value; } @@ -108,22 +108,22 @@ public Result3(global::Descript.PublishSuccessResult? value) /// /// /// - public static Result3 FromSuccess(global::Descript.PublishSuccessResult? value) => new Result3(value); + public static Result3 FromSuccess(global::Descript.AgentSuccessResult? value) => new Result3(value); /// /// /// - public static implicit operator Result3(global::Descript.PublishErrorResult value) => new Result3((global::Descript.PublishErrorResult?)value); + public static implicit operator Result3(global::Descript.AgentErrorResult value) => new Result3((global::Descript.AgentErrorResult?)value); /// /// /// - public static implicit operator global::Descript.PublishErrorResult?(Result3 @this) => @this.Error; + public static implicit operator global::Descript.AgentErrorResult?(Result3 @this) => @this.Error; /// /// /// - public Result3(global::Descript.PublishErrorResult? value) + public Result3(global::Descript.AgentErrorResult? value) { Error = value; } @@ -131,15 +131,15 @@ public Result3(global::Descript.PublishErrorResult? value) /// /// /// - public static Result3 FromError(global::Descript.PublishErrorResult? value) => new Result3(value); + public static Result3 FromError(global::Descript.AgentErrorResult? value) => new Result3(value); /// /// /// public Result3( - global::Descript.PublishJobStatusResultDiscriminatorStatus? status, - global::Descript.PublishSuccessResult? success, - global::Descript.PublishErrorResult? error + global::Descript.AgentJobStatusResultDiscriminatorStatus? status, + global::Descript.AgentSuccessResult? success, + global::Descript.AgentErrorResult? error ) { Status = status; @@ -176,8 +176,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? success = null, - global::System.Func? error = null, + global::System.Func? success = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -201,9 +201,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? success = null, + global::System.Action? success = null, - global::System.Action? error = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -225,8 +225,8 @@ public void Match( /// /// public void Switch( - global::System.Action? success = null, - global::System.Action? error = null, + global::System.Action? success = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -252,9 +252,9 @@ public override int GetHashCode() var fields = new object?[] { Success, - typeof(global::Descript.PublishSuccessResult), + typeof(global::Descript.AgentSuccessResult), Error, - typeof(global::Descript.PublishErrorResult), + typeof(global::Descript.AgentErrorResult), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -271,8 +271,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(Result3 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Success, other.Success) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Success, other.Success) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) ; } diff --git a/src/libs/Descript/Generated/Descript.Models.Result2.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.Result4.Json.g.cs similarity index 91% rename from src/libs/Descript/Generated/Descript.Models.Result2.Json.g.cs rename to src/libs/Descript/Generated/Descript.Models.Result4.Json.g.cs index 8f041e9..9fe55df 100644 --- a/src/libs/Descript/Generated/Descript.Models.Result2.Json.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.Result4.Json.g.cs @@ -2,7 +2,7 @@ namespace Descript { - public readonly partial struct Result2 + public readonly partial struct Result4 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Descript.Result2? FromJson( + public static global::Descript.Result4? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Descript.Result2), - jsonSerializerContext) as global::Descript.Result2?; + typeof(global::Descript.Result4), + jsonSerializerContext) as global::Descript.Result4?; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Descript.Result2? FromJson( + public static global::Descript.Result4? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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::Descript.Result2? FromJson( + public static global::Descript.Result4? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Descript.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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::Descript.Result2), - jsonSerializerContext).ConfigureAwait(false)) as global::Descript.Result2?; + typeof(global::Descript.Result4), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.Result4?; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Descript.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Descript/Generated/Descript.Models.Result2.g.cs b/src/libs/Descript/Generated/Descript.Models.Result4.g.cs similarity index 65% rename from src/libs/Descript/Generated/Descript.Models.Result2.g.cs rename to src/libs/Descript/Generated/Descript.Models.Result4.g.cs index de79cce..d4017b8 100644 --- a/src/libs/Descript/Generated/Descript.Models.Result2.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.Result4.g.cs @@ -7,20 +7,20 @@ namespace Descript /// /// Job result (only present when job_state is stopped) /// - public readonly partial struct Result2 : global::System.IEquatable + public readonly partial struct Result4 : global::System.IEquatable { /// /// /// - public global::Descript.AgentJobStatusResultDiscriminatorStatus? Status { get; } + public global::Descript.PublishJobStatusResultDiscriminatorStatus? Status { get; } /// - /// Result when Agent edit completed successfully + /// Result when publish completed successfully /// #if NET6_0_OR_GREATER - public global::Descript.AgentSuccessResult? Success { get; init; } + public global::Descript.PublishSuccessResult? Success { get; init; } #else - public global::Descript.AgentSuccessResult? Success { get; } + public global::Descript.PublishSuccessResult? Success { get; } #endif /// @@ -38,7 +38,7 @@ public bool TryPickSuccess( #if NET6_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out global::Descript.AgentSuccessResult? value) + out global::Descript.PublishSuccessResult? value) { value = Success; return IsSuccess; @@ -47,17 +47,17 @@ public bool TryPickSuccess( /// /// /// - public global::Descript.AgentSuccessResult PickSuccess() => Success is { } value + public global::Descript.PublishSuccessResult PickSuccess() => Success is { } value ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Success' but the value was {ToString()}."); /// - /// Result when Agent edit failed + /// Result when publish failed /// #if NET6_0_OR_GREATER - public global::Descript.AgentErrorResult? Error { get; init; } + public global::Descript.PublishErrorResult? Error { get; init; } #else - public global::Descript.AgentErrorResult? Error { get; } + public global::Descript.PublishErrorResult? Error { get; } #endif /// @@ -75,7 +75,7 @@ public bool TryPickError( #if NET6_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out global::Descript.AgentErrorResult? value) + out global::Descript.PublishErrorResult? value) { value = Error; return IsError; @@ -84,23 +84,23 @@ public bool TryPickError( /// /// /// - public global::Descript.AgentErrorResult PickError() => Error is { } value + public global::Descript.PublishErrorResult PickError() => Error is { } value ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Error' but the value was {ToString()}."); /// /// /// - public static implicit operator Result2(global::Descript.AgentSuccessResult value) => new Result2((global::Descript.AgentSuccessResult?)value); + public static implicit operator Result4(global::Descript.PublishSuccessResult value) => new Result4((global::Descript.PublishSuccessResult?)value); /// /// /// - public static implicit operator global::Descript.AgentSuccessResult?(Result2 @this) => @this.Success; + public static implicit operator global::Descript.PublishSuccessResult?(Result4 @this) => @this.Success; /// /// /// - public Result2(global::Descript.AgentSuccessResult? value) + public Result4(global::Descript.PublishSuccessResult? value) { Success = value; } @@ -108,22 +108,22 @@ public Result2(global::Descript.AgentSuccessResult? value) /// /// /// - public static Result2 FromSuccess(global::Descript.AgentSuccessResult? value) => new Result2(value); + public static Result4 FromSuccess(global::Descript.PublishSuccessResult? value) => new Result4(value); /// /// /// - public static implicit operator Result2(global::Descript.AgentErrorResult value) => new Result2((global::Descript.AgentErrorResult?)value); + public static implicit operator Result4(global::Descript.PublishErrorResult value) => new Result4((global::Descript.PublishErrorResult?)value); /// /// /// - public static implicit operator global::Descript.AgentErrorResult?(Result2 @this) => @this.Error; + public static implicit operator global::Descript.PublishErrorResult?(Result4 @this) => @this.Error; /// /// /// - public Result2(global::Descript.AgentErrorResult? value) + public Result4(global::Descript.PublishErrorResult? value) { Error = value; } @@ -131,15 +131,15 @@ public Result2(global::Descript.AgentErrorResult? value) /// /// /// - public static Result2 FromError(global::Descript.AgentErrorResult? value) => new Result2(value); + public static Result4 FromError(global::Descript.PublishErrorResult? value) => new Result4(value); /// /// /// - public Result2( - global::Descript.AgentJobStatusResultDiscriminatorStatus? status, - global::Descript.AgentSuccessResult? success, - global::Descript.AgentErrorResult? error + public Result4( + global::Descript.PublishJobStatusResultDiscriminatorStatus? status, + global::Descript.PublishSuccessResult? success, + global::Descript.PublishErrorResult? error ) { Status = status; @@ -176,8 +176,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? success = null, - global::System.Func? error = null, + global::System.Func? success = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -201,9 +201,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? success = null, + global::System.Action? success = null, - global::System.Action? error = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -225,8 +225,8 @@ public void Match( /// /// public void Switch( - global::System.Action? success = null, - global::System.Action? error = null, + global::System.Action? success = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -252,9 +252,9 @@ public override int GetHashCode() var fields = new object?[] { Success, - typeof(global::Descript.AgentSuccessResult), + typeof(global::Descript.PublishSuccessResult), Error, - typeof(global::Descript.AgentErrorResult), + typeof(global::Descript.PublishErrorResult), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -268,26 +268,26 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null /// /// /// - public bool Equals(Result2 other) + public bool Equals(Result4 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Success, other.Success) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Success, other.Success) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) ; } /// /// /// - public static bool operator ==(Result2 obj1, Result2 obj2) + public static bool operator ==(Result4 obj1, Result4 obj2) { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); } /// /// /// - public static bool operator !=(Result2 obj1, Result2 obj2) + public static bool operator !=(Result4 obj1, Result4 obj2) { return !(obj1 == obj2); } @@ -297,7 +297,7 @@ public bool Equals(Result2 other) /// public override bool Equals(object? obj) { - return obj is Result2 o && Equals(o); + return obj is Result4 o && Equals(o); } } } diff --git a/src/libs/Descript/Generated/Descript.OneOf.2.Json.g.cs b/src/libs/Descript/Generated/Descript.OneOf.2.Json.g.cs new file mode 100644 index 0000000..b959a33 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.OneOf.2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public readonly partial struct OneOf + { + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.OneOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.OneOf), + jsonSerializerContext) as global::Descript.OneOf?; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.OneOf? FromJson( + string json) + { + return FromJson( + json, + global::Descript.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::Descript.OneOf? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.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::Descript.OneOf), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.OneOf?; + } + + /// + /// 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::Descript.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::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.OneOf.2.g.cs b/src/libs/Descript/Generated/Descript.OneOf.2.g.cs new file mode 100644 index 0000000..db685ae --- /dev/null +++ b/src/libs/Descript/Generated/Descript.OneOf.2.g.cs @@ -0,0 +1,294 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public bool TryPickValue1( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T1? value) + { + value = Value1; + return IsValue1; + } + + /// + /// + /// + public T1 PickValue1() => Value1 is { } value + ? value + : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public bool TryPickValue2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out T2? value) + { + value = Value2; + return IsValue2; + } + + /// + /// + /// + public T2 PickValue2() => Value2 is { } value + ? value + : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator OneOf(T1 value) => new OneOf((T1?)value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public static OneOf FromValue1(T1? value) => new OneOf(value); + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public static OneOf FromValue2(T2? value) => new OneOf(value); + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? value1 = null, + global::System.Func? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (Value1 is { } __value0 && value1 != null) + { + return value1(__value0); + } + else if (Value2 is { } __value1 && value2 != null) + { + return value2(__value1); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? value1 = null, + + global::System.Action? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (Value1 is { } __value0) + { + value1?.Invoke(__value0); + } + else if (Value2 is { } __value1) + { + value2?.Invoke(__value1); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? value1 = null, + global::System.Action? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (Value1 is { } __value0) + { + value1?.Invoke(__value0); + } + else if (Value2 is { } __value1) + { + value2?.Invoke(__value1); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/libs/Descript/Generated/autosdk.generated-examples.json b/src/libs/Descript/Generated/autosdk.generated-examples.json index cd84d25..d8f78be 100644 --- a/src/libs/Descript/Generated/autosdk.generated-examples.json +++ b/src/libs/Descript/Generated/autosdk.generated-examples.json @@ -92,7 +92,7 @@ "Order": 9, "Title": "List jobs", "Slug": "listjobs", - "Description": "List recent jobs with optional filtering by project or job type.\n\nBy default, jobs created within the last 7 days are returned. Use \u0060created_after\u0060 and\n\u0060created_before\u0060 to customize the time range. The maximum lookback is 30 days.\n\nResults are paginated. Use the \u0060cursor\u0060 from the response \u0060pagination.next_cursor\u0060 to\nfetch subsequent pages.\n\nQuery parameters allow you to filter the results:\n* Filter by \u0060project_id\u0060 to see all jobs for a project\n* Filter by \u0060type\u0060 to see specific job types (import/project_media, agent)", + "Description": "List recent jobs with optional filtering by project or job type.\n\nBy default, jobs created within the last 7 days are returned. Use \u0060created_after\u0060 and\n\u0060created_before\u0060 to customize the time range. The maximum lookback is 30 days.\n\nResults are paginated. Use the \u0060cursor\u0060 from the response \u0060pagination.next_cursor\u0060 to\nfetch subsequent pages.\n\nQuery parameters allow you to filter the results:\n* Filter by \u0060project_id\u0060 to see all jobs for a project\n* Filter by \u0060type\u0060 to see specific job types (import/project_media, import/drive_media, agent, publish)", "Language": "csharp", "Code": "using var client = new DescriptClient(apiKey);\nvar response = await client.ApiEndpoints.ListJobsAsync();\n\n// Example response:\n// {\n// \u0022data\u0022: [\n// {\n// \u0022job_id\u0022: \u00226dc3f30a-58c2-4174-96a6-dc18cf3c7776\u0022,\n// \u0022job_type\u0022: \u0022import/project_media\u0022,\n// \u0022job_state\u0022: \u0022stopped\u0022,\n// \u0022created_at\u0022: \u00222025-11-18T10:30:00Z\u0022,\n// \u0022stopped_at\u0022: \u00222025-11-18T10:35:00Z\u0022,\n// \u0022drive_id\u0022: \u0022c9c5c47e-158a-49f7-846b-4f6ee2a229a2\u0022,\n// \u0022project_id\u0022: \u00229f36ee32-5a2c-47e7-b1a3-94991d3e3ddb\u0022,\n// \u0022project_url\u0022: \u0022https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb\u0022,\n// \u0022result\u0022: {\n// \u0022status\u0022: \u0022success\u0022,\n// \u0022media_status\u0022: {\n// \u0022Misc/intro.mp4\u0022: {\n// \u0022status\u0022: \u0022success\u0022,\n// \u0022duration_seconds\u0022: 10.5\n// }\n// },\n// \u0022media_seconds_used\u0022: 11\n// }\n// },\n// {\n// \u0022job_id\u0022: \u0022a1b2c3d4-5678-90ab-cdef-1234567890ab\u0022,\n// \u0022job_type\u0022: \u0022agent\u0022,\n// \u0022job_state\u0022: \u0022running\u0022,\n// \u0022created_at\u0022: \u00222025-11-18T11:00:00Z\u0022,\n// \u0022drive_id\u0022: \u0022c9c5c47e-158a-49f7-846b-4f6ee2a229a2\u0022,\n// \u0022project_id\u0022: \u00229f36ee32-5a2c-47e7-b1a3-94991d3e3ddb\u0022,\n// \u0022project_url\u0022: \u0022https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb\u0022,\n// \u0022progress\u0022: {\n// \u0022label\u0022: \u0022Applying Studio Sound to clip 2...\u0022,\n// \u0022last_update_at\u0022: \u00222025-11-18T11:01:00Z\u0022\n// }\n// }\n// ],\n// \u0022pagination\u0022: {\n// \u0022next_cursor\u0022: \u0022YTFiMmMzZDQtNTY3OC05MGFiLWNkZWYtMTIzNDU2Nzg5MGFi\u0022\n// }\n// }", "Format": "sdk", diff --git a/src/libs/Descript/openapi.yaml b/src/libs/Descript/openapi.yaml index 2b2a8f6..e0087f9 100644 --- a/src/libs/Descript/openapi.yaml +++ b/src/libs/Descript/openapi.yaml @@ -911,6 +911,62 @@ paths: message: Drive not found '429': $ref: '#/components/responses/Error429Response' + /jobs/import/drive_media: + post: + tags: + - API Endpoints + summary: Import media to drive library + security: + - bearerAuth: [] + description: | + Import media files into the drive media library (shared workspace-level media collection). + + Unlike project media import, this endpoint adds files to the drive's shared media library + rather than to a specific project. Files can optionally be placed in a folder. + + ### Media URL requirements + - URLs must be accessible by Descript servers + - URLs must support HTTP Range requests + - Recommended to sign URLs for 12-48 hours to reduce chance of failure + - [Supported file types](https://help.descript.com/add-and-manage-media/supported-file-types) + + ### Direct file upload + + Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough. + + ### Async Operations + + Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint. + + ### Dynamic webhook + + If `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not). + operationId: importDriveMedia + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DriveMediaImportRequest' + required: true + responses: + '201': + description: Job created + content: + application/json: + schema: + $ref: '#/components/schemas/DriveMediaImportResponse' + '400': + description: Invalid request + '401': + description: Unauthorized + '402': + description: Insufficient media minutes + '403': + description: Forbidden + '404': + description: Folder not found + '429': + description: Too many requests /jobs/agent: post: tags: @@ -1786,7 +1842,7 @@ paths: Query parameters allow you to filter the results: * Filter by `project_id` to see all jobs for a project - * Filter by `type` to see specific job types (import/project_media, agent) + * Filter by `type` to see specific job types (import/project_media, import/drive_media, agent, publish) operationId: listJobs security: - bearerAuth: [] @@ -1806,7 +1862,9 @@ paths: type: string enum: - import/project_media + - import/drive_media - agent + - publish - in: query name: cursor description: Cursor for the next page of results, obtained from `pagination.next_cursor` in a previous response @@ -3529,6 +3587,95 @@ components: - error - message - state + MediaUrlReference: + type: object + required: + - url + properties: + url: + type: string + format: uri + description: URL to download the media file from. Recommended signed for 12+ hours. + language: + type: string + description: ISO 639-1 language code for transcription (e.g., "en", "es"). + MediaUploadReference: + type: object + required: + - content_type + - file_size + properties: + content_type: + type: string + description: MIME type of the file to upload (e.g. "video/mp4"). + file_size: + type: integer + minimum: 1 + description: File size in bytes. + language: + type: string + description: ISO 639-1 language code for transcription (e.g., "en", "es"). + DriveMediaImportRequest: + type: object + required: + - add_media + properties: + folder_id: + type: string + description: Target drive media folder ID (UUID) or "root" for the root folder. If not provided, defaults to root. + add_media: + type: object + description: | + Map of media reference IDs to their import definitions. Key is the display name + or path (e.g. "video.mp4" or "Folder/SubFolder/video.mp4"). Paths with forward + slashes create nested folders automatically. + minProperties: 1 + maxProperties: 100 + additionalProperties: + oneOf: + - $ref: '#/components/schemas/MediaUrlReference' + - $ref: '#/components/schemas/MediaUploadReference' + callback_url: + type: string + format: uri + description: Optional callback URL to receive notifications about job status changes. + DriveMediaImportResponse: + type: object + required: + - job_id + - drive_id + - folder_id + properties: + job_id: + type: string + description: The ID of the created import job. Use this to query job status. + drive_id: + type: string + description: The drive ID where the media is being imported. + drive_name: + type: string + nullable: true + description: Human-readable name of the connected drive (workspace) + example: My Team Workspace + folder_id: + type: string + description: The target folder ID in the drive media library. + upload_urls: + type: object + description: Signed upload URLs for direct upload media items. Only present when the request includes direct upload references. + additionalProperties: + type: object + properties: + upload_url: + type: string + format: uri + description: Signed URL to PUT the file bytes to. + asset_id: + type: string + description: The asset ID for the uploaded file. + artifact_id: + type: string + description: The artifact ID for the uploaded file. ImportSuccessResult: type: object title: ImportSuccessResult @@ -3709,6 +3856,108 @@ components: - drive_id - project_id - project_url + DriveMediaImportJobStatus: + type: object + description: Job status for a drive media import job. + properties: + job_id: + type: string + description: The job ID. + job_type: + type: string + enum: + - import/drive_media + job_state: + type: string + enum: + - queued + - running + - stopped + - cancelled + created_at: + type: string + format: date-time + description: When the job was created. + stopped_at: + type: string + format: date-time + description: When the job stopped (only present when job_state is stopped or cancelled). + drive_id: + type: string + description: The drive ID. + drive_name: + type: string + nullable: true + description: Human-readable name of the connected drive (workspace) + example: My Team Workspace + folder_id: + type: string + description: The target folder ID. + progress: + type: object + description: Progress information for the workflow (only present when job_state is running) + properties: + label: + type: string + description: Human-readable label describing the current action + percent: + type: integer + description: Percentage of the workflow that has been completed + last_update_at: + type: string + format: date-time + description: When the progress was last updated + waiting_for_uploads: + type: boolean + description: Whether the job is still waiting for direct uploads to finish + uploaded_artifacts: + type: integer + description: Number of direct upload files received so far + total_artifacts: + type: integer + description: Total number of direct upload files expected + required: + - label + result: + oneOf: + - type: object + properties: + status: + type: string + enum: + - success + - partial + media_status: + type: object + additionalProperties: + type: object + properties: + status: + type: string + enum: + - success + - error + error_message: + type: string + duration_seconds: + type: number + media_seconds_used: + type: number + - type: object + properties: + status: + type: string + enum: + - error + error_message: + type: string + required: + - job_id + - job_type + - job_state + - created_at + - drive_id + - folder_id AgentSuccessResult: type: object title: AgentSuccessResult @@ -4043,12 +4292,14 @@ components: JobStatus: oneOf: - $ref: '#/components/schemas/ImportJobStatus' + - $ref: '#/components/schemas/DriveMediaImportJobStatus' - $ref: '#/components/schemas/AgentJobStatus' - $ref: '#/components/schemas/PublishJobStatus' discriminator: propertyName: job_type mapping: import/project_media: '#/components/schemas/ImportJobStatus' + import/drive_media: '#/components/schemas/DriveMediaImportJobStatus' agent: '#/components/schemas/AgentJobStatus' publish: '#/components/schemas/PublishJobStatus' export/timeline: '#/components/schemas/TimelineExportJobStatus'