From 37bec29b9461f1f19c15dd4091ec19d945f1beb9 Mon Sep 17 00:00:00 2001 From: HavenDV Date: Sat, 21 Sep 2024 20:36:45 +0400 Subject: [PATCH] test: Added Ideogram test files. --- src/libs/AutoSDK/Models/EndPoint.cs | 2 +- src/libs/AutoSDK/Models/PropertyData.cs | 11 +- ...ests.SdkGenerator_Diagnostics.verified.txt | 1 + .../_#G.Api.Authorizations..g.verified.cs | 21 + .../_#G.Api.Constructors..g.verified.cs | 28 + .../NewtonsoftJson/_#G.Api.g.verified.cs | 90 +++ ...rateClient.PostGenerateImage.g.verified.cs | 124 ++++ ...enerateClient.PostRemixImage.g.verified.cs | 147 +++++ ...erateClient.PostUpscaleImage.g.verified.cs | 147 +++++ .../_#G.GenerateClient.g.verified.cs | 66 ++ .../NewtonsoftJson/_#G.IApi.g.verified.cs | 36 ++ ...rateClient.PostGenerateImage.g.verified.cs | 30 + ...enerateClient.PostRemixImage.g.verified.cs | 42 ++ ...erateClient.PostUpscaleImage.g.verified.cs | 42 ++ .../_#G.IGenerateClient.g.verified.cs | 21 + ...G.IManageClient.CreateApiKey.g.verified.cs | 16 + ...ageClient.DeleteSingleApiKey.g.verified.cs | 18 + ..._#G.IManageClient.GetApiKeys.g.verified.cs | 16 + ...ent.GetApiStripeSubscription.g.verified.cs | 18 + ...ageClient.GetApiSubscription.g.verified.cs | 16 + ...#G.IManageClient.GetApiTerms.g.verified.cs | 16 + ...geClient.PostApiSubscription.g.verified.cs | 30 + ...G.IManageClient.PostApiTerms.g.verified.cs | 31 + ...lient.ReactivateSubscription.g.verified.cs | 16 + .../_#G.IManageClient.g.verified.cs | 21 + ...G.IVisionClient.PostDescribe.g.verified.cs | 30 + .../_#G.IVisionClient.g.verified.cs | 21 + ...#G.ManageClient.CreateApiKey.g.verified.cs | 88 +++ ...ageClient.DeleteSingleApiKey.g.verified.cs | 66 ++ .../_#G.ManageClient.GetApiKeys.g.verified.cs | 88 +++ ...ent.GetApiStripeSubscription.g.verified.cs | 97 +++ ...ageClient.GetApiSubscription.g.verified.cs | 88 +++ ..._#G.ManageClient.GetApiTerms.g.verified.cs | 88 +++ ...geClient.PostApiSubscription.g.verified.cs | 124 ++++ ...#G.ManageClient.PostApiTerms.g.verified.cs | 97 +++ ...lient.ReactivateSubscription.g.verified.cs | 88 +++ .../_#G.ManageClient.g.verified.cs | 66 ++ .../_#G.Models.ApiTerms.g.verified.cs | 30 + .../_#G.Models.AspectRatio.g.verified.cs | 119 ++++ ...#G.Models.ColorPaletteMember.g.verified.cs | 32 + ...odels.ColorPalettePresetName.g.verified.cs | 98 +++ ...dels.ColorPaletteWithMembers.g.verified.cs | 24 + ...s.ColorPaletteWithPresetName.g.verified.cs | 25 + ...letteWithPresetNameOrMembers.g.verified.cs | 167 +++++ .../_#G.Models.DescribeRequest.g.verified.cs | 30 + .../_#G.Models.DescribeResponse.g.verified.cs | 24 + .../_#G.Models.Description.g.verified.cs | 25 + ....Models.GenerateImageRequest.g.verified.cs | 24 + ...Models.GenerateImageResponse.g.verified.cs | 30 + ...els.GenerateImageSafetyError.g.verified.cs | 24 + ...#G.Models.GetApiKeysResponse.g.verified.cs | 24 + ...G.Models.GetApiTermsResponse.g.verified.cs | 24 + .../_#G.Models.ImageObject.g.verified.cs | 51 ++ .../_#G.Models.ImageRequest.g.verified.cs | 81 +++ .../_#G.Models.ImageSafetyError.g.verified.cs | 24 + ...G.Models.InitialImageRequest.g.verified.cs | 25 + ..._#G.Models.MagicPromptOption.g.verified.cs | 64 ++ ...piStripeSubscriptionResponse.g.verified.cs | 31 + ...anageApiSubscriptionResponse.g.verified.cs | 62 ++ .../_#G.Models.MetronomeLinks.g.verified.cs | 42 ++ .../_#G.Models.ModelEnum.g.verified.cs | 71 +++ ...#G.Models.PostApiKeyResponse.g.verified.cs | 32 + ...ls.PostApiReactivateResponse.g.verified.cs | 24 + ...els.PostApiSubscriptionError.g.verified.cs | 24 + ...s.PostApiSubscriptionRequest.g.verified.cs | 24 + ....PostApiSubscriptionResponse.g.verified.cs | 24 + ...G.Models.PostApiTermsRequest.g.verified.cs | 25 + .../_#G.Models.Price.g.verified.cs | 32 + .../_#G.Models.RechargeSettings.g.verified.cs | 30 + ...els.RechargeSettingsResponse.g.verified.cs | 24 + .../_#G.Models.RedactedApiKey.g.verified.cs | 38 ++ ..._#G.Models.RemixImageRequest.g.verified.cs | 36 ++ .../_#G.Models.Resolution.g.verified.cs | 588 ++++++++++++++++++ .../_#G.Models.StyleType.g.verified.cs | 84 +++ ...G.Models.UpscaleImageRequest.g.verified.cs | 36 ++ ...s.UpscaleInitialImageRequest.g.verified.cs | 53 ++ .../_#G.PathBuilder.g.verified.cs | 228 +++++++ .../_#G.Polyfills.g.verified.cs | 54 ++ ...#G.VisionClient.PostDescribe.g.verified.cs | 131 ++++ .../_#G.VisionClient.g.verified.cs | 66 ++ ...JsonConverters.UnixTimestamp.g.verified.cs | 40 ++ ...ests.SdkGenerator_Diagnostics.verified.txt | 1 + .../_#G.Api.Authorizations..g.verified.cs | 21 + .../_#G.Api.Constructors..g.verified.cs | 28 + .../SystemTextJson/_#G.Api.g.verified.cs | 110 ++++ ...rateClient.PostGenerateImage.g.verified.cs | 124 ++++ ...enerateClient.PostRemixImage.g.verified.cs | 147 +++++ ...erateClient.PostUpscaleImage.g.verified.cs | 147 +++++ .../_#G.GenerateClient.g.verified.cs | 66 ++ .../SystemTextJson/_#G.IApi.g.verified.cs | 36 ++ ...rateClient.PostGenerateImage.g.verified.cs | 30 + ...enerateClient.PostRemixImage.g.verified.cs | 42 ++ ...erateClient.PostUpscaleImage.g.verified.cs | 42 ++ .../_#G.IGenerateClient.g.verified.cs | 21 + ...G.IManageClient.CreateApiKey.g.verified.cs | 16 + ...ageClient.DeleteSingleApiKey.g.verified.cs | 18 + ..._#G.IManageClient.GetApiKeys.g.verified.cs | 16 + ...ent.GetApiStripeSubscription.g.verified.cs | 18 + ...ageClient.GetApiSubscription.g.verified.cs | 16 + ...#G.IManageClient.GetApiTerms.g.verified.cs | 16 + ...geClient.PostApiSubscription.g.verified.cs | 30 + ...G.IManageClient.PostApiTerms.g.verified.cs | 31 + ...lient.ReactivateSubscription.g.verified.cs | 16 + .../_#G.IManageClient.g.verified.cs | 21 + ...G.IVisionClient.PostDescribe.g.verified.cs | 30 + .../_#G.IVisionClient.g.verified.cs | 21 + ...#G.ManageClient.CreateApiKey.g.verified.cs | 88 +++ ...ageClient.DeleteSingleApiKey.g.verified.cs | 66 ++ .../_#G.ManageClient.GetApiKeys.g.verified.cs | 88 +++ ...ent.GetApiStripeSubscription.g.verified.cs | 97 +++ ...ageClient.GetApiSubscription.g.verified.cs | 88 +++ ..._#G.ManageClient.GetApiTerms.g.verified.cs | 88 +++ ...geClient.PostApiSubscription.g.verified.cs | 124 ++++ ...#G.ManageClient.PostApiTerms.g.verified.cs | 97 +++ ...lient.ReactivateSubscription.g.verified.cs | 88 +++ .../_#G.ManageClient.g.verified.cs | 66 ++ .../_#G.Models.ApiTerms.g.verified.cs | 32 + .../_#G.Models.AspectRatio.g.verified.cs | 107 ++++ ...#G.Models.ColorPaletteMember.g.verified.cs | 34 + ...odels.ColorPalettePresetName.g.verified.cs | 89 +++ ...dels.ColorPaletteWithMembers.g.verified.cs | 25 + ...s.ColorPaletteWithPresetName.g.verified.cs | 27 + ...letteWithPresetNameOrMembers.g.verified.cs | 167 +++++ .../_#G.Models.DescribeRequest.g.verified.cs | 32 + .../_#G.Models.DescribeResponse.g.verified.cs | 24 + .../_#G.Models.Description.g.verified.cs | 25 + ....Models.GenerateImageRequest.g.verified.cs | 25 + ...Models.GenerateImageResponse.g.verified.cs | 32 + ...els.GenerateImageSafetyError.g.verified.cs | 25 + ...#G.Models.GetApiKeysResponse.g.verified.cs | 24 + ...G.Models.GetApiTermsResponse.g.verified.cs | 25 + .../_#G.Models.ImageObject.g.verified.cs | 55 ++ .../_#G.Models.ImageRequest.g.verified.cs | 88 +++ .../_#G.Models.ImageSafetyError.g.verified.cs | 25 + ...G.Models.InitialImageRequest.g.verified.cs | 25 + ..._#G.Models.MagicPromptOption.g.verified.cs | 60 ++ ...piStripeSubscriptionResponse.g.verified.cs | 31 + ...anageApiSubscriptionResponse.g.verified.cs | 64 ++ .../_#G.Models.MetronomeLinks.g.verified.cs | 42 ++ .../_#G.Models.ModelEnum.g.verified.cs | 66 ++ ...#G.Models.PostApiKeyResponse.g.verified.cs | 34 + ...ls.PostApiReactivateResponse.g.verified.cs | 24 + ...els.PostApiSubscriptionError.g.verified.cs | 24 + ...s.PostApiSubscriptionRequest.g.verified.cs | 24 + ....PostApiSubscriptionResponse.g.verified.cs | 24 + ...G.Models.PostApiTermsRequest.g.verified.cs | 26 + .../_#G.Models.Price.g.verified.cs | 34 + .../_#G.Models.RechargeSettings.g.verified.cs | 32 + ...els.RechargeSettingsResponse.g.verified.cs | 25 + .../_#G.Models.RedactedApiKey.g.verified.cs | 41 ++ ..._#G.Models.RemixImageRequest.g.verified.cs | 39 ++ .../_#G.Models.Resolution.g.verified.cs | 509 +++++++++++++++ .../_#G.Models.StyleType.g.verified.cs | 77 +++ ...G.Models.UpscaleImageRequest.g.verified.cs | 39 ++ ...s.UpscaleInitialImageRequest.g.verified.cs | 54 ++ .../_#G.PathBuilder.g.verified.cs | 228 +++++++ .../_#G.Polyfills.g.verified.cs | 54 ++ ...#G.VisionClient.PostDescribe.g.verified.cs | 131 ++++ .../_#G.VisionClient.g.verified.cs | 66 ++ ..._#JsonConverters.AspectRatio.g.verified.cs | 50 ++ ...nverters.AspectRatioNullable.g.verified.cs | 57 ++ ...rters.ColorPalettePresetName.g.verified.cs | 50 ++ ...lorPalettePresetNameNullable.g.verified.cs | 57 ++ ...letteWithPresetNameOrMembers.g.verified.cs | 88 +++ ...Converters.MagicPromptOption.g.verified.cs | 50 ++ ...rs.MagicPromptOptionNullable.g.verified.cs | 57 ++ .../_#JsonConverters.ModelEnum.g.verified.cs | 50 ++ ...Converters.ModelEnumNullable.g.verified.cs | 57 ++ .../_#JsonConverters.Resolution.g.verified.cs | 50 ++ ...onverters.ResolutionNullable.g.verified.cs | 57 ++ .../_#JsonConverters.StyleType.g.verified.cs | 50 ++ ...Converters.StyleTypeNullable.g.verified.cs | 57 ++ ...JsonConverters.UnixTimestamp.g.verified.cs | 40 ++ ...nSerializerContextConverters.g.verified.cs | 29 + ..._#JsonSerializerContextTypes.g.verified.cs | 215 +++++++ src/tests/AutoSDK.SnapshotTests/Tests.cs | 2 + src/tests/AutoSDK.UnitTests/DataTests.cs | 1 + .../Ai21/ResolvedSchemas/_.verified.txt | 35 +- .../Snapshots/Ai21/Schemas/_.verified.txt | 35 +- .../GitHub/ResolvedSchemas/_.verified.txt | 13 +- .../Snapshots/GitHub/Schemas/_.verified.txt | 13 +- .../LangSmith/ResolvedSchemas/_.verified.txt | 57 +- .../LangSmith/Schemas/_.verified.txt | 57 +- .../ideogram/ResolvedSchemas/_.verified.txt | 145 +++++ .../Snapshots/ideogram/Schemas/_.verified.txt | 145 +++++ .../instill/ResolvedSchemas/_.verified.txt | 231 +++---- .../Snapshots/instill/Schemas/_.verified.txt | 215 +++---- 187 files changed, 10823 insertions(+), 419 deletions(-) create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Authorizations..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Constructors..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostRemixImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IApi.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.CreateApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiKeys.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.PostDescribe.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.CreateApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiKeys.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.AspectRatio.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteMember.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPalettePresetName.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Description.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageSafetyError.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiKeysResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiTermsResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageObject.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageSafetyError.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.InitialImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MagicPromptOption.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MetronomeLinks.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ModelEnum.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiKeyResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiReactivateResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionError.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiTermsRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Price.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettings.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettingsResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RedactedApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RemixImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Resolution.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.PathBuilder.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.PostDescribe.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Authorizations..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Constructors..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostRemixImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IApi.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.CreateApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiKeys.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.PostDescribe.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.CreateApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiKeys.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ApiTerms.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.AspectRatio.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteMember.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPalettePresetName.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Description.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageSafetyError.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiKeysResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiTermsResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageObject.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageSafetyError.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.InitialImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MagicPromptOption.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MetronomeLinks.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ModelEnum.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiKeyResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiReactivateResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionError.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiTermsRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Price.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettings.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettingsResponse.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RedactedApiKey.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RemixImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Resolution.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.StyleType.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.PathBuilder.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.PostDescribe.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatio.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatioNullable.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetName.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetNameNullable.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPaletteWithPresetNameOrMembers.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOption.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOptionNullable.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnum.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnumNullable.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.Resolution.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ResolutionNullable.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextConverters.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextTypes.g.verified.cs create mode 100644 src/tests/AutoSDK.UnitTests/Snapshots/ideogram/ResolvedSchemas/_.verified.txt create mode 100644 src/tests/AutoSDK.UnitTests/Snapshots/ideogram/Schemas/_.verified.txt diff --git a/src/libs/AutoSDK/Models/EndPoint.cs b/src/libs/AutoSDK/Models/EndPoint.cs index c9e826ce39..a3727c6d99 100644 --- a/src/libs/AutoSDK/Models/EndPoint.cs +++ b/src/libs/AutoSDK/Models/EndPoint.cs @@ -98,7 +98,7 @@ public static EndPoint FromSchema(OperationContext operation) ? requestProperty.Name : $"request{requestProperty.Name.ToPropertyName()}", Type = requestProperty.Type, - IsRequired = requestProperty.IsRequired, + IsRequired = requestProperty.IsRequired,// is { IsRequired: true, IsReadOnly: false }, IsMultiPartFormDataFilename = requestProperty.IsMultiPartFormDataFilename, DefaultValue = requestProperty.DefaultValue, IsDeprecated = requestProperty.IsDeprecated, diff --git a/src/libs/AutoSDK/Models/PropertyData.cs b/src/libs/AutoSDK/Models/PropertyData.cs index d54e90b6ec..8f8deded2e 100644 --- a/src/libs/AutoSDK/Models/PropertyData.cs +++ b/src/libs/AutoSDK/Models/PropertyData.cs @@ -1,4 +1,3 @@ -using Microsoft.OpenApi.Models; using AutoSDK.Extensions; using AutoSDK.Serialization.Json; @@ -9,6 +8,8 @@ public readonly record struct PropertyData( string Name, TypeData Type, bool IsRequired, + bool IsReadOnly, + bool IsWriteOnly, bool IsMultiPartFormDataFilename, Settings Settings, string? DefaultValue, @@ -21,6 +22,8 @@ public readonly record struct PropertyData( Name: string.Empty, Type: TypeData.Default, IsRequired: false, + IsReadOnly: false, + IsWriteOnly: false, IsMultiPartFormDataFilename: false, DefaultValue: null, IsDeprecated: false, @@ -49,7 +52,9 @@ public static PropertyData FromSchemaContext(SchemaContext context) ? new HashSet(context.Parent.Schema.Required) : []; - var isRequired = requiredProperties.Contains(propertyName); + var isRequired = + requiredProperties.Contains(propertyName);// && + //context.Schema is { WriteOnly: false }; // Special case for enums with a single value. if (isRequired && type is { IsEnum: true, EnumValues.Length: 1 }) { @@ -61,6 +66,8 @@ public static PropertyData FromSchemaContext(SchemaContext context) Name: name, Type: type, IsRequired: isRequired, + IsReadOnly: context.Schema.ReadOnly, + IsWriteOnly: context.Schema.WriteOnly, IsMultiPartFormDataFilename: false, Settings: context.Settings, IsDeprecated: context.Schema.Deprecated, diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Authorizations..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Authorizations..g.verified.cs new file mode 100644 index 0000000000..6654a99790 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Authorizations..g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.Api.Authorizations..g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + /// Authorize using ApiKey authentication. + /// + /// + public void AuthorizeUsingApiKey( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + _httpClient.DefaultRequestHeaders.Add("Api-Key", apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Constructors..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Constructors..g.verified.cs new file mode 100644 index 0000000000..3bdbd47b17 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.Constructors..g.verified.cs @@ -0,0 +1,28 @@ +//HintName: G.Api.Constructors..g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + public Api( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) : this(httpClient, baseUri) + { + Authorizing(_httpClient, ref apiKey); + + AuthorizeUsingApiKey(apiKey); + + Authorized(_httpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + ref string apiKey); + partial void Authorized( + global::System.Net.Http.HttpClient client); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..113e8bb97f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Api.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// This is the API definition for Ideogram AI.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::G.IApi, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } = new global::Newtonsoft.Json.JsonSerializerSettings(); + + + /// + /// All things related to generating content. + /// + public GenerateClient Generate => new GenerateClient(_httpClient) + { + JsonSerializerOptions = JsonSerializerOptions, + }; + + /// + /// Content related to managing API account and API access + /// + public ManageClient Manage => new ManageClient(_httpClient) + { + JsonSerializerOptions = JsonSerializerOptions, + }; + + /// + /// Operations related to understanding visual content + /// + public VisionClient Vision => new VisionClient(_httpClient) + { + JsonSerializerOptions = JsonSerializerOptions, + }; + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs new file mode 100644 index 0000000000..632ce8efaf --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs @@ -0,0 +1,124 @@ +//HintName: G.GenerateClient.PostGenerateImage.g.cs + +#nullable enable + +namespace G +{ + public partial class GenerateClient + { + partial void PreparePostGenerateImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.GenerateImageRequest request); + partial void PreparePostGenerateImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.GenerateImageRequest request); + partial void ProcessPostGenerateImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostGenerateImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.GenerateImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostGenerateImageArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/generate", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, JsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostGenerateImageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostGenerateImageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostGenerateImageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.ImageRequest imageRequest, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.GenerateImageRequest + { + ImageRequest = imageRequest, + }; + + return await PostGenerateImageAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostRemixImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostRemixImage.g.verified.cs new file mode 100644 index 0000000000..7f0838b129 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostRemixImage.g.verified.cs @@ -0,0 +1,147 @@ +//HintName: G.GenerateClient.PostRemixImage.g.cs + +#nullable enable + +namespace G +{ + public partial class GenerateClient + { + partial void PreparePostRemixImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.RemixImageRequest request); + partial void PreparePostRemixImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.RemixImageRequest request); + partial void ProcessPostRemixImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostRemixImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.RemixImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostRemixImageArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/remix", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ImageRequest}"), + name: "image_request"); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "image_file", + fileName: request.ImageFilename ?? string.Empty); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostRemixImageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostRemixImageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostRemixImageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.ImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.RemixImageRequest + { + ImageRequest = imageRequest, + ImageFile = imageFile, + ImageFilename = imageFilename, + }; + + return await PostRemixImageAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs new file mode 100644 index 0000000000..0bb9c09bc8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs @@ -0,0 +1,147 @@ +//HintName: G.GenerateClient.PostUpscaleImage.g.cs + +#nullable enable + +namespace G +{ + public partial class GenerateClient + { + partial void PreparePostUpscaleImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.UpscaleImageRequest request); + partial void PreparePostUpscaleImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.UpscaleImageRequest request); + partial void ProcessPostUpscaleImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostUpscaleImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostUpscaleImageArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/upscale", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ImageRequest}"), + name: "image_request"); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "image_file", + fileName: request.ImageFilename ?? string.Empty); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostUpscaleImageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostUpscaleImageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostUpscaleImageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleInitialImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.UpscaleImageRequest + { + ImageRequest = imageRequest, + ImageFile = imageFile, + ImageFilename = imageFilename, + }; + + return await PostUpscaleImageAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.g.verified.cs new file mode 100644 index 0000000000..219e8490dc --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.GenerateClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.GenerateClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// All things related to generating content.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GenerateClient : global::G.IGenerateClient, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } = new global::Newtonsoft.Json.JsonSerializerSettings(); + + + /// + /// Creates a new instance of the GenerateClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public GenerateClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IApi.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IApi.g.verified.cs new file mode 100644 index 0000000000..042924a420 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IApi.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.IApi.g.cs + +#nullable enable + +namespace G +{ + /// + /// This is the API definition for Ideogram AI.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IApi : global::System.IDisposable + { + /// + /// + /// + global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } + + + /// + /// All things related to generating content. + /// + public GenerateClient Generate { get; } + + /// + /// Content related to managing API account and API access + /// + public ManageClient Manage { get; } + + /// + /// Operations related to understanding visual content + /// + public VisionClient Vision { get; } + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs new file mode 100644 index 0000000000..9652b6ee03 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.IGenerateClient.PostGenerateImage.g.cs +#nullable enable + +namespace G +{ + public partial interface IGenerateClient + { + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.GenerateImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.ImageRequest imageRequest, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs new file mode 100644 index 0000000000..6d5f11d6f1 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.IGenerateClient.PostRemixImage.g.cs +#nullable enable + +namespace G +{ + public partial interface IGenerateClient + { + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.RemixImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.ImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs new file mode 100644 index 0000000000..0521025443 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.IGenerateClient.PostUpscaleImage.g.cs +#nullable enable + +namespace G +{ + public partial interface IGenerateClient + { + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleInitialImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.g.verified.cs new file mode 100644 index 0000000000..ba3f2b71ea --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IGenerateClient.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.IGenerateClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// All things related to generating content.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IGenerateClient : global::System.IDisposable + { + /// + /// + /// + global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } + + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.CreateApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.CreateApiKey.g.verified.cs new file mode 100644 index 0000000000..7accd6ae61 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.CreateApiKey.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.CreateApiKey.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Creates an API key. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateApiKeyAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs new file mode 100644 index 0000000000..67c04a6cb9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.IManageClient.DeleteSingleApiKey.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Delete an API key. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteSingleApiKeyAsync( + string apiKeyId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiKeys.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiKeys.g.verified.cs new file mode 100644 index 0000000000..0b44553aa0 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiKeys.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.GetApiKeys.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve current API keys and their respective data. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiKeysAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs new file mode 100644 index 0000000000..d8f38143da --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.IManageClient.GetApiStripeSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve data relevant to connecting to Stripe. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiStripeSubscriptionAsync( + bool? isBusiness = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiSubscription.g.verified.cs new file mode 100644 index 0000000000..a2a2cae692 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiSubscription.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.GetApiSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve data relevant to creating an API subscription. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiTerms.g.verified.cs new file mode 100644 index 0000000000..523fc3c2a0 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.GetApiTerms.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.GetApiTerms.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve the latest terms of service for API usage. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiTermsAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiSubscription.g.verified.cs new file mode 100644 index 0000000000..7758f6245b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiSubscription.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.IManageClient.PostApiSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Update API subscription settings + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.PostApiSubscriptionRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Update API subscription settings + /// + /// + /// The current recharge settings for the API subscription. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.RechargeSettings? rechargeSettings = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiTerms.g.verified.cs new file mode 100644 index 0000000000..84ca490bd4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.PostApiTerms.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.IManageClient.PostApiTerms.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Accept terms + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiTermsAsync( + global::G.PostApiTermsRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Accept terms + /// + /// + /// The ID of the terms which are being accepted.
+ /// Example: TOS_2024_04_20 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiTermsAsync( + string termsId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs new file mode 100644 index 0000000000..842e03e800 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.ReactivateSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Reactivates a subscription by attempting to re-enable Metronome billing. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ReactivateSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.g.verified.cs new file mode 100644 index 0000000000..e9e377edbe --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IManageClient.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.IManageClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Content related to managing API account and API access
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IManageClient : global::System.IDisposable + { + /// + /// + /// + global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } + + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.PostDescribe.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.PostDescribe.g.verified.cs new file mode 100644 index 0000000000..fc4e3545c4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.PostDescribe.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.IVisionClient.PostDescribe.g.cs +#nullable enable + +namespace G +{ + public partial interface IVisionClient + { + /// + /// Describe an image + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostDescribeAsync( + global::G.DescribeRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Describe an image + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostDescribeAsync( + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.g.verified.cs new file mode 100644 index 0000000000..a3c4dae471 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.IVisionClient.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.IVisionClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Operations related to understanding visual content
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IVisionClient : global::System.IDisposable + { + /// + /// + /// + global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } + + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.CreateApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.CreateApiKey.g.verified.cs new file mode 100644 index 0000000000..3a58eba501 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.CreateApiKey.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.CreateApiKey.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareCreateApiKeyArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareCreateApiKeyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessCreateApiKeyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateApiKeyResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates an API key. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateApiKeyAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareCreateApiKeyArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/api_keys", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateApiKeyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateApiKeyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateApiKeyResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs new file mode 100644 index 0000000000..7938c33c50 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.ManageClient.DeleteSingleApiKey.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareDeleteSingleApiKeyArguments( + global::System.Net.Http.HttpClient httpClient, + ref string apiKeyId); + partial void PrepareDeleteSingleApiKeyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string apiKeyId); + partial void ProcessDeleteSingleApiKeyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Delete an API key. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteSingleApiKeyAsync( + string apiKeyId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteSingleApiKeyArguments( + httpClient: _httpClient, + apiKeyId: ref apiKeyId); + + var __pathBuilder = new PathBuilder( + path: $"/manage/api/api_keys/{apiKeyId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteSingleApiKeyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + apiKeyId: apiKeyId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteSingleApiKeyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiKeys.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiKeys.g.verified.cs new file mode 100644 index 0000000000..0e068621fc --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiKeys.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.GetApiKeys.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiKeysArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetApiKeysRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetApiKeysResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiKeysResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve current API keys and their respective data. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiKeysAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiKeysArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/api_keys", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiKeysRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiKeysResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiKeysResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs new file mode 100644 index 0000000000..05768f00cb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ManageClient.GetApiStripeSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiStripeSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient, + ref bool? isBusiness); + partial void PrepareGetApiStripeSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + bool? isBusiness); + partial void ProcessGetApiStripeSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiStripeSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve data relevant to connecting to Stripe. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiStripeSubscriptionAsync( + bool? isBusiness = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiStripeSubscriptionArguments( + httpClient: _httpClient, + isBusiness: ref isBusiness); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/stripe_subscription", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("isBusiness", isBusiness?.ToString()) + ; + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiStripeSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + isBusiness: isBusiness); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiStripeSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiStripeSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiSubscription.g.verified.cs new file mode 100644 index 0000000000..fe16781baa --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiSubscription.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.GetApiSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetApiSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetApiSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve data relevant to creating an API subscription. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiSubscriptionArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/subscription", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiTerms.g.verified.cs new file mode 100644 index 0000000000..9c680e5446 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.GetApiTerms.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.GetApiTerms.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiTermsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetApiTermsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetApiTermsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiTermsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve the latest terms of service for API usage. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiTermsAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiTermsArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/terms", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiTermsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiTermsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiTermsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiSubscription.g.verified.cs new file mode 100644 index 0000000000..b0b76aebce --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiSubscription.g.verified.cs @@ -0,0 +1,124 @@ +//HintName: G.ManageClient.PostApiSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PreparePostApiSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.PostApiSubscriptionRequest request); + partial void PreparePostApiSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.PostApiSubscriptionRequest request); + partial void ProcessPostApiSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostApiSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update API subscription settings + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.PostApiSubscriptionRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostApiSubscriptionArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/subscription", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, JsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostApiSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostApiSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostApiSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update API subscription settings + /// + /// + /// The current recharge settings for the API subscription. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.RechargeSettings? rechargeSettings = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.PostApiSubscriptionRequest + { + RechargeSettings = rechargeSettings, + }; + + return await PostApiSubscriptionAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiTerms.g.verified.cs new file mode 100644 index 0000000000..05c0772f5b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.PostApiTerms.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ManageClient.PostApiTerms.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PreparePostApiTermsArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.PostApiTermsRequest request); + partial void PreparePostApiTermsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.PostApiTermsRequest request); + partial void ProcessPostApiTermsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Accept terms + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiTermsAsync( + global::G.PostApiTermsRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostApiTermsArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/terms", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, JsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostApiTermsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostApiTermsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// Accept terms + /// + /// + /// The ID of the terms which are being accepted.
+ /// Example: TOS_2024_04_20 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiTermsAsync( + string termsId, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.PostApiTermsRequest + { + TermsId = termsId, + }; + + await PostApiTermsAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs new file mode 100644 index 0000000000..670187ce33 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.ReactivateSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareReactivateSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareReactivateSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessReactivateSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessReactivateSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Reactivates a subscription by attempting to re-enable Metronome billing. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ReactivateSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareReactivateSubscriptionArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/reactivate", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareReactivateSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessReactivateSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessReactivateSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.g.verified.cs new file mode 100644 index 0000000000..2781c0dcfa --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.ManageClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.ManageClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Content related to managing API account and API access
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ManageClient : global::G.IManageClient, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } = new global::Newtonsoft.Json.JsonSerializerSettings(); + + + /// + /// Creates a new instance of the ManageClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ManageClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ApiTerms.g.verified.cs new file mode 100644 index 0000000000..2064505c25 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ApiTerms.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ApiTerms.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiTerms + { + /// + /// The ID of the terms. + /// + [global::Newtonsoft.Json.JsonProperty("terms_id", Required = global::Newtonsoft.Json.Required.Always)] + public string TermsId { get; set; } = default!; + + /// + /// The URL where the terms are hosted. + /// + [global::Newtonsoft.Json.JsonProperty("terms_url", Required = global::Newtonsoft.Json.Required.Always)] + public string TermsUrl { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.AspectRatio.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.AspectRatio.g.verified.cs new file mode 100644 index 0000000000..55fb4a40ec --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.AspectRatio.g.verified.cs @@ -0,0 +1,119 @@ +//HintName: G.Models.AspectRatio.g.cs + +#nullable enable + +namespace G +{ + /// + /// (Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.
+ /// Example: ASPECT_10_16 + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum AspectRatio + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_10_16")] + ASPECT1016, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_16_10")] + ASPECT1610, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_9_16")] + ASPECT916, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_16_9")] + ASPECT169, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_3_2")] + ASPECT32, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_2_3")] + ASPECT23, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_4_3")] + ASPECT43, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_3_4")] + ASPECT34, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_1_1")] + ASPECT11, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_1_3")] + ASPECT13, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ASPECT_3_1")] + ASPECT31, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AspectRatioExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AspectRatio value) + { + return value switch + { + AspectRatio.ASPECT1016 => "ASPECT_10_16", + AspectRatio.ASPECT1610 => "ASPECT_16_10", + AspectRatio.ASPECT916 => "ASPECT_9_16", + AspectRatio.ASPECT169 => "ASPECT_16_9", + AspectRatio.ASPECT32 => "ASPECT_3_2", + AspectRatio.ASPECT23 => "ASPECT_2_3", + AspectRatio.ASPECT43 => "ASPECT_4_3", + AspectRatio.ASPECT34 => "ASPECT_3_4", + AspectRatio.ASPECT11 => "ASPECT_1_1", + AspectRatio.ASPECT13 => "ASPECT_1_3", + AspectRatio.ASPECT31 => "ASPECT_3_1", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AspectRatio? ToEnum(string value) + { + return value switch + { + "ASPECT_10_16" => AspectRatio.ASPECT1016, + "ASPECT_16_10" => AspectRatio.ASPECT1610, + "ASPECT_9_16" => AspectRatio.ASPECT916, + "ASPECT_16_9" => AspectRatio.ASPECT169, + "ASPECT_3_2" => AspectRatio.ASPECT32, + "ASPECT_2_3" => AspectRatio.ASPECT23, + "ASPECT_4_3" => AspectRatio.ASPECT43, + "ASPECT_3_4" => AspectRatio.ASPECT34, + "ASPECT_1_1" => AspectRatio.ASPECT11, + "ASPECT_1_3" => AspectRatio.ASPECT13, + "ASPECT_3_1" => AspectRatio.ASPECT31, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteMember.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteMember.g.verified.cs new file mode 100644 index 0000000000..f8ff03bc06 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteMember.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ColorPaletteMember.g.cs + +#nullable enable + +namespace G +{ + /// + /// A member of a color palette. + /// + public sealed partial class ColorPaletteMember + { + /// + /// The hexadecimal representation of the color with an optional chosen weight
+ /// Example: #FFFFFF + ///
+ [global::Newtonsoft.Json.JsonProperty("color_hex", Required = global::Newtonsoft.Json.Required.Always)] + public string ColorHex { get; set; } = default!; + + /// + /// The weight of the color in the color palette.
+ /// Example: 0.25 + ///
+ [global::Newtonsoft.Json.JsonProperty("color_weight", Required = global::Newtonsoft.Json.Required.Always)] + public double ColorWeight { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPalettePresetName.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPalettePresetName.g.verified.cs new file mode 100644 index 0000000000..e429315e05 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPalettePresetName.g.verified.cs @@ -0,0 +1,98 @@ +//HintName: G.Models.ColorPalettePresetName.g.cs + +#nullable enable + +namespace G +{ + /// + /// A color palette preset value
+ /// Example: PASTEL + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ColorPalettePresetName + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="EMBER")] + EMBER, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="FRESH")] + FRESH, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="JUNGLE")] + JUNGLE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="MAGIC")] + MAGIC, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="MELON")] + MELON, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="MOSAIC")] + MOSAIC, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="PASTEL")] + PASTEL, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ULTRAMARINE")] + ULTRAMARINE, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ColorPalettePresetNameExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ColorPalettePresetName value) + { + return value switch + { + ColorPalettePresetName.EMBER => "EMBER", + ColorPalettePresetName.FRESH => "FRESH", + ColorPalettePresetName.JUNGLE => "JUNGLE", + ColorPalettePresetName.MAGIC => "MAGIC", + ColorPalettePresetName.MELON => "MELON", + ColorPalettePresetName.MOSAIC => "MOSAIC", + ColorPalettePresetName.PASTEL => "PASTEL", + ColorPalettePresetName.ULTRAMARINE => "ULTRAMARINE", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ColorPalettePresetName? ToEnum(string value) + { + return value switch + { + "EMBER" => ColorPalettePresetName.EMBER, + "FRESH" => ColorPalettePresetName.FRESH, + "JUNGLE" => ColorPalettePresetName.JUNGLE, + "MAGIC" => ColorPalettePresetName.MAGIC, + "MELON" => ColorPalettePresetName.MELON, + "MOSAIC" => ColorPalettePresetName.MOSAIC, + "PASTEL" => ColorPalettePresetName.PASTEL, + "ULTRAMARINE" => ColorPalettePresetName.ULTRAMARINE, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs new file mode 100644 index 0000000000..d2262744c1 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ColorPaletteWithMembers.g.cs + +#nullable enable + +namespace G +{ + /// + /// A color palette represented only via its members + /// + public sealed partial class ColorPaletteWithMembers + { + /// + /// A list of ColorPaletteMembers that define the color palette. + /// + [global::Newtonsoft.Json.JsonProperty("members", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Members { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs new file mode 100644 index 0000000000..480d67b6ad --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ColorPaletteWithPresetName.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ColorPaletteWithPresetName + { + /// + /// A color palette preset value
+ /// Example: PASTEL + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ColorPalettePresetName Name { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs new file mode 100644 index 0000000000..435c4525fe --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ColorPaletteWithPresetNameOrMembers.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members). + /// + public readonly partial struct ColorPaletteWithPresetNameOrMembers : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ColorPaletteWithPresetName? Value1 { get; init; } +#else + public global::G.ColorPaletteWithPresetName? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithPresetName value) => new ColorPaletteWithPresetNameOrMembers(value); + + /// + /// + /// + public static implicit operator global::G.ColorPaletteWithPresetName?(ColorPaletteWithPresetNameOrMembers @this) => @this.Value1; + + /// + /// + /// + public ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithPresetName? value) + { + Value1 = value; + } + + /// + /// A color palette represented only via its members + /// +#if NET6_0_OR_GREATER + public global::G.ColorPaletteWithMembers? Value2 { get; init; } +#else + public global::G.ColorPaletteWithMembers? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithMembers value) => new ColorPaletteWithPresetNameOrMembers(value); + + /// + /// + /// + public static implicit operator global::G.ColorPaletteWithMembers?(ColorPaletteWithPresetNameOrMembers @this) => @this.Value2; + + /// + /// + /// + public ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithMembers? value) + { + Value2 = value; + } + + /// + /// + /// + public ColorPaletteWithPresetNameOrMembers( + global::G.ColorPaletteWithPresetName? value1, + global::G.ColorPaletteWithMembers? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ColorPaletteWithPresetName), + Value2, + typeof(global::G.ColorPaletteWithMembers), + }; + 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 fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ColorPaletteWithPresetNameOrMembers 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 ==(ColorPaletteWithPresetNameOrMembers obj1, ColorPaletteWithPresetNameOrMembers obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ColorPaletteWithPresetNameOrMembers obj1, ColorPaletteWithPresetNameOrMembers obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ColorPaletteWithPresetNameOrMembers o && Equals(o); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeRequest.g.verified.cs new file mode 100644 index 0000000000..c825ad7e5b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.DescribeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + public sealed partial class DescribeRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("image_file", Required = global::Newtonsoft.Json.Required.Always)] + public byte[] ImageFile { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("image_filename", Required = global::Newtonsoft.Json.Required.Always)] + public string ImageFilename { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeResponse.g.verified.cs new file mode 100644 index 0000000000..1b6d7f450f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.DescribeResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DescribeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// The response for a describe request encapsulates a list of descriptions + /// + public sealed partial class DescribeResponse + { + /// + /// A collection of descriptions for given content + /// + [global::Newtonsoft.Json.JsonProperty("descriptions")] + public global::System.Collections.Generic.IList? Descriptions { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Description.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Description.g.verified.cs new file mode 100644 index 0000000000..babfcbfec9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Description.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.Description.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Description + { + /// + /// The generated description for the provided image.
+ /// Example: A meticulously illustrated cat with striped patterns, sitting upright. The cat's eyes are a captivating shade of yellow, and it appears to be gazing intently at something. The background consists of abstract, swirling patterns in shades of black, white, and beige, creating an almost fluid or wavy appearance. The cat is positioned in the foreground, with the background elements fading into the distance, giving a sense of depth to the image. + ///
+ [global::Newtonsoft.Json.JsonProperty("text")] + public string? Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageRequest.g.verified.cs new file mode 100644 index 0000000000..b2d7d090b5 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateImageRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("image_request", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ImageRequest ImageRequest { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageResponse.g.verified.cs new file mode 100644 index 0000000000..d597436a66 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageResponse.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.GenerateImageResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateImageResponse + { + /// + /// The time the request was created. + /// + [global::Newtonsoft.Json.JsonProperty("created", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime Created { get; set; } = default!; + + /// + /// A list of ImageObjects that contain the generated image(s). + /// + [global::Newtonsoft.Json.JsonProperty("data", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Data { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageSafetyError.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageSafetyError.g.verified.cs new file mode 100644 index 0000000000..cadf0f2d28 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GenerateImageSafetyError.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateImageSafetyError.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateImageSafetyError + { + /// + /// Example: Prompt provided failed safety check due to the inclusion of prohibited content. + /// + [global::Newtonsoft.Json.JsonProperty("error", Required = global::Newtonsoft.Json.Required.Always)] + public string Error { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiKeysResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiKeysResponse.g.verified.cs new file mode 100644 index 0000000000..9973e56067 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiKeysResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetApiKeysResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetApiKeysResponse + { + /// + /// The current API keys that are active. Only returns redacted keys. + /// + [global::Newtonsoft.Json.JsonProperty("current_api_keys")] + public global::System.Collections.Generic.IList? CurrentApiKeys { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiTermsResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiTermsResponse.g.verified.cs new file mode 100644 index 0000000000..24eec3e16a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.GetApiTermsResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetApiTermsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetApiTermsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("api_terms", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ApiTerms ApiTerms { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageObject.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageObject.g.verified.cs new file mode 100644 index 0000000000..6704b9aec9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageObject.g.verified.cs @@ -0,0 +1,51 @@ +//HintName: G.Models.ImageObject.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ImageObject + { + /// + /// The direct link to the image generated.
+ /// Example: https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g + ///
+ [global::Newtonsoft.Json.JsonProperty("url")] + public string? Url { get; set; } + + /// + /// The prompt used for the generation. This may be different from the original prompt.
+ /// Example: A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset. + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt", Required = global::Newtonsoft.Json.Required.Always)] + public string Prompt { get; set; } = default!; + + /// + /// The resolution of the final image.
+ /// Example: 1024x1024 + ///
+ [global::Newtonsoft.Json.JsonProperty("resolution", Required = global::Newtonsoft.Json.Required.Always)] + public string Resolution { get; set; } = default!; + + /// + /// Whether this request passes safety checks. If false, the url field will be empty. + /// + [global::Newtonsoft.Json.JsonProperty("is_image_safe", Required = global::Newtonsoft.Json.Required.Always)] + public bool IsImageSafe { get; set; } = default!; + + /// + /// Example: 12345 + /// + [global::Newtonsoft.Json.JsonProperty("seed", Required = global::Newtonsoft.Json.Required.Always)] + public int Seed { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageRequest.g.verified.cs new file mode 100644 index 0000000000..3b30ada71c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageRequest.g.verified.cs @@ -0,0 +1,81 @@ +//HintName: G.Models.ImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ImageRequest + { + /// + /// The prompt to use to generate the image.
+ /// Example: A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there is an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset. + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt", Required = global::Newtonsoft.Json.Required.Always)] + public string Prompt { get; set; } = default!; + + /// + /// (Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.
+ /// Example: ASPECT_10_16 + ///
+ [global::Newtonsoft.Json.JsonProperty("aspect_ratio")] + public global::G.AspectRatio? AspectRatio { get; set; } + + /// + /// The model used to generate. Defaults to V_2.
+ /// Default Value: V_2
+ /// Example: V_2_TURBO + ///
+ [global::Newtonsoft.Json.JsonProperty("model")] + public global::G.ModelEnum? Model { get; set; } = global::G.ModelEnum.V2; + + /// + /// Determine if MagicPrompt should be used in generating the request or not
+ /// Default Value: AUTO
+ /// Example: ON + ///
+ [global::Newtonsoft.Json.JsonProperty("magic_prompt_option")] + public global::G.MagicPromptOption? MagicPromptOption { get; set; } = global::G.MagicPromptOption.AUTO; + + /// + /// Example: 12345 + /// + [global::Newtonsoft.Json.JsonProperty("seed")] + public int? Seed { get; set; } + + /// + /// The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.
+ /// Example: REALISTIC + ///
+ [global::Newtonsoft.Json.JsonProperty("style_type")] + public global::G.StyleType? StyleType { get; set; } + + /// + /// Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + ///
+ [global::Newtonsoft.Json.JsonProperty("negative_prompt")] + public string? NegativePrompt { get; set; } + + /// + /// (For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio.
+ /// Example: RESOLUTION_1024_1024 + ///
+ [global::Newtonsoft.Json.JsonProperty("resolution")] + public global::G.Resolution? Resolution { get; set; } + + /// + /// A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members). + /// + [global::Newtonsoft.Json.JsonProperty("color_palette")] + public global::G.ColorPaletteWithPresetNameOrMembers? ColorPalette { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageSafetyError.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageSafetyError.g.verified.cs new file mode 100644 index 0000000000..f1b83e6255 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ImageSafetyError.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ImageSafetyError.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ImageSafetyError + { + /// + /// Example: Image provided failed safety check due to the inclusion of prohibited content. + /// + [global::Newtonsoft.Json.JsonProperty("error", Required = global::Newtonsoft.Json.Required.Always)] + public string Error { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.InitialImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.InitialImageRequest.g.verified.cs new file mode 100644 index 0000000000..3ba615df65 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.InitialImageRequest.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.InitialImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// A request to generate a new image using a provided image and a prompt. + /// + public sealed partial class InitialImageRequest + { + /// + /// Default Value: 50
+ /// Example: 50 + ///
+ [global::Newtonsoft.Json.JsonProperty("image_weight")] + public int? ImageWeight { get; set; } = 50; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MagicPromptOption.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MagicPromptOption.g.verified.cs new file mode 100644 index 0000000000..120c904e88 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MagicPromptOption.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.MagicPromptOption.g.cs + +#nullable enable + +namespace G +{ + /// + /// Determine if MagicPrompt should be used in generating the request or not
+ /// Default Value: AUTO
+ /// Example: ON + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum MagicPromptOption + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="AUTO")] + AUTO, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ON")] + ON, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="OFF")] + OFF, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MagicPromptOptionExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MagicPromptOption value) + { + return value switch + { + MagicPromptOption.AUTO => "AUTO", + MagicPromptOption.ON => "ON", + MagicPromptOption.OFF => "OFF", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MagicPromptOption? ToEnum(string value) + { + return value switch + { + "AUTO" => MagicPromptOption.AUTO, + "ON" => MagicPromptOption.ON, + "OFF" => MagicPromptOption.OFF, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs new file mode 100644 index 0000000000..110759524c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ManageApiStripeSubscriptionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ManageApiStripeSubscriptionResponse + { + /// + /// The URL for the user to checkout the Stripe subscription plan. + /// + [global::Newtonsoft.Json.JsonProperty("stripe_subscription_url")] + public string? StripeSubscriptionUrl { get; set; } + + /// + /// DEPRECATED. The URL for the user to manage the existing Stripe subscription plan. Get this from ManageApiSubscriptionResponse instead. + /// + [global::Newtonsoft.Json.JsonProperty("stripe_billing_url")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? StripeBillingUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs new file mode 100644 index 0000000000..38ad7a9b85 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs @@ -0,0 +1,62 @@ +//HintName: G.Models.ManageApiSubscriptionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ManageApiSubscriptionResponse + { + /// + /// Whether or not the latest required terms have been accepted. + /// + [global::Newtonsoft.Json.JsonProperty("has_accepted_terms", Required = global::Newtonsoft.Json.Required.Always)] + public bool HasAcceptedTerms { get; set; } = default!; + + /// + /// Whether or not Stripe is setup for API usage. + /// + [global::Newtonsoft.Json.JsonProperty("has_stripe_setup", Required = global::Newtonsoft.Json.Required.Always)] + public bool HasStripeSetup { get; set; } = default!; + + /// + /// The URL to display the customer usage dashboard. + /// + [global::Newtonsoft.Json.JsonProperty("metronome_dashboard_url")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? MetronomeDashboardUrl { get; set; } + + /// + /// The URL to display the customer usage dashboard, in dark mode. + /// + [global::Newtonsoft.Json.JsonProperty("metronome_dashboard_dark_mode_url")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? MetronomeDashboardDarkModeUrl { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("metronome_links")] + public global::G.MetronomeLinks? MetronomeLinks { get; set; } + + /// + /// The current recharge settings for the API subscription. + /// + [global::Newtonsoft.Json.JsonProperty("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { get; set; } + + /// + /// The URL for the user to manage the existing Stripe subscription plan. + /// + [global::Newtonsoft.Json.JsonProperty("stripe_billing_url")] + public string? StripeBillingUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MetronomeLinks.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MetronomeLinks.g.verified.cs new file mode 100644 index 0000000000..9bc76f4070 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.MetronomeLinks.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.MetronomeLinks.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class MetronomeLinks + { + /// + /// The URL to display the customer invoice and API usage. + /// + [global::Newtonsoft.Json.JsonProperty("invoices_iframe_url")] + public string? InvoicesIframeUrl { get; set; } + + /// + /// The URL to display the customer invoice and API usage. + /// + [global::Newtonsoft.Json.JsonProperty("invoices_iframe_dark_mode_url")] + public string? InvoicesIframeDarkModeUrl { get; set; } + + /// + /// The URL to display the customer invoice and API usage. + /// + [global::Newtonsoft.Json.JsonProperty("credits_iframe_url")] + public string? CreditsIframeUrl { get; set; } + + /// + /// The URL to display the customer invoice and API usage. + /// + [global::Newtonsoft.Json.JsonProperty("credits_iframe_dark_mode_url")] + public string? CreditsIframeDarkModeUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ModelEnum.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ModelEnum.g.verified.cs new file mode 100644 index 0000000000..84f860deba --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.ModelEnum.g.verified.cs @@ -0,0 +1,71 @@ +//HintName: G.Models.ModelEnum.g.cs + +#nullable enable + +namespace G +{ + /// + /// The model used to generate. Defaults to V_2.
+ /// Default Value: V_2
+ /// Example: V_2_TURBO + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ModelEnum + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="V_1")] + V1, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="V_1_TURBO")] + V1TURBO, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="V_2")] + V2, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="V_2_TURBO")] + V2TURBO, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModelEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ModelEnum value) + { + return value switch + { + ModelEnum.V1 => "V_1", + ModelEnum.V1TURBO => "V_1_TURBO", + ModelEnum.V2 => "V_2", + ModelEnum.V2TURBO => "V_2_TURBO", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ModelEnum? ToEnum(string value) + { + return value switch + { + "V_1" => ModelEnum.V1, + "V_1_TURBO" => ModelEnum.V1TURBO, + "V_2" => ModelEnum.V2, + "V_2_TURBO" => ModelEnum.V2TURBO, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiKeyResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiKeyResponse.g.verified.cs new file mode 100644 index 0000000000..e8787d5d63 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiKeyResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.PostApiKeyResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PostApiKeyResponse + { + /// + /// The API key to use when making authenticated requests with the API. This key will only be shown once.
+ /// Example: vkpDjaKdMNR8QJ83GjfNvFZJbnoi65XUp70MgZNtA2H9XE8yfDnmr_6BaRyQkF9hnJzu6mUPRLBmqlnZMwetJA + ///
+ [global::Newtonsoft.Json.JsonProperty("api_key", Required = global::Newtonsoft.Json.Required.Always)] + public string ApiKey { get; set; } = default!; + + /// + /// The ID of the API key. A URL safe base64 encoded UUID
+ /// Example: JRPVD7jWR1aTBYiJ0UFVOg== + ///
+ [global::Newtonsoft.Json.JsonProperty("api_key_id", Required = global::Newtonsoft.Json.Required.Always)] + public string ApiKeyId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiReactivateResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiReactivateResponse.g.verified.cs new file mode 100644 index 0000000000..7558c50864 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiReactivateResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiReactivateResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to re-activating API settings. + /// + public sealed partial class PostApiReactivateResponse + { + /// + /// The current recharge settings for the API subscription. + /// + [global::Newtonsoft.Json.JsonProperty("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionError.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionError.g.verified.cs new file mode 100644 index 0000000000..4ca19b9e46 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionError.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiSubscriptionError.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents an error when attempting to update the API subscription. + /// + public sealed partial class PostApiSubscriptionError + { + /// + /// Error messages about what the error could be. + /// + [global::Newtonsoft.Json.JsonProperty("messages")] + public global::System.Collections.Generic.IList? Messages { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs new file mode 100644 index 0000000000..43f5ec6078 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiSubscriptionRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request to update API settings. Fields which are omitted will be ignored. + /// + public sealed partial class PostApiSubscriptionRequest + { + /// + /// The current recharge settings for the API subscription. + /// + [global::Newtonsoft.Json.JsonProperty("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs new file mode 100644 index 0000000000..12cb625aca --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiSubscriptionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// The updated API subscription. + /// + public sealed partial class PostApiSubscriptionResponse + { + /// + /// The current recharge settings for the API subscription. + /// + [global::Newtonsoft.Json.JsonProperty("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiTermsRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiTermsRequest.g.verified.cs new file mode 100644 index 0000000000..84c9399113 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.PostApiTermsRequest.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.PostApiTermsRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PostApiTermsRequest + { + /// + /// The ID of the terms which are being accepted.
+ /// Example: TOS_2024_04_20 + ///
+ [global::Newtonsoft.Json.JsonProperty("terms_id", Required = global::Newtonsoft.Json.Required.Always)] + public string TermsId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Price.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Price.g.verified.cs new file mode 100644 index 0000000000..a954cb94e9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Price.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.Price.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents a price. + /// + public sealed partial class Price + { + /// + /// The ISO 4217 currency code for the price object.
+ /// Example: USD + ///
+ [global::Newtonsoft.Json.JsonProperty("currency_code", Required = global::Newtonsoft.Json.Required.Always)] + public string CurrencyCode { get; set; } = default!; + + /// + /// The amount of the currency in the common denomination. For example, in USD this is cents.
+ /// Example: 1050 + ///
+ [global::Newtonsoft.Json.JsonProperty("amount", Required = global::Newtonsoft.Json.Required.Always)] + public double Amount { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettings.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettings.g.verified.cs new file mode 100644 index 0000000000..4e58f804fb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettings.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.RechargeSettings.g.cs + +#nullable enable + +namespace G +{ + /// + /// The current recharge settings for the API subscription. + /// + public sealed partial class RechargeSettings + { + /// + /// Represents a price. + /// + [global::Newtonsoft.Json.JsonProperty("top_up_balance", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Price TopUpBalance { get; set; } = default!; + + /// + /// Represents a price. + /// + [global::Newtonsoft.Json.JsonProperty("minimum_balance_threshold", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Price MinimumBalanceThreshold { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettingsResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettingsResponse.g.verified.cs new file mode 100644 index 0000000000..b30e40162a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RechargeSettingsResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RechargeSettingsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RechargeSettingsResponse + { + /// + /// Whether or not the recharge setting is currently active. + /// + [global::Newtonsoft.Json.JsonProperty("is_active", Required = global::Newtonsoft.Json.Required.Always)] + public bool IsActive { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RedactedApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RedactedApiKey.g.verified.cs new file mode 100644 index 0000000000..d9ba0eabc5 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RedactedApiKey.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.RedactedApiKey.g.cs + +#nullable enable + +namespace G +{ + /// + /// A representation of an API key that does not contain the full key. + /// + public sealed partial class RedactedApiKey + { + /// + /// A redacted text snippet of the API key. Contains the first 4 characters of the API key
+ /// Example: vkpDja + ///
+ [global::Newtonsoft.Json.JsonProperty("redacted_api_key", Required = global::Newtonsoft.Json.Required.Always)] + public string RedactedApiKey1 { get; set; } = default!; + + /// + /// The time at which the key was created + /// + [global::Newtonsoft.Json.JsonProperty("creation_time", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime CreationTime { get; set; } = default!; + + /// + /// A URL safe base64 encoded UUID
+ /// Example: JRPVD7jWR1aTBYiJ0UFVOg== + ///
+ [global::Newtonsoft.Json.JsonProperty("api_key_id", Required = global::Newtonsoft.Json.Required.Always)] + public string ApiKeyId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RemixImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RemixImageRequest.g.verified.cs new file mode 100644 index 0000000000..4ddf227848 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.RemixImageRequest.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.RemixImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// A request to generate an image from a source image and a provided caption, provided images are cropped to match the chosen output aspect ratio + /// + public sealed partial class RemixImageRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("image_request", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ImageRequest ImageRequest { get; set; } = default!; + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::Newtonsoft.Json.JsonProperty("image_file", Required = global::Newtonsoft.Json.Required.Always)] + public byte[] ImageFile { get; set; } = default!; + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::Newtonsoft.Json.JsonProperty("image_filename", Required = global::Newtonsoft.Json.Required.Always)] + public string ImageFilename { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Resolution.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Resolution.g.verified.cs new file mode 100644 index 0000000000..8a8ae5a373 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.Resolution.g.verified.cs @@ -0,0 +1,588 @@ +//HintName: G.Models.Resolution.g.cs + +#nullable enable + +namespace G +{ + /// + /// (For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio.
+ /// Example: RESOLUTION_1024_1024 + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum Resolution + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_512_1536")] + RESOLUTION5121536, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_576_1408")] + RESOLUTION5761408, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_576_1472")] + RESOLUTION5761472, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_576_1536")] + RESOLUTION5761536, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_640_1024")] + RESOLUTION6401024, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_640_1344")] + RESOLUTION6401344, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_640_1408")] + RESOLUTION6401408, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_640_1472")] + RESOLUTION6401472, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_640_1536")] + RESOLUTION6401536, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_704_1152")] + RESOLUTION7041152, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_704_1216")] + RESOLUTION7041216, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_704_1280")] + RESOLUTION7041280, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_704_1344")] + RESOLUTION7041344, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_704_1408")] + RESOLUTION7041408, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_704_1472")] + RESOLUTION7041472, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_720_1280")] + RESOLUTION7201280, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_736_1312")] + RESOLUTION7361312, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_768_1024")] + RESOLUTION7681024, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_768_1088")] + RESOLUTION7681088, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_768_1152")] + RESOLUTION7681152, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_768_1216")] + RESOLUTION7681216, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_768_1232")] + RESOLUTION7681232, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_768_1280")] + RESOLUTION7681280, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_768_1344")] + RESOLUTION7681344, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_832_960")] + RESOLUTION832960, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_832_1024")] + RESOLUTION8321024, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_832_1088")] + RESOLUTION8321088, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_832_1152")] + RESOLUTION8321152, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_832_1216")] + RESOLUTION8321216, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_832_1248")] + RESOLUTION8321248, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_864_1152")] + RESOLUTION8641152, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_896_960")] + RESOLUTION896960, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_896_1024")] + RESOLUTION8961024, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_896_1088")] + RESOLUTION8961088, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_896_1120")] + RESOLUTION8961120, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_896_1152")] + RESOLUTION8961152, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_960_832")] + RESOLUTION960832, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_960_896")] + RESOLUTION960896, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_960_1024")] + RESOLUTION9601024, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_960_1088")] + RESOLUTION9601088, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1024_640")] + RESOLUTION1024640, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1024_768")] + RESOLUTION1024768, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1024_832")] + RESOLUTION1024832, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1024_896")] + RESOLUTION1024896, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1024_960")] + RESOLUTION1024960, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1024_1024")] + RESOLUTION10241024, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1088_768")] + RESOLUTION1088768, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1088_832")] + RESOLUTION1088832, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1088_896")] + RESOLUTION1088896, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1088_960")] + RESOLUTION1088960, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1120_896")] + RESOLUTION1120896, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1152_704")] + RESOLUTION1152704, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1152_768")] + RESOLUTION1152768, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1152_832")] + RESOLUTION1152832, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1152_864")] + RESOLUTION1152864, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1152_896")] + RESOLUTION1152896, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1216_704")] + RESOLUTION1216704, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1216_768")] + RESOLUTION1216768, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1216_832")] + RESOLUTION1216832, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1232_768")] + RESOLUTION1232768, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1248_832")] + RESOLUTION1248832, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1280_704")] + RESOLUTION1280704, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1280_720")] + RESOLUTION1280720, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1280_768")] + RESOLUTION1280768, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1280_800")] + RESOLUTION1280800, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1312_736")] + RESOLUTION1312736, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1344_640")] + RESOLUTION1344640, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1344_704")] + RESOLUTION1344704, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1344_768")] + RESOLUTION1344768, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1408_576")] + RESOLUTION1408576, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1408_640")] + RESOLUTION1408640, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1408_704")] + RESOLUTION1408704, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1472_576")] + RESOLUTION1472576, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1472_640")] + RESOLUTION1472640, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1472_704")] + RESOLUTION1472704, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1536_512")] + RESOLUTION1536512, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1536_576")] + RESOLUTION1536576, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RESOLUTION_1536_640")] + RESOLUTION1536640, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResolutionExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Resolution value) + { + return value switch + { + Resolution.RESOLUTION5121536 => "RESOLUTION_512_1536", + Resolution.RESOLUTION5761408 => "RESOLUTION_576_1408", + Resolution.RESOLUTION5761472 => "RESOLUTION_576_1472", + Resolution.RESOLUTION5761536 => "RESOLUTION_576_1536", + Resolution.RESOLUTION6401024 => "RESOLUTION_640_1024", + Resolution.RESOLUTION6401344 => "RESOLUTION_640_1344", + Resolution.RESOLUTION6401408 => "RESOLUTION_640_1408", + Resolution.RESOLUTION6401472 => "RESOLUTION_640_1472", + Resolution.RESOLUTION6401536 => "RESOLUTION_640_1536", + Resolution.RESOLUTION7041152 => "RESOLUTION_704_1152", + Resolution.RESOLUTION7041216 => "RESOLUTION_704_1216", + Resolution.RESOLUTION7041280 => "RESOLUTION_704_1280", + Resolution.RESOLUTION7041344 => "RESOLUTION_704_1344", + Resolution.RESOLUTION7041408 => "RESOLUTION_704_1408", + Resolution.RESOLUTION7041472 => "RESOLUTION_704_1472", + Resolution.RESOLUTION7201280 => "RESOLUTION_720_1280", + Resolution.RESOLUTION7361312 => "RESOLUTION_736_1312", + Resolution.RESOLUTION7681024 => "RESOLUTION_768_1024", + Resolution.RESOLUTION7681088 => "RESOLUTION_768_1088", + Resolution.RESOLUTION7681152 => "RESOLUTION_768_1152", + Resolution.RESOLUTION7681216 => "RESOLUTION_768_1216", + Resolution.RESOLUTION7681232 => "RESOLUTION_768_1232", + Resolution.RESOLUTION7681280 => "RESOLUTION_768_1280", + Resolution.RESOLUTION7681344 => "RESOLUTION_768_1344", + Resolution.RESOLUTION832960 => "RESOLUTION_832_960", + Resolution.RESOLUTION8321024 => "RESOLUTION_832_1024", + Resolution.RESOLUTION8321088 => "RESOLUTION_832_1088", + Resolution.RESOLUTION8321152 => "RESOLUTION_832_1152", + Resolution.RESOLUTION8321216 => "RESOLUTION_832_1216", + Resolution.RESOLUTION8321248 => "RESOLUTION_832_1248", + Resolution.RESOLUTION8641152 => "RESOLUTION_864_1152", + Resolution.RESOLUTION896960 => "RESOLUTION_896_960", + Resolution.RESOLUTION8961024 => "RESOLUTION_896_1024", + Resolution.RESOLUTION8961088 => "RESOLUTION_896_1088", + Resolution.RESOLUTION8961120 => "RESOLUTION_896_1120", + Resolution.RESOLUTION8961152 => "RESOLUTION_896_1152", + Resolution.RESOLUTION960832 => "RESOLUTION_960_832", + Resolution.RESOLUTION960896 => "RESOLUTION_960_896", + Resolution.RESOLUTION9601024 => "RESOLUTION_960_1024", + Resolution.RESOLUTION9601088 => "RESOLUTION_960_1088", + Resolution.RESOLUTION1024640 => "RESOLUTION_1024_640", + Resolution.RESOLUTION1024768 => "RESOLUTION_1024_768", + Resolution.RESOLUTION1024832 => "RESOLUTION_1024_832", + Resolution.RESOLUTION1024896 => "RESOLUTION_1024_896", + Resolution.RESOLUTION1024960 => "RESOLUTION_1024_960", + Resolution.RESOLUTION10241024 => "RESOLUTION_1024_1024", + Resolution.RESOLUTION1088768 => "RESOLUTION_1088_768", + Resolution.RESOLUTION1088832 => "RESOLUTION_1088_832", + Resolution.RESOLUTION1088896 => "RESOLUTION_1088_896", + Resolution.RESOLUTION1088960 => "RESOLUTION_1088_960", + Resolution.RESOLUTION1120896 => "RESOLUTION_1120_896", + Resolution.RESOLUTION1152704 => "RESOLUTION_1152_704", + Resolution.RESOLUTION1152768 => "RESOLUTION_1152_768", + Resolution.RESOLUTION1152832 => "RESOLUTION_1152_832", + Resolution.RESOLUTION1152864 => "RESOLUTION_1152_864", + Resolution.RESOLUTION1152896 => "RESOLUTION_1152_896", + Resolution.RESOLUTION1216704 => "RESOLUTION_1216_704", + Resolution.RESOLUTION1216768 => "RESOLUTION_1216_768", + Resolution.RESOLUTION1216832 => "RESOLUTION_1216_832", + Resolution.RESOLUTION1232768 => "RESOLUTION_1232_768", + Resolution.RESOLUTION1248832 => "RESOLUTION_1248_832", + Resolution.RESOLUTION1280704 => "RESOLUTION_1280_704", + Resolution.RESOLUTION1280720 => "RESOLUTION_1280_720", + Resolution.RESOLUTION1280768 => "RESOLUTION_1280_768", + Resolution.RESOLUTION1280800 => "RESOLUTION_1280_800", + Resolution.RESOLUTION1312736 => "RESOLUTION_1312_736", + Resolution.RESOLUTION1344640 => "RESOLUTION_1344_640", + Resolution.RESOLUTION1344704 => "RESOLUTION_1344_704", + Resolution.RESOLUTION1344768 => "RESOLUTION_1344_768", + Resolution.RESOLUTION1408576 => "RESOLUTION_1408_576", + Resolution.RESOLUTION1408640 => "RESOLUTION_1408_640", + Resolution.RESOLUTION1408704 => "RESOLUTION_1408_704", + Resolution.RESOLUTION1472576 => "RESOLUTION_1472_576", + Resolution.RESOLUTION1472640 => "RESOLUTION_1472_640", + Resolution.RESOLUTION1472704 => "RESOLUTION_1472_704", + Resolution.RESOLUTION1536512 => "RESOLUTION_1536_512", + Resolution.RESOLUTION1536576 => "RESOLUTION_1536_576", + Resolution.RESOLUTION1536640 => "RESOLUTION_1536_640", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Resolution? ToEnum(string value) + { + return value switch + { + "RESOLUTION_512_1536" => Resolution.RESOLUTION5121536, + "RESOLUTION_576_1408" => Resolution.RESOLUTION5761408, + "RESOLUTION_576_1472" => Resolution.RESOLUTION5761472, + "RESOLUTION_576_1536" => Resolution.RESOLUTION5761536, + "RESOLUTION_640_1024" => Resolution.RESOLUTION6401024, + "RESOLUTION_640_1344" => Resolution.RESOLUTION6401344, + "RESOLUTION_640_1408" => Resolution.RESOLUTION6401408, + "RESOLUTION_640_1472" => Resolution.RESOLUTION6401472, + "RESOLUTION_640_1536" => Resolution.RESOLUTION6401536, + "RESOLUTION_704_1152" => Resolution.RESOLUTION7041152, + "RESOLUTION_704_1216" => Resolution.RESOLUTION7041216, + "RESOLUTION_704_1280" => Resolution.RESOLUTION7041280, + "RESOLUTION_704_1344" => Resolution.RESOLUTION7041344, + "RESOLUTION_704_1408" => Resolution.RESOLUTION7041408, + "RESOLUTION_704_1472" => Resolution.RESOLUTION7041472, + "RESOLUTION_720_1280" => Resolution.RESOLUTION7201280, + "RESOLUTION_736_1312" => Resolution.RESOLUTION7361312, + "RESOLUTION_768_1024" => Resolution.RESOLUTION7681024, + "RESOLUTION_768_1088" => Resolution.RESOLUTION7681088, + "RESOLUTION_768_1152" => Resolution.RESOLUTION7681152, + "RESOLUTION_768_1216" => Resolution.RESOLUTION7681216, + "RESOLUTION_768_1232" => Resolution.RESOLUTION7681232, + "RESOLUTION_768_1280" => Resolution.RESOLUTION7681280, + "RESOLUTION_768_1344" => Resolution.RESOLUTION7681344, + "RESOLUTION_832_960" => Resolution.RESOLUTION832960, + "RESOLUTION_832_1024" => Resolution.RESOLUTION8321024, + "RESOLUTION_832_1088" => Resolution.RESOLUTION8321088, + "RESOLUTION_832_1152" => Resolution.RESOLUTION8321152, + "RESOLUTION_832_1216" => Resolution.RESOLUTION8321216, + "RESOLUTION_832_1248" => Resolution.RESOLUTION8321248, + "RESOLUTION_864_1152" => Resolution.RESOLUTION8641152, + "RESOLUTION_896_960" => Resolution.RESOLUTION896960, + "RESOLUTION_896_1024" => Resolution.RESOLUTION8961024, + "RESOLUTION_896_1088" => Resolution.RESOLUTION8961088, + "RESOLUTION_896_1120" => Resolution.RESOLUTION8961120, + "RESOLUTION_896_1152" => Resolution.RESOLUTION8961152, + "RESOLUTION_960_832" => Resolution.RESOLUTION960832, + "RESOLUTION_960_896" => Resolution.RESOLUTION960896, + "RESOLUTION_960_1024" => Resolution.RESOLUTION9601024, + "RESOLUTION_960_1088" => Resolution.RESOLUTION9601088, + "RESOLUTION_1024_640" => Resolution.RESOLUTION1024640, + "RESOLUTION_1024_768" => Resolution.RESOLUTION1024768, + "RESOLUTION_1024_832" => Resolution.RESOLUTION1024832, + "RESOLUTION_1024_896" => Resolution.RESOLUTION1024896, + "RESOLUTION_1024_960" => Resolution.RESOLUTION1024960, + "RESOLUTION_1024_1024" => Resolution.RESOLUTION10241024, + "RESOLUTION_1088_768" => Resolution.RESOLUTION1088768, + "RESOLUTION_1088_832" => Resolution.RESOLUTION1088832, + "RESOLUTION_1088_896" => Resolution.RESOLUTION1088896, + "RESOLUTION_1088_960" => Resolution.RESOLUTION1088960, + "RESOLUTION_1120_896" => Resolution.RESOLUTION1120896, + "RESOLUTION_1152_704" => Resolution.RESOLUTION1152704, + "RESOLUTION_1152_768" => Resolution.RESOLUTION1152768, + "RESOLUTION_1152_832" => Resolution.RESOLUTION1152832, + "RESOLUTION_1152_864" => Resolution.RESOLUTION1152864, + "RESOLUTION_1152_896" => Resolution.RESOLUTION1152896, + "RESOLUTION_1216_704" => Resolution.RESOLUTION1216704, + "RESOLUTION_1216_768" => Resolution.RESOLUTION1216768, + "RESOLUTION_1216_832" => Resolution.RESOLUTION1216832, + "RESOLUTION_1232_768" => Resolution.RESOLUTION1232768, + "RESOLUTION_1248_832" => Resolution.RESOLUTION1248832, + "RESOLUTION_1280_704" => Resolution.RESOLUTION1280704, + "RESOLUTION_1280_720" => Resolution.RESOLUTION1280720, + "RESOLUTION_1280_768" => Resolution.RESOLUTION1280768, + "RESOLUTION_1280_800" => Resolution.RESOLUTION1280800, + "RESOLUTION_1312_736" => Resolution.RESOLUTION1312736, + "RESOLUTION_1344_640" => Resolution.RESOLUTION1344640, + "RESOLUTION_1344_704" => Resolution.RESOLUTION1344704, + "RESOLUTION_1344_768" => Resolution.RESOLUTION1344768, + "RESOLUTION_1408_576" => Resolution.RESOLUTION1408576, + "RESOLUTION_1408_640" => Resolution.RESOLUTION1408640, + "RESOLUTION_1408_704" => Resolution.RESOLUTION1408704, + "RESOLUTION_1472_576" => Resolution.RESOLUTION1472576, + "RESOLUTION_1472_640" => Resolution.RESOLUTION1472640, + "RESOLUTION_1472_704" => Resolution.RESOLUTION1472704, + "RESOLUTION_1536_512" => Resolution.RESOLUTION1536512, + "RESOLUTION_1536_576" => Resolution.RESOLUTION1536576, + "RESOLUTION_1536_640" => Resolution.RESOLUTION1536640, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs new file mode 100644 index 0000000000..7c61a01cff --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs @@ -0,0 +1,84 @@ +//HintName: G.Models.StyleType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.
+ /// Example: REALISTIC + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum StyleType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="AUTO")] + AUTO, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="GENERAL")] + GENERAL, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="REALISTIC")] + REALISTIC, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="DESIGN")] + DESIGN, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="RENDER_3D")] + RENDER3D, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ANIME")] + ANIME, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StyleTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StyleType value) + { + return value switch + { + StyleType.AUTO => "AUTO", + StyleType.GENERAL => "GENERAL", + StyleType.REALISTIC => "REALISTIC", + StyleType.DESIGN => "DESIGN", + StyleType.RENDER3D => "RENDER_3D", + StyleType.ANIME => "ANIME", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StyleType? ToEnum(string value) + { + return value switch + { + "AUTO" => StyleType.AUTO, + "GENERAL" => StyleType.GENERAL, + "REALISTIC" => StyleType.REALISTIC, + "DESIGN" => StyleType.DESIGN, + "RENDER_3D" => StyleType.RENDER3D, + "ANIME" => StyleType.ANIME, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleImageRequest.g.verified.cs new file mode 100644 index 0000000000..845294e753 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleImageRequest.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.UpscaleImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpscaleImageRequest + { + /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + [global::Newtonsoft.Json.JsonProperty("image_request", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.UpscaleInitialImageRequest ImageRequest { get; set; } = default!; + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::Newtonsoft.Json.JsonProperty("image_file", Required = global::Newtonsoft.Json.Required.Always)] + public byte[] ImageFile { get; set; } = default!; + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::Newtonsoft.Json.JsonProperty("image_filename", Required = global::Newtonsoft.Json.Required.Always)] + public string ImageFilename { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs new file mode 100644 index 0000000000..852659fef6 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs @@ -0,0 +1,53 @@ +//HintName: G.Models.UpscaleInitialImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + public sealed partial class UpscaleInitialImageRequest + { + /// + /// An optional prompt to guide the upscale
+ /// Example: A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there is an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset. + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt")] + public string? Prompt { get; set; } + + /// + /// Default Value: 50
+ /// Example: 50 + ///
+ [global::Newtonsoft.Json.JsonProperty("resemblance")] + public int? Resemblance { get; set; } = 50; + + /// + /// Default Value: 50
+ /// Example: 50 + ///
+ [global::Newtonsoft.Json.JsonProperty("detail")] + public int? Detail { get; set; } = 50; + + /// + /// Determine if MagicPrompt should be used in generating the request or not
+ /// Default Value: AUTO
+ /// Example: ON + ///
+ [global::Newtonsoft.Json.JsonProperty("magic_prompt_option")] + public global::G.MagicPromptOption? MagicPromptOption { get; set; } = global::G.MagicPromptOption.AUTO; + + /// + /// Example: 12345 + /// + [global::Newtonsoft.Json.JsonProperty("seed")] + public int? Seed { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.PathBuilder.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.PathBuilder.g.verified.cs new file mode 100644 index 0000000000..7faa748137 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.PathBuilder.g.verified.cs @@ -0,0 +1,228 @@ +//HintName: G.PathBuilder.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + /// + /// A helper class to build URL paths with optional and required parameters. + /// + public class PathBuilder + { + private readonly global::System.Text.StringBuilder _stringBuilder = + new global::System.Text.StringBuilder(capacity: 256); + private bool _firstParameter = true; + + /// + /// Initializes a new instance of the class. + /// + /// The base path for the URL. + /// The base URI to prepend to the path, if any. + public PathBuilder( + string path, + global::System.Uri? baseUri = null) + { + if (baseUri is not null) + { + _stringBuilder.Append(baseUri.AbsoluteUri.TrimEnd('/')); + } + + _stringBuilder.Append(path); + } + + /// + /// Adds a required parameter to the URL. + /// + /// The name of the parameter. + /// The value of the parameter. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + string value) + { + if (_firstParameter) + { + _stringBuilder.Append('?'); + _firstParameter = false; + } + else + { + _stringBuilder.Append('&'); + } + + _stringBuilder.Append(global::System.Uri.EscapeDataString(name)); + _stringBuilder.Append('='); + _stringBuilder.Append(global::System.Uri.EscapeDataString(value)); + + return this; + } + + /// + /// Adds a required parameter with multiple values to the URL. + /// + /// The name of the parameter. + /// The values of the parameter. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + global::System.Collections.Generic.IEnumerable value, + string delimiter = ",", + bool explode = false) + { + if (explode) + { + foreach (var item in value) + { + AddRequiredParameter($"{name}", item); + } + + return this; + } + + AddRequiredParameter(name, string.Join(delimiter, value)); + + return this; + } + + /// + /// Adds a required parameter with multiple values to the URL, using a selector function. + /// + /// The type of the values. + /// The name of the parameter. + /// The values of the parameter. + /// The function to select the string representation of each value. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + global::System.Collections.Generic.IEnumerable value, + global::System.Func selector, + string delimiter = ",", + bool explode = false) + { + AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + + return this; + } + + /// + /// Adds an optional parameter to the URL. + /// + /// The name of the parameter. + /// The value of the parameter, or null if not present. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + string? value) + { + if (value is not null) + { + AddRequiredParameter(name, value); + } + + return this; + } + + /// + /// Adds an optional parameter with multiple values to the URL. + /// + /// The name of the parameter. + /// The values of the parameter, or null if not present. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + global::System.Collections.Generic.IEnumerable? value, + string delimiter = ",", + bool explode = false) + { + if (value is not null) + { + AddRequiredParameter(name, value, delimiter, explode); + } + + return this; + } + + /// + /// Adds an optional parameter with multiple values to the URL, using a selector function. + /// + /// The type of the values. + /// The name of the parameter. + /// The values of the parameter, or null if not present. + /// The function to select the string representation of each value. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + global::System.Collections.Generic.IEnumerable? value, + global::System.Func selector, + string delimiter = ",", + bool explode = false) + { + if (value is not null) + { + AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + } + + return this; + } + + /// + /// Adds a required parameter to the URL, using a formattable value. + /// + /// The type of the value. + /// The name of the parameter. + /// The value of the parameter. + /// The format string. + /// The format provider. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + T value, + string? format = null, + global::System.IFormatProvider? formatProvider = null) + where T : global::System.IFormattable + { + AddRequiredParameter(name, value.ToString(format, formatProvider)); + + return this; + } + + /// + /// Adds an optional parameter to the URL, using a formattable value. + /// + /// The type of the value. + /// The name of the parameter. + /// The value of the parameter, or null if not present. + /// The format string. + /// The format provider. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + T? value, + string? format = null, + global::System.IFormatProvider? formatProvider = null) + where T : global::System.IFormattable + { + if (value is not null) + { + AddOptionalParameter(name, value.ToString(format, formatProvider)); + } + + return this; + } + + /// + /// Returns the constructed URL as a string. + /// + /// The constructed URL. + public override string ToString() => _stringBuilder.ToString(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..9ef159498a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class AutoSDKPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.PostDescribe.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.PostDescribe.g.verified.cs new file mode 100644 index 0000000000..bff230fdcc --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.PostDescribe.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.VisionClient.PostDescribe.g.cs + +#nullable enable + +namespace G +{ + public partial class VisionClient + { + partial void PreparePostDescribeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.DescribeRequest request); + partial void PreparePostDescribeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.DescribeRequest request); + partial void ProcessPostDescribeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostDescribeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Describe an image + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostDescribeAsync( + global::G.DescribeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostDescribeArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/describe", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "image_file", + fileName: request.ImageFilename ?? string.Empty); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostDescribeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostDescribeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostDescribeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Describe an image + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostDescribeAsync( + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.DescribeRequest + { + ImageFile = imageFile, + ImageFilename = imageFilename, + }; + + return await PostDescribeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.g.verified.cs new file mode 100644 index 0000000000..f896308cc8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#G.VisionClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.VisionClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Operations related to understanding visual content
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class VisionClient : global::G.IVisionClient, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::Newtonsoft.Json.JsonSerializerSettings JsonSerializerOptions { get; set; } = new global::Newtonsoft.Json.JsonSerializerSettings(); + + + /// + /// Creates a new instance of the VisionClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public VisionClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs new file mode 100644 index 0000000000..582a505f39 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: JsonConverters.UnixTimestamp.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public class UnixTimestampJsonConverter : global::Newtonsoft.Json.JsonConverter + { + /// + public override global::System.DateTimeOffset ReadJson( + global::Newtonsoft.Json.JsonReader reader, + global::System.Type objectType, + global::System.DateTimeOffset existingValue, + bool hasExistingValue, + global::Newtonsoft.Json.JsonSerializer serializer) + { + if (reader.TokenType == global::Newtonsoft.Json.JsonToken.Integer) + { + switch (reader.Value) + { + case long unixTimestamp: + return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestamp); + case int unixTimestampInt: + return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestampInt); + } + } + + return default; + } + + /// + public override void WriteJson( + global::Newtonsoft.Json.JsonWriter writer, + global::System.DateTimeOffset value, + global::Newtonsoft.Json.JsonSerializer serializer) + { + writer.WriteValue(value.ToUnixTimeSeconds()); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Authorizations..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Authorizations..g.verified.cs new file mode 100644 index 0000000000..6654a99790 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Authorizations..g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.Api.Authorizations..g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + /// Authorize using ApiKey authentication. + /// + /// + public void AuthorizeUsingApiKey( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + _httpClient.DefaultRequestHeaders.Add("Api-Key", apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Constructors..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Constructors..g.verified.cs new file mode 100644 index 0000000000..3bdbd47b17 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.Constructors..g.verified.cs @@ -0,0 +1,28 @@ +//HintName: G.Api.Constructors..g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + public Api( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) : this(httpClient, baseUri) + { + Authorizing(_httpClient, ref apiKey); + + AuthorizeUsingApiKey(apiKey); + + Authorized(_httpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + ref string apiKey); + partial void Authorized( + global::System.Net.Http.HttpClient client); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..6d4c519d58 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Api.g.verified.cs @@ -0,0 +1,110 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// This is the API definition for Ideogram AI.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::G.IApi, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions + { + PropertyNameCaseInsensitive = true, + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = + { + new global::G.JsonConverters.AspectRatioJsonConverter(), + new global::G.JsonConverters.AspectRatioNullableJsonConverter(), + new global::G.JsonConverters.ModelEnumJsonConverter(), + new global::G.JsonConverters.ModelEnumNullableJsonConverter(), + new global::G.JsonConverters.MagicPromptOptionJsonConverter(), + new global::G.JsonConverters.MagicPromptOptionNullableJsonConverter(), + new global::G.JsonConverters.StyleTypeJsonConverter(), + new global::G.JsonConverters.StyleTypeNullableJsonConverter(), + new global::G.JsonConverters.ResolutionJsonConverter(), + new global::G.JsonConverters.ResolutionNullableJsonConverter(), + new global::G.JsonConverters.ColorPalettePresetNameJsonConverter(), + new global::G.JsonConverters.ColorPalettePresetNameNullableJsonConverter(), + new global::G.JsonConverters.ColorPaletteWithPresetNameOrMembersJsonConverter(), + } + }; + + + /// + /// All things related to generating content. + /// + public GenerateClient Generate => new GenerateClient(_httpClient) + { + JsonSerializerOptions = JsonSerializerOptions, + }; + + /// + /// Content related to managing API account and API access + /// + public ManageClient Manage => new ManageClient(_httpClient) + { + JsonSerializerOptions = JsonSerializerOptions, + }; + + /// + /// Operations related to understanding visual content + /// + public VisionClient Vision => new VisionClient(_httpClient) + { + JsonSerializerOptions = JsonSerializerOptions, + }; + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs new file mode 100644 index 0000000000..3a5f1d4d1d --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostGenerateImage.g.verified.cs @@ -0,0 +1,124 @@ +//HintName: G.GenerateClient.PostGenerateImage.g.cs + +#nullable enable + +namespace G +{ + public partial class GenerateClient + { + partial void PreparePostGenerateImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.GenerateImageRequest request); + partial void PreparePostGenerateImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.GenerateImageRequest request); + partial void ProcessPostGenerateImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostGenerateImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.GenerateImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostGenerateImageArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/generate", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, JsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostGenerateImageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostGenerateImageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostGenerateImageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.ImageRequest imageRequest, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.GenerateImageRequest + { + ImageRequest = imageRequest, + }; + + return await PostGenerateImageAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostRemixImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostRemixImage.g.verified.cs new file mode 100644 index 0000000000..6edd1844f7 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostRemixImage.g.verified.cs @@ -0,0 +1,147 @@ +//HintName: G.GenerateClient.PostRemixImage.g.cs + +#nullable enable + +namespace G +{ + public partial class GenerateClient + { + partial void PreparePostRemixImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.RemixImageRequest request); + partial void PreparePostRemixImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.RemixImageRequest request); + partial void ProcessPostRemixImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostRemixImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.RemixImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostRemixImageArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/remix", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ImageRequest}"), + name: "image_request"); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "image_file", + fileName: request.ImageFilename ?? string.Empty); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostRemixImageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostRemixImageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostRemixImageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.ImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.RemixImageRequest + { + ImageRequest = imageRequest, + ImageFile = imageFile, + ImageFilename = imageFilename, + }; + + return await PostRemixImageAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs new file mode 100644 index 0000000000..4fd868b35d --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.PostUpscaleImage.g.verified.cs @@ -0,0 +1,147 @@ +//HintName: G.GenerateClient.PostUpscaleImage.g.cs + +#nullable enable + +namespace G +{ + public partial class GenerateClient + { + partial void PreparePostUpscaleImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.UpscaleImageRequest request); + partial void PreparePostUpscaleImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.UpscaleImageRequest request); + partial void ProcessPostUpscaleImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostUpscaleImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostUpscaleImageArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/upscale", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ImageRequest}"), + name: "image_request"); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "image_file", + fileName: request.ImageFilename ?? string.Empty); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostUpscaleImageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostUpscaleImageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostUpscaleImageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleInitialImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.UpscaleImageRequest + { + ImageRequest = imageRequest, + ImageFile = imageFile, + ImageFilename = imageFilename, + }; + + return await PostUpscaleImageAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.g.verified.cs new file mode 100644 index 0000000000..6f66f08920 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.GenerateClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.GenerateClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// All things related to generating content.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GenerateClient : global::G.IGenerateClient, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + + + /// + /// Creates a new instance of the GenerateClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public GenerateClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IApi.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IApi.g.verified.cs new file mode 100644 index 0000000000..c9b383d553 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IApi.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.IApi.g.cs + +#nullable enable + +namespace G +{ + /// + /// This is the API definition for Ideogram AI.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IApi : global::System.IDisposable + { + /// + /// + /// + global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + + + /// + /// All things related to generating content. + /// + public GenerateClient Generate { get; } + + /// + /// Content related to managing API account and API access + /// + public ManageClient Manage { get; } + + /// + /// Operations related to understanding visual content + /// + public VisionClient Vision { get; } + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs new file mode 100644 index 0000000000..9652b6ee03 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostGenerateImage.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.IGenerateClient.PostGenerateImage.g.cs +#nullable enable + +namespace G +{ + public partial interface IGenerateClient + { + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.GenerateImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Generates images synchronously based on a given prompt and optional parameters.
+ /// A request to generate an image with Ideogram. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::G.ImageRequest imageRequest, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs new file mode 100644 index 0000000000..6d5f11d6f1 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostRemixImage.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.IGenerateClient.PostRemixImage.g.cs +#nullable enable + +namespace G +{ + public partial interface IGenerateClient + { + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.RemixImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Remix provided images synchronously based on a given prompt and optional parameters
+ /// A request to remix a provided image with Ideogram. Input images
+ /// are cropped to the chosen aspect ratio before being remixed.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostRemixImageAsync( + global::G.ImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs new file mode 100644 index 0000000000..0521025443 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.PostUpscaleImage.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.IGenerateClient.PostUpscaleImage.g.cs +#nullable enable + +namespace G +{ + public partial interface IGenerateClient + { + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upscale provided images synchronously with an optional prompt.
+ /// A request to upscale a provided image with Ideogram.
+ /// Supported image formats include JPEG, PNG, and WEBP + ///
+ /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::G.UpscaleInitialImageRequest imageRequest, + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.g.verified.cs new file mode 100644 index 0000000000..2e01f063f8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IGenerateClient.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.IGenerateClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// All things related to generating content.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IGenerateClient : global::System.IDisposable + { + /// + /// + /// + global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.CreateApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.CreateApiKey.g.verified.cs new file mode 100644 index 0000000000..7accd6ae61 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.CreateApiKey.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.CreateApiKey.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Creates an API key. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateApiKeyAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs new file mode 100644 index 0000000000..67c04a6cb9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.DeleteSingleApiKey.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.IManageClient.DeleteSingleApiKey.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Delete an API key. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteSingleApiKeyAsync( + string apiKeyId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiKeys.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiKeys.g.verified.cs new file mode 100644 index 0000000000..0b44553aa0 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiKeys.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.GetApiKeys.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve current API keys and their respective data. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiKeysAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs new file mode 100644 index 0000000000..d8f38143da --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiStripeSubscription.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.IManageClient.GetApiStripeSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve data relevant to connecting to Stripe. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiStripeSubscriptionAsync( + bool? isBusiness = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiSubscription.g.verified.cs new file mode 100644 index 0000000000..a2a2cae692 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiSubscription.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.GetApiSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve data relevant to creating an API subscription. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiTerms.g.verified.cs new file mode 100644 index 0000000000..523fc3c2a0 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.GetApiTerms.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.GetApiTerms.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Retrieve the latest terms of service for API usage. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetApiTermsAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiSubscription.g.verified.cs new file mode 100644 index 0000000000..7758f6245b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiSubscription.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.IManageClient.PostApiSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Update API subscription settings + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.PostApiSubscriptionRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Update API subscription settings + /// + /// + /// The current recharge settings for the API subscription. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.RechargeSettings? rechargeSettings = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiTerms.g.verified.cs new file mode 100644 index 0000000000..84ca490bd4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.PostApiTerms.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.IManageClient.PostApiTerms.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Accept terms + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiTermsAsync( + global::G.PostApiTermsRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Accept terms + /// + /// + /// The ID of the terms which are being accepted.
+ /// Example: TOS_2024_04_20 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostApiTermsAsync( + string termsId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs new file mode 100644 index 0000000000..842e03e800 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.ReactivateSubscription.g.verified.cs @@ -0,0 +1,16 @@ +//HintName: G.IManageClient.ReactivateSubscription.g.cs +#nullable enable + +namespace G +{ + public partial interface IManageClient + { + /// + /// Reactivates a subscription by attempting to re-enable Metronome billing. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ReactivateSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.g.verified.cs new file mode 100644 index 0000000000..38e6844c4c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IManageClient.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.IManageClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Content related to managing API account and API access
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IManageClient : global::System.IDisposable + { + /// + /// + /// + global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.PostDescribe.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.PostDescribe.g.verified.cs new file mode 100644 index 0000000000..fc4e3545c4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.PostDescribe.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.IVisionClient.PostDescribe.g.cs +#nullable enable + +namespace G +{ + public partial interface IVisionClient + { + /// + /// Describe an image + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostDescribeAsync( + global::G.DescribeRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Describe an image + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostDescribeAsync( + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.g.verified.cs new file mode 100644 index 0000000000..42c771690e --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.IVisionClient.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.IVisionClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Operations related to understanding visual content
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IVisionClient : global::System.IDisposable + { + /// + /// + /// + global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } + + + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.CreateApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.CreateApiKey.g.verified.cs new file mode 100644 index 0000000000..2f2cf65654 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.CreateApiKey.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.CreateApiKey.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareCreateApiKeyArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareCreateApiKeyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessCreateApiKeyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateApiKeyResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates an API key. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateApiKeyAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareCreateApiKeyArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/api_keys", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateApiKeyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateApiKeyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateApiKeyResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs new file mode 100644 index 0000000000..7938c33c50 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.DeleteSingleApiKey.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.ManageClient.DeleteSingleApiKey.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareDeleteSingleApiKeyArguments( + global::System.Net.Http.HttpClient httpClient, + ref string apiKeyId); + partial void PrepareDeleteSingleApiKeyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string apiKeyId); + partial void ProcessDeleteSingleApiKeyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Delete an API key. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteSingleApiKeyAsync( + string apiKeyId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteSingleApiKeyArguments( + httpClient: _httpClient, + apiKeyId: ref apiKeyId); + + var __pathBuilder = new PathBuilder( + path: $"/manage/api/api_keys/{apiKeyId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteSingleApiKeyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + apiKeyId: apiKeyId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteSingleApiKeyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiKeys.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiKeys.g.verified.cs new file mode 100644 index 0000000000..008fd7bde6 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiKeys.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.GetApiKeys.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiKeysArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetApiKeysRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetApiKeysResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiKeysResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve current API keys and their respective data. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiKeysAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiKeysArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/api_keys", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiKeysRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiKeysResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiKeysResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs new file mode 100644 index 0000000000..92bcb89a2a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiStripeSubscription.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ManageClient.GetApiStripeSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiStripeSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient, + ref bool? isBusiness); + partial void PrepareGetApiStripeSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + bool? isBusiness); + partial void ProcessGetApiStripeSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiStripeSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve data relevant to connecting to Stripe. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiStripeSubscriptionAsync( + bool? isBusiness = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiStripeSubscriptionArguments( + httpClient: _httpClient, + isBusiness: ref isBusiness); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/stripe_subscription", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("isBusiness", isBusiness?.ToString()) + ; + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiStripeSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + isBusiness: isBusiness); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiStripeSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiStripeSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiSubscription.g.verified.cs new file mode 100644 index 0000000000..f0db72e292 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiSubscription.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.GetApiSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetApiSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetApiSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve data relevant to creating an API subscription. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiSubscriptionArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/subscription", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiTerms.g.verified.cs new file mode 100644 index 0000000000..0ab06851d8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.GetApiTerms.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.GetApiTerms.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareGetApiTermsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetApiTermsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetApiTermsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetApiTermsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve the latest terms of service for API usage. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetApiTermsAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetApiTermsArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/terms", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetApiTermsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetApiTermsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetApiTermsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiSubscription.g.verified.cs new file mode 100644 index 0000000000..61025f4b96 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiSubscription.g.verified.cs @@ -0,0 +1,124 @@ +//HintName: G.ManageClient.PostApiSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PreparePostApiSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.PostApiSubscriptionRequest request); + partial void PreparePostApiSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.PostApiSubscriptionRequest request); + partial void ProcessPostApiSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostApiSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update API subscription settings + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.PostApiSubscriptionRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostApiSubscriptionArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/subscription", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, JsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostApiSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostApiSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostApiSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update API subscription settings + /// + /// + /// The current recharge settings for the API subscription. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::G.RechargeSettings? rechargeSettings = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.PostApiSubscriptionRequest + { + RechargeSettings = rechargeSettings, + }; + + return await PostApiSubscriptionAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiTerms.g.verified.cs new file mode 100644 index 0000000000..7cf260b9f8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.PostApiTerms.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ManageClient.PostApiTerms.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PreparePostApiTermsArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.PostApiTermsRequest request); + partial void PreparePostApiTermsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.PostApiTermsRequest request); + partial void ProcessPostApiTermsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Accept terms + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiTermsAsync( + global::G.PostApiTermsRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostApiTermsArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/terms", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, JsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostApiTermsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostApiTermsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// Accept terms + /// + /// + /// The ID of the terms which are being accepted.
+ /// Example: TOS_2024_04_20 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostApiTermsAsync( + string termsId, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.PostApiTermsRequest + { + TermsId = termsId, + }; + + await PostApiTermsAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs new file mode 100644 index 0000000000..224d486e6b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.ReactivateSubscription.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.ManageClient.ReactivateSubscription.g.cs + +#nullable enable + +namespace G +{ + public partial class ManageClient + { + partial void PrepareReactivateSubscriptionArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareReactivateSubscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessReactivateSubscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessReactivateSubscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Reactivates a subscription by attempting to re-enable Metronome billing. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ReactivateSubscriptionAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareReactivateSubscriptionArguments( + httpClient: _httpClient); + + var __pathBuilder = new PathBuilder( + path: "/manage/api/reactivate", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareReactivateSubscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessReactivateSubscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessReactivateSubscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.g.verified.cs new file mode 100644 index 0000000000..1b6622abe4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.ManageClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.ManageClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Content related to managing API account and API access
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ManageClient : global::G.IManageClient, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + + + /// + /// Creates a new instance of the ManageClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ManageClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ApiTerms.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ApiTerms.g.verified.cs new file mode 100644 index 0000000000..a87e4270fd --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ApiTerms.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ApiTerms.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiTerms + { + /// + /// The ID of the terms. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("terms_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TermsId { get; set; } + + /// + /// The URL where the terms are hosted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("terms_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TermsUrl { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.AspectRatio.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.AspectRatio.g.verified.cs new file mode 100644 index 0000000000..52c4e938cb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.AspectRatio.g.verified.cs @@ -0,0 +1,107 @@ +//HintName: G.Models.AspectRatio.g.cs + +#nullable enable + +namespace G +{ + /// + /// (Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.
+ /// Example: ASPECT_10_16 + ///
+ public enum AspectRatio + { + /// + /// + /// + ASPECT1016, + /// + /// + /// + ASPECT1610, + /// + /// + /// + ASPECT916, + /// + /// + /// + ASPECT169, + /// + /// + /// + ASPECT32, + /// + /// + /// + ASPECT23, + /// + /// + /// + ASPECT43, + /// + /// + /// + ASPECT34, + /// + /// + /// + ASPECT11, + /// + /// + /// + ASPECT13, + /// + /// + /// + ASPECT31, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AspectRatioExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AspectRatio value) + { + return value switch + { + AspectRatio.ASPECT1016 => "ASPECT_10_16", + AspectRatio.ASPECT1610 => "ASPECT_16_10", + AspectRatio.ASPECT916 => "ASPECT_9_16", + AspectRatio.ASPECT169 => "ASPECT_16_9", + AspectRatio.ASPECT32 => "ASPECT_3_2", + AspectRatio.ASPECT23 => "ASPECT_2_3", + AspectRatio.ASPECT43 => "ASPECT_4_3", + AspectRatio.ASPECT34 => "ASPECT_3_4", + AspectRatio.ASPECT11 => "ASPECT_1_1", + AspectRatio.ASPECT13 => "ASPECT_1_3", + AspectRatio.ASPECT31 => "ASPECT_3_1", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AspectRatio? ToEnum(string value) + { + return value switch + { + "ASPECT_10_16" => AspectRatio.ASPECT1016, + "ASPECT_16_10" => AspectRatio.ASPECT1610, + "ASPECT_9_16" => AspectRatio.ASPECT916, + "ASPECT_16_9" => AspectRatio.ASPECT169, + "ASPECT_3_2" => AspectRatio.ASPECT32, + "ASPECT_2_3" => AspectRatio.ASPECT23, + "ASPECT_4_3" => AspectRatio.ASPECT43, + "ASPECT_3_4" => AspectRatio.ASPECT34, + "ASPECT_1_1" => AspectRatio.ASPECT11, + "ASPECT_1_3" => AspectRatio.ASPECT13, + "ASPECT_3_1" => AspectRatio.ASPECT31, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteMember.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteMember.g.verified.cs new file mode 100644 index 0000000000..23e7a515e3 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteMember.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.ColorPaletteMember.g.cs + +#nullable enable + +namespace G +{ + /// + /// A member of a color palette. + /// + public sealed partial class ColorPaletteMember + { + /// + /// The hexadecimal representation of the color with an optional chosen weight
+ /// Example: #FFFFFF + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("color_hex")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ColorHex { get; set; } + + /// + /// The weight of the color in the color palette.
+ /// Example: 0.25 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("color_weight")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double ColorWeight { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPalettePresetName.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPalettePresetName.g.verified.cs new file mode 100644 index 0000000000..b1fd11f75f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPalettePresetName.g.verified.cs @@ -0,0 +1,89 @@ +//HintName: G.Models.ColorPalettePresetName.g.cs + +#nullable enable + +namespace G +{ + /// + /// A color palette preset value
+ /// Example: PASTEL + ///
+ public enum ColorPalettePresetName + { + /// + /// + /// + EMBER, + /// + /// + /// + FRESH, + /// + /// + /// + JUNGLE, + /// + /// + /// + MAGIC, + /// + /// + /// + MELON, + /// + /// + /// + MOSAIC, + /// + /// + /// + PASTEL, + /// + /// + /// + ULTRAMARINE, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ColorPalettePresetNameExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ColorPalettePresetName value) + { + return value switch + { + ColorPalettePresetName.EMBER => "EMBER", + ColorPalettePresetName.FRESH => "FRESH", + ColorPalettePresetName.JUNGLE => "JUNGLE", + ColorPalettePresetName.MAGIC => "MAGIC", + ColorPalettePresetName.MELON => "MELON", + ColorPalettePresetName.MOSAIC => "MOSAIC", + ColorPalettePresetName.PASTEL => "PASTEL", + ColorPalettePresetName.ULTRAMARINE => "ULTRAMARINE", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ColorPalettePresetName? ToEnum(string value) + { + return value switch + { + "EMBER" => ColorPalettePresetName.EMBER, + "FRESH" => ColorPalettePresetName.FRESH, + "JUNGLE" => ColorPalettePresetName.JUNGLE, + "MAGIC" => ColorPalettePresetName.MAGIC, + "MELON" => ColorPalettePresetName.MELON, + "MOSAIC" => ColorPalettePresetName.MOSAIC, + "PASTEL" => ColorPalettePresetName.PASTEL, + "ULTRAMARINE" => ColorPalettePresetName.ULTRAMARINE, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs new file mode 100644 index 0000000000..7aa2734d8b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithMembers.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ColorPaletteWithMembers.g.cs + +#nullable enable + +namespace G +{ + /// + /// A color palette represented only via its members + /// + public sealed partial class ColorPaletteWithMembers + { + /// + /// A list of ColorPaletteMembers that define the color palette. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("members")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Members { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs new file mode 100644 index 0000000000..6e765c8873 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetName.g.verified.cs @@ -0,0 +1,27 @@ +//HintName: G.Models.ColorPaletteWithPresetName.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ColorPaletteWithPresetName + { + /// + /// A color palette preset value
+ /// Example: PASTEL + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.ColorPalettePresetNameJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ColorPalettePresetName Name { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs new file mode 100644 index 0000000000..435c4525fe --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ColorPaletteWithPresetNameOrMembers.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ColorPaletteWithPresetNameOrMembers.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members). + /// + public readonly partial struct ColorPaletteWithPresetNameOrMembers : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ColorPaletteWithPresetName? Value1 { get; init; } +#else + public global::G.ColorPaletteWithPresetName? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithPresetName value) => new ColorPaletteWithPresetNameOrMembers(value); + + /// + /// + /// + public static implicit operator global::G.ColorPaletteWithPresetName?(ColorPaletteWithPresetNameOrMembers @this) => @this.Value1; + + /// + /// + /// + public ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithPresetName? value) + { + Value1 = value; + } + + /// + /// A color palette represented only via its members + /// +#if NET6_0_OR_GREATER + public global::G.ColorPaletteWithMembers? Value2 { get; init; } +#else + public global::G.ColorPaletteWithMembers? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithMembers value) => new ColorPaletteWithPresetNameOrMembers(value); + + /// + /// + /// + public static implicit operator global::G.ColorPaletteWithMembers?(ColorPaletteWithPresetNameOrMembers @this) => @this.Value2; + + /// + /// + /// + public ColorPaletteWithPresetNameOrMembers(global::G.ColorPaletteWithMembers? value) + { + Value2 = value; + } + + /// + /// + /// + public ColorPaletteWithPresetNameOrMembers( + global::G.ColorPaletteWithPresetName? value1, + global::G.ColorPaletteWithMembers? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ColorPaletteWithPresetName), + Value2, + typeof(global::G.ColorPaletteWithMembers), + }; + 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 fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ColorPaletteWithPresetNameOrMembers 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 ==(ColorPaletteWithPresetNameOrMembers obj1, ColorPaletteWithPresetNameOrMembers obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ColorPaletteWithPresetNameOrMembers obj1, ColorPaletteWithPresetNameOrMembers obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ColorPaletteWithPresetNameOrMembers o && Equals(o); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeRequest.g.verified.cs new file mode 100644 index 0000000000..4826a57cf9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeRequest.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.DescribeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + public sealed partial class DescribeRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] ImageFile { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ImageFilename { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeResponse.g.verified.cs new file mode 100644 index 0000000000..8b77a4586d --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.DescribeResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DescribeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// The response for a describe request encapsulates a list of descriptions + /// + public sealed partial class DescribeResponse + { + /// + /// A collection of descriptions for given content + /// + [global::System.Text.Json.Serialization.JsonPropertyName("descriptions")] + public global::System.Collections.Generic.IList? Descriptions { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Description.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Description.g.verified.cs new file mode 100644 index 0000000000..4e4d6bd980 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Description.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.Description.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Description + { + /// + /// The generated description for the provided image.
+ /// Example: A meticulously illustrated cat with striped patterns, sitting upright. The cat's eyes are a captivating shade of yellow, and it appears to be gazing intently at something. The background consists of abstract, swirling patterns in shades of black, white, and beige, creating an almost fluid or wavy appearance. The cat is positioned in the foreground, with the background elements fading into the distance, giving a sense of depth to the image. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageRequest.g.verified.cs new file mode 100644 index 0000000000..b66fedc534 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageRequest.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.GenerateImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateImageRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_request")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ImageRequest ImageRequest { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageResponse.g.verified.cs new file mode 100644 index 0000000000..237a42ad62 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.GenerateImageResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateImageResponse + { + /// + /// The time the request was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Created { get; set; } + + /// + /// A list of ImageObjects that contain the generated image(s). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageSafetyError.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageSafetyError.g.verified.cs new file mode 100644 index 0000000000..d5dc75fa1b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GenerateImageSafetyError.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.GenerateImageSafetyError.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateImageSafetyError + { + /// + /// Example: Prompt provided failed safety check due to the inclusion of prohibited content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Error { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiKeysResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiKeysResponse.g.verified.cs new file mode 100644 index 0000000000..2cde475fdb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiKeysResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetApiKeysResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetApiKeysResponse + { + /// + /// The current API keys that are active. Only returns redacted keys. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("current_api_keys")] + public global::System.Collections.Generic.IList? CurrentApiKeys { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiTermsResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiTermsResponse.g.verified.cs new file mode 100644 index 0000000000..4d8c158228 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.GetApiTermsResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.GetApiTermsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetApiTermsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_terms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ApiTerms ApiTerms { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageObject.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageObject.g.verified.cs new file mode 100644 index 0000000000..972e5cf149 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageObject.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.ImageObject.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ImageObject + { + /// + /// The direct link to the image generated.
+ /// Example: https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// The prompt used for the generation. This may be different from the original prompt.
+ /// Example: A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// The resolution of the final image.
+ /// Example: 1024x1024 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("resolution")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Resolution { get; set; } + + /// + /// Whether this request passes safety checks. If false, the url field will be empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_image_safe")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool IsImageSafe { get; set; } + + /// + /// Example: 12345 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Seed { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageRequest.g.verified.cs new file mode 100644 index 0000000000..129acad368 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageRequest.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.Models.ImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ImageRequest + { + /// + /// The prompt to use to generate the image.
+ /// Example: A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there is an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// (Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.
+ /// Example: ASPECT_10_16 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("aspect_ratio")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.AspectRatioJsonConverter))] + public global::G.AspectRatio? AspectRatio { get; set; } + + /// + /// The model used to generate. Defaults to V_2.
+ /// Default Value: V_2
+ /// Example: V_2_TURBO + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.ModelEnumJsonConverter))] + public global::G.ModelEnum? Model { get; set; } = global::G.ModelEnum.V2; + + /// + /// Determine if MagicPrompt should be used in generating the request or not
+ /// Default Value: AUTO
+ /// Example: ON + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("magic_prompt_option")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.MagicPromptOptionJsonConverter))] + public global::G.MagicPromptOption? MagicPromptOption { get; set; } = global::G.MagicPromptOption.AUTO; + + /// + /// Example: 12345 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.
+ /// Example: REALISTIC + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("style_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.StyleTypeJsonConverter))] + public global::G.StyleType? StyleType { get; set; } + + /// + /// Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("negative_prompt")] + public string? NegativePrompt { get; set; } + + /// + /// (For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio.
+ /// Example: RESOLUTION_1024_1024 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("resolution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.ResolutionJsonConverter))] + public global::G.Resolution? Resolution { get; set; } + + /// + /// A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("color_palette")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.ColorPaletteWithPresetNameOrMembersJsonConverter))] + public global::G.ColorPaletteWithPresetNameOrMembers? ColorPalette { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageSafetyError.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageSafetyError.g.verified.cs new file mode 100644 index 0000000000..1890391396 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ImageSafetyError.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ImageSafetyError.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ImageSafetyError + { + /// + /// Example: Image provided failed safety check due to the inclusion of prohibited content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Error { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.InitialImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.InitialImageRequest.g.verified.cs new file mode 100644 index 0000000000..8b195c19dd --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.InitialImageRequest.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.InitialImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// A request to generate a new image using a provided image and a prompt. + /// + public sealed partial class InitialImageRequest + { + /// + /// Default Value: 50
+ /// Example: 50 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("image_weight")] + public int? ImageWeight { get; set; } = 50; + + /// + /// 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/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MagicPromptOption.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MagicPromptOption.g.verified.cs new file mode 100644 index 0000000000..dc4da8031c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MagicPromptOption.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.MagicPromptOption.g.cs + +#nullable enable + +namespace G +{ + /// + /// Determine if MagicPrompt should be used in generating the request or not
+ /// Default Value: AUTO
+ /// Example: ON + ///
+ public enum MagicPromptOption + { + /// + /// + /// + AUTO, + /// + /// + /// + ON, + /// + /// + /// + OFF, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MagicPromptOptionExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MagicPromptOption value) + { + return value switch + { + MagicPromptOption.AUTO => "AUTO", + MagicPromptOption.ON => "ON", + MagicPromptOption.OFF => "OFF", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MagicPromptOption? ToEnum(string value) + { + return value switch + { + "AUTO" => MagicPromptOption.AUTO, + "ON" => MagicPromptOption.ON, + "OFF" => MagicPromptOption.OFF, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs new file mode 100644 index 0000000000..f56670371b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiStripeSubscriptionResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ManageApiStripeSubscriptionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ManageApiStripeSubscriptionResponse + { + /// + /// The URL for the user to checkout the Stripe subscription plan. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stripe_subscription_url")] + public string? StripeSubscriptionUrl { get; set; } + + /// + /// DEPRECATED. The URL for the user to manage the existing Stripe subscription plan. Get this from ManageApiSubscriptionResponse instead. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stripe_billing_url")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? StripeBillingUrl { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs new file mode 100644 index 0000000000..a16e9f9d4d --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ManageApiSubscriptionResponse.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.ManageApiSubscriptionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ManageApiSubscriptionResponse + { + /// + /// Whether or not the latest required terms have been accepted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_accepted_terms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasAcceptedTerms { get; set; } + + /// + /// Whether or not Stripe is setup for API usage. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_stripe_setup")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasStripeSetup { get; set; } + + /// + /// The URL to display the customer usage dashboard. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metronome_dashboard_url")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? MetronomeDashboardUrl { get; set; } + + /// + /// The URL to display the customer usage dashboard, in dark mode. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metronome_dashboard_dark_mode_url")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? MetronomeDashboardDarkModeUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metronome_links")] + public global::G.MetronomeLinks? MetronomeLinks { get; set; } + + /// + /// The current recharge settings for the API subscription. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { get; set; } + + /// + /// The URL for the user to manage the existing Stripe subscription plan. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stripe_billing_url")] + public string? StripeBillingUrl { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MetronomeLinks.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MetronomeLinks.g.verified.cs new file mode 100644 index 0000000000..badeedcaaa --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.MetronomeLinks.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.MetronomeLinks.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class MetronomeLinks + { + /// + /// The URL to display the customer invoice and API usage. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("invoices_iframe_url")] + public string? InvoicesIframeUrl { get; set; } + + /// + /// The URL to display the customer invoice and API usage. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("invoices_iframe_dark_mode_url")] + public string? InvoicesIframeDarkModeUrl { get; set; } + + /// + /// The URL to display the customer invoice and API usage. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("credits_iframe_url")] + public string? CreditsIframeUrl { get; set; } + + /// + /// The URL to display the customer invoice and API usage. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("credits_iframe_dark_mode_url")] + public string? CreditsIframeDarkModeUrl { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ModelEnum.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ModelEnum.g.verified.cs new file mode 100644 index 0000000000..0362da93be --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.ModelEnum.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.Models.ModelEnum.g.cs + +#nullable enable + +namespace G +{ + /// + /// The model used to generate. Defaults to V_2.
+ /// Default Value: V_2
+ /// Example: V_2_TURBO + ///
+ public enum ModelEnum + { + /// + /// + /// + V1, + /// + /// + /// + V1TURBO, + /// + /// + /// + V2, + /// + /// + /// + V2TURBO, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModelEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ModelEnum value) + { + return value switch + { + ModelEnum.V1 => "V_1", + ModelEnum.V1TURBO => "V_1_TURBO", + ModelEnum.V2 => "V_2", + ModelEnum.V2TURBO => "V_2_TURBO", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ModelEnum? ToEnum(string value) + { + return value switch + { + "V_1" => ModelEnum.V1, + "V_1_TURBO" => ModelEnum.V1TURBO, + "V_2" => ModelEnum.V2, + "V_2_TURBO" => ModelEnum.V2TURBO, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiKeyResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiKeyResponse.g.verified.cs new file mode 100644 index 0000000000..850d0996c1 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiKeyResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.PostApiKeyResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PostApiKeyResponse + { + /// + /// The API key to use when making authenticated requests with the API. This key will only be shown once.
+ /// Example: vkpDjaKdMNR8QJ83GjfNvFZJbnoi65XUp70MgZNtA2H9XE8yfDnmr_6BaRyQkF9hnJzu6mUPRLBmqlnZMwetJA + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("api_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ApiKey { get; set; } + + /// + /// The ID of the API key. A URL safe base64 encoded UUID
+ /// Example: JRPVD7jWR1aTBYiJ0UFVOg== + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ApiKeyId { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiReactivateResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiReactivateResponse.g.verified.cs new file mode 100644 index 0000000000..30134030ab --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiReactivateResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiReactivateResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to re-activating API settings. + /// + public sealed partial class PostApiReactivateResponse + { + /// + /// The current recharge settings for the API subscription. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionError.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionError.g.verified.cs new file mode 100644 index 0000000000..ff6b33c68c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionError.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiSubscriptionError.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents an error when attempting to update the API subscription. + /// + public sealed partial class PostApiSubscriptionError + { + /// + /// Error messages about what the error could be. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + public global::System.Collections.Generic.IList? Messages { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs new file mode 100644 index 0000000000..94d17467ba --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiSubscriptionRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request to update API settings. Fields which are omitted will be ignored. + /// + public sealed partial class PostApiSubscriptionRequest + { + /// + /// The current recharge settings for the API subscription. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs new file mode 100644 index 0000000000..9f3e9e8c21 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiSubscriptionResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.PostApiSubscriptionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// The updated API subscription. + /// + public sealed partial class PostApiSubscriptionResponse + { + /// + /// The current recharge settings for the API subscription. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] + public global::G.RechargeSettings? RechargeSettings { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiTermsRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiTermsRequest.g.verified.cs new file mode 100644 index 0000000000..feefbc5cba --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.PostApiTermsRequest.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.PostApiTermsRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PostApiTermsRequest + { + /// + /// The ID of the terms which are being accepted.
+ /// Example: TOS_2024_04_20 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("terms_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TermsId { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Price.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Price.g.verified.cs new file mode 100644 index 0000000000..a6861e8ad8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Price.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.Price.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents a price. + /// + public sealed partial class Price + { + /// + /// The ISO 4217 currency code for the price object.
+ /// Example: USD + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("currency_code")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CurrencyCode { get; set; } + + /// + /// The amount of the currency in the common denomination. For example, in USD this is cents.
+ /// Example: 1050 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("amount")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Amount { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettings.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettings.g.verified.cs new file mode 100644 index 0000000000..8243526662 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettings.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.RechargeSettings.g.cs + +#nullable enable + +namespace G +{ + /// + /// The current recharge settings for the API subscription. + /// + public sealed partial class RechargeSettings + { + /// + /// Represents a price. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_up_balance")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Price TopUpBalance { get; set; } + + /// + /// Represents a price. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("minimum_balance_threshold")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Price MinimumBalanceThreshold { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettingsResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettingsResponse.g.verified.cs new file mode 100644 index 0000000000..6569f1080c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RechargeSettingsResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.RechargeSettingsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RechargeSettingsResponse + { + /// + /// Whether or not the recharge setting is currently active. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_active")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool IsActive { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RedactedApiKey.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RedactedApiKey.g.verified.cs new file mode 100644 index 0000000000..32b96daea8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RedactedApiKey.g.verified.cs @@ -0,0 +1,41 @@ +//HintName: G.Models.RedactedApiKey.g.cs + +#nullable enable + +namespace G +{ + /// + /// A representation of an API key that does not contain the full key. + /// + public sealed partial class RedactedApiKey + { + /// + /// A redacted text snippet of the API key. Contains the first 4 characters of the API key
+ /// Example: vkpDja + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("redacted_api_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string RedactedApiKey1 { get; set; } + + /// + /// The time at which the key was created + /// + [global::System.Text.Json.Serialization.JsonPropertyName("creation_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreationTime { get; set; } + + /// + /// A URL safe base64 encoded UUID
+ /// Example: JRPVD7jWR1aTBYiJ0UFVOg== + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ApiKeyId { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RemixImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RemixImageRequest.g.verified.cs new file mode 100644 index 0000000000..f43fd526f6 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.RemixImageRequest.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.RemixImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// A request to generate an image from a source image and a provided caption, provided images are cropped to match the chosen output aspect ratio + /// + public sealed partial class RemixImageRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_request")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ImageRequest ImageRequest { get; set; } + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] ImageFile { get; set; } + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ImageFilename { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Resolution.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Resolution.g.verified.cs new file mode 100644 index 0000000000..79d3ad6a96 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.Resolution.g.verified.cs @@ -0,0 +1,509 @@ +//HintName: G.Models.Resolution.g.cs + +#nullable enable + +namespace G +{ + /// + /// (For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio.
+ /// Example: RESOLUTION_1024_1024 + ///
+ public enum Resolution + { + /// + /// + /// + RESOLUTION5121536, + /// + /// + /// + RESOLUTION5761408, + /// + /// + /// + RESOLUTION5761472, + /// + /// + /// + RESOLUTION5761536, + /// + /// + /// + RESOLUTION6401024, + /// + /// + /// + RESOLUTION6401344, + /// + /// + /// + RESOLUTION6401408, + /// + /// + /// + RESOLUTION6401472, + /// + /// + /// + RESOLUTION6401536, + /// + /// + /// + RESOLUTION7041152, + /// + /// + /// + RESOLUTION7041216, + /// + /// + /// + RESOLUTION7041280, + /// + /// + /// + RESOLUTION7041344, + /// + /// + /// + RESOLUTION7041408, + /// + /// + /// + RESOLUTION7041472, + /// + /// + /// + RESOLUTION7201280, + /// + /// + /// + RESOLUTION7361312, + /// + /// + /// + RESOLUTION7681024, + /// + /// + /// + RESOLUTION7681088, + /// + /// + /// + RESOLUTION7681152, + /// + /// + /// + RESOLUTION7681216, + /// + /// + /// + RESOLUTION7681232, + /// + /// + /// + RESOLUTION7681280, + /// + /// + /// + RESOLUTION7681344, + /// + /// + /// + RESOLUTION832960, + /// + /// + /// + RESOLUTION8321024, + /// + /// + /// + RESOLUTION8321088, + /// + /// + /// + RESOLUTION8321152, + /// + /// + /// + RESOLUTION8321216, + /// + /// + /// + RESOLUTION8321248, + /// + /// + /// + RESOLUTION8641152, + /// + /// + /// + RESOLUTION896960, + /// + /// + /// + RESOLUTION8961024, + /// + /// + /// + RESOLUTION8961088, + /// + /// + /// + RESOLUTION8961120, + /// + /// + /// + RESOLUTION8961152, + /// + /// + /// + RESOLUTION960832, + /// + /// + /// + RESOLUTION960896, + /// + /// + /// + RESOLUTION9601024, + /// + /// + /// + RESOLUTION9601088, + /// + /// + /// + RESOLUTION1024640, + /// + /// + /// + RESOLUTION1024768, + /// + /// + /// + RESOLUTION1024832, + /// + /// + /// + RESOLUTION1024896, + /// + /// + /// + RESOLUTION1024960, + /// + /// + /// + RESOLUTION10241024, + /// + /// + /// + RESOLUTION1088768, + /// + /// + /// + RESOLUTION1088832, + /// + /// + /// + RESOLUTION1088896, + /// + /// + /// + RESOLUTION1088960, + /// + /// + /// + RESOLUTION1120896, + /// + /// + /// + RESOLUTION1152704, + /// + /// + /// + RESOLUTION1152768, + /// + /// + /// + RESOLUTION1152832, + /// + /// + /// + RESOLUTION1152864, + /// + /// + /// + RESOLUTION1152896, + /// + /// + /// + RESOLUTION1216704, + /// + /// + /// + RESOLUTION1216768, + /// + /// + /// + RESOLUTION1216832, + /// + /// + /// + RESOLUTION1232768, + /// + /// + /// + RESOLUTION1248832, + /// + /// + /// + RESOLUTION1280704, + /// + /// + /// + RESOLUTION1280720, + /// + /// + /// + RESOLUTION1280768, + /// + /// + /// + RESOLUTION1280800, + /// + /// + /// + RESOLUTION1312736, + /// + /// + /// + RESOLUTION1344640, + /// + /// + /// + RESOLUTION1344704, + /// + /// + /// + RESOLUTION1344768, + /// + /// + /// + RESOLUTION1408576, + /// + /// + /// + RESOLUTION1408640, + /// + /// + /// + RESOLUTION1408704, + /// + /// + /// + RESOLUTION1472576, + /// + /// + /// + RESOLUTION1472640, + /// + /// + /// + RESOLUTION1472704, + /// + /// + /// + RESOLUTION1536512, + /// + /// + /// + RESOLUTION1536576, + /// + /// + /// + RESOLUTION1536640, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResolutionExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Resolution value) + { + return value switch + { + Resolution.RESOLUTION5121536 => "RESOLUTION_512_1536", + Resolution.RESOLUTION5761408 => "RESOLUTION_576_1408", + Resolution.RESOLUTION5761472 => "RESOLUTION_576_1472", + Resolution.RESOLUTION5761536 => "RESOLUTION_576_1536", + Resolution.RESOLUTION6401024 => "RESOLUTION_640_1024", + Resolution.RESOLUTION6401344 => "RESOLUTION_640_1344", + Resolution.RESOLUTION6401408 => "RESOLUTION_640_1408", + Resolution.RESOLUTION6401472 => "RESOLUTION_640_1472", + Resolution.RESOLUTION6401536 => "RESOLUTION_640_1536", + Resolution.RESOLUTION7041152 => "RESOLUTION_704_1152", + Resolution.RESOLUTION7041216 => "RESOLUTION_704_1216", + Resolution.RESOLUTION7041280 => "RESOLUTION_704_1280", + Resolution.RESOLUTION7041344 => "RESOLUTION_704_1344", + Resolution.RESOLUTION7041408 => "RESOLUTION_704_1408", + Resolution.RESOLUTION7041472 => "RESOLUTION_704_1472", + Resolution.RESOLUTION7201280 => "RESOLUTION_720_1280", + Resolution.RESOLUTION7361312 => "RESOLUTION_736_1312", + Resolution.RESOLUTION7681024 => "RESOLUTION_768_1024", + Resolution.RESOLUTION7681088 => "RESOLUTION_768_1088", + Resolution.RESOLUTION7681152 => "RESOLUTION_768_1152", + Resolution.RESOLUTION7681216 => "RESOLUTION_768_1216", + Resolution.RESOLUTION7681232 => "RESOLUTION_768_1232", + Resolution.RESOLUTION7681280 => "RESOLUTION_768_1280", + Resolution.RESOLUTION7681344 => "RESOLUTION_768_1344", + Resolution.RESOLUTION832960 => "RESOLUTION_832_960", + Resolution.RESOLUTION8321024 => "RESOLUTION_832_1024", + Resolution.RESOLUTION8321088 => "RESOLUTION_832_1088", + Resolution.RESOLUTION8321152 => "RESOLUTION_832_1152", + Resolution.RESOLUTION8321216 => "RESOLUTION_832_1216", + Resolution.RESOLUTION8321248 => "RESOLUTION_832_1248", + Resolution.RESOLUTION8641152 => "RESOLUTION_864_1152", + Resolution.RESOLUTION896960 => "RESOLUTION_896_960", + Resolution.RESOLUTION8961024 => "RESOLUTION_896_1024", + Resolution.RESOLUTION8961088 => "RESOLUTION_896_1088", + Resolution.RESOLUTION8961120 => "RESOLUTION_896_1120", + Resolution.RESOLUTION8961152 => "RESOLUTION_896_1152", + Resolution.RESOLUTION960832 => "RESOLUTION_960_832", + Resolution.RESOLUTION960896 => "RESOLUTION_960_896", + Resolution.RESOLUTION9601024 => "RESOLUTION_960_1024", + Resolution.RESOLUTION9601088 => "RESOLUTION_960_1088", + Resolution.RESOLUTION1024640 => "RESOLUTION_1024_640", + Resolution.RESOLUTION1024768 => "RESOLUTION_1024_768", + Resolution.RESOLUTION1024832 => "RESOLUTION_1024_832", + Resolution.RESOLUTION1024896 => "RESOLUTION_1024_896", + Resolution.RESOLUTION1024960 => "RESOLUTION_1024_960", + Resolution.RESOLUTION10241024 => "RESOLUTION_1024_1024", + Resolution.RESOLUTION1088768 => "RESOLUTION_1088_768", + Resolution.RESOLUTION1088832 => "RESOLUTION_1088_832", + Resolution.RESOLUTION1088896 => "RESOLUTION_1088_896", + Resolution.RESOLUTION1088960 => "RESOLUTION_1088_960", + Resolution.RESOLUTION1120896 => "RESOLUTION_1120_896", + Resolution.RESOLUTION1152704 => "RESOLUTION_1152_704", + Resolution.RESOLUTION1152768 => "RESOLUTION_1152_768", + Resolution.RESOLUTION1152832 => "RESOLUTION_1152_832", + Resolution.RESOLUTION1152864 => "RESOLUTION_1152_864", + Resolution.RESOLUTION1152896 => "RESOLUTION_1152_896", + Resolution.RESOLUTION1216704 => "RESOLUTION_1216_704", + Resolution.RESOLUTION1216768 => "RESOLUTION_1216_768", + Resolution.RESOLUTION1216832 => "RESOLUTION_1216_832", + Resolution.RESOLUTION1232768 => "RESOLUTION_1232_768", + Resolution.RESOLUTION1248832 => "RESOLUTION_1248_832", + Resolution.RESOLUTION1280704 => "RESOLUTION_1280_704", + Resolution.RESOLUTION1280720 => "RESOLUTION_1280_720", + Resolution.RESOLUTION1280768 => "RESOLUTION_1280_768", + Resolution.RESOLUTION1280800 => "RESOLUTION_1280_800", + Resolution.RESOLUTION1312736 => "RESOLUTION_1312_736", + Resolution.RESOLUTION1344640 => "RESOLUTION_1344_640", + Resolution.RESOLUTION1344704 => "RESOLUTION_1344_704", + Resolution.RESOLUTION1344768 => "RESOLUTION_1344_768", + Resolution.RESOLUTION1408576 => "RESOLUTION_1408_576", + Resolution.RESOLUTION1408640 => "RESOLUTION_1408_640", + Resolution.RESOLUTION1408704 => "RESOLUTION_1408_704", + Resolution.RESOLUTION1472576 => "RESOLUTION_1472_576", + Resolution.RESOLUTION1472640 => "RESOLUTION_1472_640", + Resolution.RESOLUTION1472704 => "RESOLUTION_1472_704", + Resolution.RESOLUTION1536512 => "RESOLUTION_1536_512", + Resolution.RESOLUTION1536576 => "RESOLUTION_1536_576", + Resolution.RESOLUTION1536640 => "RESOLUTION_1536_640", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Resolution? ToEnum(string value) + { + return value switch + { + "RESOLUTION_512_1536" => Resolution.RESOLUTION5121536, + "RESOLUTION_576_1408" => Resolution.RESOLUTION5761408, + "RESOLUTION_576_1472" => Resolution.RESOLUTION5761472, + "RESOLUTION_576_1536" => Resolution.RESOLUTION5761536, + "RESOLUTION_640_1024" => Resolution.RESOLUTION6401024, + "RESOLUTION_640_1344" => Resolution.RESOLUTION6401344, + "RESOLUTION_640_1408" => Resolution.RESOLUTION6401408, + "RESOLUTION_640_1472" => Resolution.RESOLUTION6401472, + "RESOLUTION_640_1536" => Resolution.RESOLUTION6401536, + "RESOLUTION_704_1152" => Resolution.RESOLUTION7041152, + "RESOLUTION_704_1216" => Resolution.RESOLUTION7041216, + "RESOLUTION_704_1280" => Resolution.RESOLUTION7041280, + "RESOLUTION_704_1344" => Resolution.RESOLUTION7041344, + "RESOLUTION_704_1408" => Resolution.RESOLUTION7041408, + "RESOLUTION_704_1472" => Resolution.RESOLUTION7041472, + "RESOLUTION_720_1280" => Resolution.RESOLUTION7201280, + "RESOLUTION_736_1312" => Resolution.RESOLUTION7361312, + "RESOLUTION_768_1024" => Resolution.RESOLUTION7681024, + "RESOLUTION_768_1088" => Resolution.RESOLUTION7681088, + "RESOLUTION_768_1152" => Resolution.RESOLUTION7681152, + "RESOLUTION_768_1216" => Resolution.RESOLUTION7681216, + "RESOLUTION_768_1232" => Resolution.RESOLUTION7681232, + "RESOLUTION_768_1280" => Resolution.RESOLUTION7681280, + "RESOLUTION_768_1344" => Resolution.RESOLUTION7681344, + "RESOLUTION_832_960" => Resolution.RESOLUTION832960, + "RESOLUTION_832_1024" => Resolution.RESOLUTION8321024, + "RESOLUTION_832_1088" => Resolution.RESOLUTION8321088, + "RESOLUTION_832_1152" => Resolution.RESOLUTION8321152, + "RESOLUTION_832_1216" => Resolution.RESOLUTION8321216, + "RESOLUTION_832_1248" => Resolution.RESOLUTION8321248, + "RESOLUTION_864_1152" => Resolution.RESOLUTION8641152, + "RESOLUTION_896_960" => Resolution.RESOLUTION896960, + "RESOLUTION_896_1024" => Resolution.RESOLUTION8961024, + "RESOLUTION_896_1088" => Resolution.RESOLUTION8961088, + "RESOLUTION_896_1120" => Resolution.RESOLUTION8961120, + "RESOLUTION_896_1152" => Resolution.RESOLUTION8961152, + "RESOLUTION_960_832" => Resolution.RESOLUTION960832, + "RESOLUTION_960_896" => Resolution.RESOLUTION960896, + "RESOLUTION_960_1024" => Resolution.RESOLUTION9601024, + "RESOLUTION_960_1088" => Resolution.RESOLUTION9601088, + "RESOLUTION_1024_640" => Resolution.RESOLUTION1024640, + "RESOLUTION_1024_768" => Resolution.RESOLUTION1024768, + "RESOLUTION_1024_832" => Resolution.RESOLUTION1024832, + "RESOLUTION_1024_896" => Resolution.RESOLUTION1024896, + "RESOLUTION_1024_960" => Resolution.RESOLUTION1024960, + "RESOLUTION_1024_1024" => Resolution.RESOLUTION10241024, + "RESOLUTION_1088_768" => Resolution.RESOLUTION1088768, + "RESOLUTION_1088_832" => Resolution.RESOLUTION1088832, + "RESOLUTION_1088_896" => Resolution.RESOLUTION1088896, + "RESOLUTION_1088_960" => Resolution.RESOLUTION1088960, + "RESOLUTION_1120_896" => Resolution.RESOLUTION1120896, + "RESOLUTION_1152_704" => Resolution.RESOLUTION1152704, + "RESOLUTION_1152_768" => Resolution.RESOLUTION1152768, + "RESOLUTION_1152_832" => Resolution.RESOLUTION1152832, + "RESOLUTION_1152_864" => Resolution.RESOLUTION1152864, + "RESOLUTION_1152_896" => Resolution.RESOLUTION1152896, + "RESOLUTION_1216_704" => Resolution.RESOLUTION1216704, + "RESOLUTION_1216_768" => Resolution.RESOLUTION1216768, + "RESOLUTION_1216_832" => Resolution.RESOLUTION1216832, + "RESOLUTION_1232_768" => Resolution.RESOLUTION1232768, + "RESOLUTION_1248_832" => Resolution.RESOLUTION1248832, + "RESOLUTION_1280_704" => Resolution.RESOLUTION1280704, + "RESOLUTION_1280_720" => Resolution.RESOLUTION1280720, + "RESOLUTION_1280_768" => Resolution.RESOLUTION1280768, + "RESOLUTION_1280_800" => Resolution.RESOLUTION1280800, + "RESOLUTION_1312_736" => Resolution.RESOLUTION1312736, + "RESOLUTION_1344_640" => Resolution.RESOLUTION1344640, + "RESOLUTION_1344_704" => Resolution.RESOLUTION1344704, + "RESOLUTION_1344_768" => Resolution.RESOLUTION1344768, + "RESOLUTION_1408_576" => Resolution.RESOLUTION1408576, + "RESOLUTION_1408_640" => Resolution.RESOLUTION1408640, + "RESOLUTION_1408_704" => Resolution.RESOLUTION1408704, + "RESOLUTION_1472_576" => Resolution.RESOLUTION1472576, + "RESOLUTION_1472_640" => Resolution.RESOLUTION1472640, + "RESOLUTION_1472_704" => Resolution.RESOLUTION1472704, + "RESOLUTION_1536_512" => Resolution.RESOLUTION1536512, + "RESOLUTION_1536_576" => Resolution.RESOLUTION1536576, + "RESOLUTION_1536_640" => Resolution.RESOLUTION1536640, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.StyleType.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.StyleType.g.verified.cs new file mode 100644 index 0000000000..cb1f283db4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.StyleType.g.verified.cs @@ -0,0 +1,77 @@ +//HintName: G.Models.StyleType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.
+ /// Example: REALISTIC + ///
+ public enum StyleType + { + /// + /// + /// + AUTO, + /// + /// + /// + GENERAL, + /// + /// + /// + REALISTIC, + /// + /// + /// + DESIGN, + /// + /// + /// + RENDER3D, + /// + /// + /// + ANIME, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StyleTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StyleType value) + { + return value switch + { + StyleType.AUTO => "AUTO", + StyleType.GENERAL => "GENERAL", + StyleType.REALISTIC => "REALISTIC", + StyleType.DESIGN => "DESIGN", + StyleType.RENDER3D => "RENDER_3D", + StyleType.ANIME => "ANIME", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StyleType? ToEnum(string value) + { + return value switch + { + "AUTO" => StyleType.AUTO, + "GENERAL" => StyleType.GENERAL, + "REALISTIC" => StyleType.REALISTIC, + "DESIGN" => StyleType.DESIGN, + "RENDER_3D" => StyleType.RENDER3D, + "ANIME" => StyleType.ANIME, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleImageRequest.g.verified.cs new file mode 100644 index 0000000000..4ac414e681 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleImageRequest.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.UpscaleImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpscaleImageRequest + { + /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_request")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.UpscaleInitialImageRequest ImageRequest { get; set; } + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] ImageFile { get; set; } + + /// + /// An image binary; only JPEG, WEBPs and PNGs are supported at this time + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ImageFilename { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs new file mode 100644 index 0000000000..be0a3d054b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Models.UpscaleInitialImageRequest.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.UpscaleInitialImageRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// A request to upscale a provided image with the help of an optional prompt. + /// + public sealed partial class UpscaleInitialImageRequest + { + /// + /// An optional prompt to guide the upscale
+ /// Example: A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there is an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// Default Value: 50
+ /// Example: 50 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("resemblance")] + public int? Resemblance { get; set; } = 50; + + /// + /// Default Value: 50
+ /// Example: 50 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + public int? Detail { get; set; } = 50; + + /// + /// Determine if MagicPrompt should be used in generating the request or not
+ /// Default Value: AUTO
+ /// Example: ON + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("magic_prompt_option")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::G.JsonConverters.MagicPromptOptionJsonConverter))] + public global::G.MagicPromptOption? MagicPromptOption { get; set; } = global::G.MagicPromptOption.AUTO; + + /// + /// Example: 12345 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { 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(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.PathBuilder.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.PathBuilder.g.verified.cs new file mode 100644 index 0000000000..7faa748137 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.PathBuilder.g.verified.cs @@ -0,0 +1,228 @@ +//HintName: G.PathBuilder.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + /// + /// A helper class to build URL paths with optional and required parameters. + /// + public class PathBuilder + { + private readonly global::System.Text.StringBuilder _stringBuilder = + new global::System.Text.StringBuilder(capacity: 256); + private bool _firstParameter = true; + + /// + /// Initializes a new instance of the class. + /// + /// The base path for the URL. + /// The base URI to prepend to the path, if any. + public PathBuilder( + string path, + global::System.Uri? baseUri = null) + { + if (baseUri is not null) + { + _stringBuilder.Append(baseUri.AbsoluteUri.TrimEnd('/')); + } + + _stringBuilder.Append(path); + } + + /// + /// Adds a required parameter to the URL. + /// + /// The name of the parameter. + /// The value of the parameter. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + string value) + { + if (_firstParameter) + { + _stringBuilder.Append('?'); + _firstParameter = false; + } + else + { + _stringBuilder.Append('&'); + } + + _stringBuilder.Append(global::System.Uri.EscapeDataString(name)); + _stringBuilder.Append('='); + _stringBuilder.Append(global::System.Uri.EscapeDataString(value)); + + return this; + } + + /// + /// Adds a required parameter with multiple values to the URL. + /// + /// The name of the parameter. + /// The values of the parameter. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + global::System.Collections.Generic.IEnumerable value, + string delimiter = ",", + bool explode = false) + { + if (explode) + { + foreach (var item in value) + { + AddRequiredParameter($"{name}", item); + } + + return this; + } + + AddRequiredParameter(name, string.Join(delimiter, value)); + + return this; + } + + /// + /// Adds a required parameter with multiple values to the URL, using a selector function. + /// + /// The type of the values. + /// The name of the parameter. + /// The values of the parameter. + /// The function to select the string representation of each value. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + global::System.Collections.Generic.IEnumerable value, + global::System.Func selector, + string delimiter = ",", + bool explode = false) + { + AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + + return this; + } + + /// + /// Adds an optional parameter to the URL. + /// + /// The name of the parameter. + /// The value of the parameter, or null if not present. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + string? value) + { + if (value is not null) + { + AddRequiredParameter(name, value); + } + + return this; + } + + /// + /// Adds an optional parameter with multiple values to the URL. + /// + /// The name of the parameter. + /// The values of the parameter, or null if not present. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + global::System.Collections.Generic.IEnumerable? value, + string delimiter = ",", + bool explode = false) + { + if (value is not null) + { + AddRequiredParameter(name, value, delimiter, explode); + } + + return this; + } + + /// + /// Adds an optional parameter with multiple values to the URL, using a selector function. + /// + /// The type of the values. + /// The name of the parameter. + /// The values of the parameter, or null if not present. + /// The function to select the string representation of each value. + /// The delimiter to use between values. + /// Whether to explode the values into separate parameters. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + global::System.Collections.Generic.IEnumerable? value, + global::System.Func selector, + string delimiter = ",", + bool explode = false) + { + if (value is not null) + { + AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + } + + return this; + } + + /// + /// Adds a required parameter to the URL, using a formattable value. + /// + /// The type of the value. + /// The name of the parameter. + /// The value of the parameter. + /// The format string. + /// The format provider. + /// The current instance. + public PathBuilder AddRequiredParameter( + string name, + T value, + string? format = null, + global::System.IFormatProvider? formatProvider = null) + where T : global::System.IFormattable + { + AddRequiredParameter(name, value.ToString(format, formatProvider)); + + return this; + } + + /// + /// Adds an optional parameter to the URL, using a formattable value. + /// + /// The type of the value. + /// The name of the parameter. + /// The value of the parameter, or null if not present. + /// The format string. + /// The format provider. + /// The current instance. + public PathBuilder AddOptionalParameter( + string name, + T? value, + string? format = null, + global::System.IFormatProvider? formatProvider = null) + where T : global::System.IFormattable + { + if (value is not null) + { + AddOptionalParameter(name, value.ToString(format, formatProvider)); + } + + return this; + } + + /// + /// Returns the constructed URL as a string. + /// + /// The constructed URL. + public override string ToString() => _stringBuilder.ToString(); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..9ef159498a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class AutoSDKPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.PostDescribe.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.PostDescribe.g.verified.cs new file mode 100644 index 0000000000..e9c2684eea --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.PostDescribe.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.VisionClient.PostDescribe.g.cs + +#nullable enable + +namespace G +{ + public partial class VisionClient + { + partial void PreparePostDescribeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.DescribeRequest request); + partial void PreparePostDescribeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.DescribeRequest request); + partial void ProcessPostDescribeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostDescribeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Describe an image + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostDescribeAsync( + global::G.DescribeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostDescribeArguments( + httpClient: _httpClient, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/describe", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "image_file", + fileName: request.ImageFilename ?? string.Empty); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostDescribeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPostDescribeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostDescribeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, JsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Describe an image + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostDescribeAsync( + byte[] imageFile, + string imageFilename, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.DescribeRequest + { + ImageFile = imageFile, + ImageFilename = imageFilename, + }; + + return await PostDescribeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.g.verified.cs new file mode 100644 index 0000000000..b73650412f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#G.VisionClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.VisionClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Operations related to understanding visual content
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class VisionClient : global::G.IVisionClient, global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = ""; + + private readonly global::System.Net.Http.HttpClient _httpClient; + + /// + /// + /// + public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions(); + + + /// + /// Creates a new instance of the VisionClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public VisionClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + + Initialized(_httpClient); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatio.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatio.g.verified.cs new file mode 100644 index 0000000000..c4809933de --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatio.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.AspectRatio.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class AspectRatioJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AspectRatio 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::G.AspectRatioExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AspectRatio)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AspectRatio value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.AspectRatioExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatioNullable.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatioNullable.g.verified.cs new file mode 100644 index 0000000000..d6eed94123 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.AspectRatioNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.AspectRatioNullable.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class AspectRatioNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AspectRatio? 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::G.AspectRatioExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AspectRatio)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AspectRatio? 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::G.AspectRatioExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetName.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetName.g.verified.cs new file mode 100644 index 0000000000..1ee0d01819 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetName.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ColorPalettePresetName.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class ColorPalettePresetNameJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ColorPalettePresetName 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::G.ColorPalettePresetNameExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ColorPalettePresetName)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ColorPalettePresetName value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ColorPalettePresetNameExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetNameNullable.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetNameNullable.g.verified.cs new file mode 100644 index 0000000000..1e6c6eae59 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPalettePresetNameNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ColorPalettePresetNameNullable.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class ColorPalettePresetNameNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ColorPalettePresetName? 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::G.ColorPalettePresetNameExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ColorPalettePresetName)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ColorPalettePresetName? 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::G.ColorPalettePresetNameExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPaletteWithPresetNameOrMembers.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPaletteWithPresetNameOrMembers.g.verified.cs new file mode 100644 index 0000000000..a00d17b0b1 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ColorPaletteWithPresetNameOrMembers.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: JsonConverters.ColorPaletteWithPresetNameOrMembers.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace G.JsonConverters +{ + /// + public class ColorPaletteWithPresetNameOrMembersJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ColorPaletteWithPresetNameOrMembers 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."); + + var + readerCopy = reader; + global::G.ColorPaletteWithPresetName? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ColorPaletteWithPresetName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ColorPaletteWithPresetName).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ColorPaletteWithMembers? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ColorPaletteWithMembers), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ColorPaletteWithMembers).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ColorPaletteWithPresetNameOrMembers( + value1, + value2 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ColorPaletteWithPresetName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ColorPaletteWithPresetName).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ColorPaletteWithMembers), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ColorPaletteWithMembers).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ColorPaletteWithPresetNameOrMembers 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(global::G.ColorPaletteWithPresetName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ColorPaletteWithPresetName).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ColorPaletteWithMembers), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ColorPaletteWithMembers).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOption.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOption.g.verified.cs new file mode 100644 index 0000000000..fc6d0cfb44 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOption.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.MagicPromptOption.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class MagicPromptOptionJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.MagicPromptOption 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::G.MagicPromptOptionExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.MagicPromptOption)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.MagicPromptOption value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.MagicPromptOptionExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOptionNullable.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOptionNullable.g.verified.cs new file mode 100644 index 0000000000..abdd890102 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.MagicPromptOptionNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.MagicPromptOptionNullable.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class MagicPromptOptionNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.MagicPromptOption? 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::G.MagicPromptOptionExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.MagicPromptOption)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.MagicPromptOption? 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::G.MagicPromptOptionExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnum.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnum.g.verified.cs new file mode 100644 index 0000000000..3296e5aaca --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnum.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ModelEnum.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class ModelEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ModelEnum 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::G.ModelEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ModelEnum)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ModelEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ModelEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnumNullable.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnumNullable.g.verified.cs new file mode 100644 index 0000000000..391c3e5145 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ModelEnumNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ModelEnumNullable.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class ModelEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ModelEnum? 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::G.ModelEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ModelEnum)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ModelEnum? 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::G.ModelEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.Resolution.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.Resolution.g.verified.cs new file mode 100644 index 0000000000..e9ae241d59 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.Resolution.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.Resolution.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class ResolutionJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Resolution 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::G.ResolutionExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Resolution)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Resolution value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ResolutionExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ResolutionNullable.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ResolutionNullable.g.verified.cs new file mode 100644 index 0000000000..20aeef17e2 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.ResolutionNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ResolutionNullable.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class ResolutionNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Resolution? 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::G.ResolutionExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Resolution)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Resolution? 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::G.ResolutionExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs new file mode 100644 index 0000000000..e4e16ca5e4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.StyleType.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class StyleTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.StyleType 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::G.StyleTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.StyleType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.StyleType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.StyleTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs new file mode 100644 index 0000000000..475ebad369 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.StyleTypeNullable.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public sealed class StyleTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.StyleType? 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::G.StyleTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.StyleType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.StyleType? 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::G.StyleTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs new file mode 100644 index 0000000000..923f67aecf --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: JsonConverters.UnixTimestamp.g.cs +#nullable enable + +namespace G.JsonConverters +{ + /// + public class UnixTimestampJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::System.DateTimeOffset Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (reader.TokenType == global::System.Text.Json.JsonTokenType.Number) + { + if (reader.TryGetInt64(out long unixTimestamp)) + { + return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestamp); + } + if (reader.TryGetInt32(out int unixTimestampInt)) + { + return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestampInt); + } + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::System.DateTimeOffset value, + global::System.Text.Json.JsonSerializerOptions options) + { + long unixTimestamp = value.ToUnixTimeSeconds(); + writer.WriteNumberValue(unixTimestamp); + } + } +} diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextConverters.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextConverters.g.verified.cs new file mode 100644 index 0000000000..2d659df35d --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextConverters.g.verified.cs @@ -0,0 +1,29 @@ +//HintName: JsonSerializerContextConverters.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + internal sealed partial class JsonSerializerContextConverters + { + private readonly global::System.Type[] _types = new global::System.Type[] + { + typeof(global::G.JsonConverters.AspectRatioJsonConverter), + typeof(global::G.JsonConverters.AspectRatioNullableJsonConverter), + typeof(global::G.JsonConverters.ModelEnumJsonConverter), + typeof(global::G.JsonConverters.ModelEnumNullableJsonConverter), + typeof(global::G.JsonConverters.MagicPromptOptionJsonConverter), + typeof(global::G.JsonConverters.MagicPromptOptionNullableJsonConverter), + typeof(global::G.JsonConverters.StyleTypeJsonConverter), + typeof(global::G.JsonConverters.StyleTypeNullableJsonConverter), + typeof(global::G.JsonConverters.ResolutionJsonConverter), + typeof(global::G.JsonConverters.ResolutionNullableJsonConverter), + typeof(global::G.JsonConverters.ColorPalettePresetNameJsonConverter), + typeof(global::G.JsonConverters.ColorPalettePresetNameNullableJsonConverter), + typeof(global::G.JsonConverters.ColorPaletteWithPresetNameOrMembersJsonConverter), + }; + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextTypes.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextTypes.g.verified.cs new file mode 100644 index 0000000000..09be376886 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/ideogram/SystemTextJson/_#JsonSerializerContextTypes.g.verified.cs @@ -0,0 +1,215 @@ +//HintName: JsonSerializerContextTypes.g.cs + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete + +namespace G +{ + /// + /// + /// + public sealed partial class JsonSerializerContextTypes + { + /// + /// + /// + public global::G.DescribeResponse? Type0 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1 { get; set; } + /// + /// + /// + public global::G.Description? Type2 { get; set; } + /// + /// + /// + public string? Type3 { get; set; } + /// + /// + /// + public global::G.DescribeRequest? Type4 { get; set; } + /// + /// + /// + public byte[]? Type5 { get; set; } + /// + /// + /// + public global::G.GenerateImageRequest? Type6 { get; set; } + /// + /// + /// + public global::G.ImageRequest? Type7 { get; set; } + /// + /// + /// + public global::G.AspectRatio? Type8 { get; set; } + /// + /// + /// + public global::G.ModelEnum? Type9 { get; set; } + /// + /// + /// + public global::G.MagicPromptOption? Type10 { get; set; } + /// + /// + /// + public int? Type11 { get; set; } + /// + /// + /// + public global::G.StyleType? Type12 { get; set; } + /// + /// + /// + public global::G.Resolution? Type13 { get; set; } + /// + /// + /// + public global::G.ColorPaletteWithPresetNameOrMembers? Type14 { get; set; } + /// + /// + /// + public global::G.ColorPaletteWithPresetName? Type15 { get; set; } + /// + /// + /// + public global::G.ColorPalettePresetName? Type16 { get; set; } + /// + /// + /// + public global::G.ColorPaletteWithMembers? Type17 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type18 { get; set; } + /// + /// + /// + public global::G.ColorPaletteMember? Type19 { get; set; } + /// + /// + /// + public double? Type20 { get; set; } + /// + /// + /// + public global::G.RemixImageRequest? Type21 { get; set; } + /// + /// + /// + public global::G.UpscaleImageRequest? Type22 { get; set; } + /// + /// + /// + public global::G.UpscaleInitialImageRequest? Type23 { get; set; } + /// + /// + /// + public global::G.InitialImageRequest? Type24 { get; set; } + /// + /// + /// + public global::G.GenerateImageResponse? Type25 { get; set; } + /// + /// + /// + public global::System.DateTime? Type26 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type27 { get; set; } + /// + /// + /// + public global::G.ImageObject? Type28 { get; set; } + /// + /// + /// + public bool? Type29 { get; set; } + /// + /// + /// + public global::G.GenerateImageSafetyError? Type30 { get; set; } + /// + /// + /// + public global::G.ImageSafetyError? Type31 { get; set; } + /// + /// + /// + public global::G.ManageApiSubscriptionResponse? Type32 { get; set; } + /// + /// + /// + public global::G.MetronomeLinks? Type33 { get; set; } + /// + /// + /// + public global::G.RechargeSettings? Type34 { get; set; } + /// + /// + /// + public global::G.Price? Type35 { get; set; } + /// + /// + /// + public global::G.RechargeSettingsResponse? Type36 { get; set; } + /// + /// + /// + public global::G.PostApiSubscriptionResponse? Type37 { get; set; } + /// + /// + /// + public global::G.PostApiSubscriptionError? Type38 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type39 { get; set; } + /// + /// + /// + public global::G.PostApiSubscriptionRequest? Type40 { get; set; } + /// + /// + /// + public global::G.PostApiReactivateResponse? Type41 { get; set; } + /// + /// + /// + public global::G.GetApiKeysResponse? Type42 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type43 { get; set; } + /// + /// + /// + public global::G.RedactedApiKey? Type44 { get; set; } + /// + /// + /// + public global::G.PostApiKeyResponse? Type45 { get; set; } + /// + /// + /// + public global::G.ManageApiStripeSubscriptionResponse? Type46 { get; set; } + /// + /// + /// + public global::G.GetApiTermsResponse? Type47 { get; set; } + /// + /// + /// + public global::G.ApiTerms? Type48 { get; set; } + /// + /// + /// + public global::G.PostApiTermsRequest? Type49 { get; set; } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Tests.cs b/src/tests/AutoSDK.SnapshotTests/Tests.cs index 6534a10406..a557e210a1 100644 --- a/src/tests/AutoSDK.SnapshotTests/Tests.cs +++ b/src/tests/AutoSDK.SnapshotTests/Tests.cs @@ -51,6 +51,8 @@ public partial class Tests [DataRow("", "heygen.yaml", JsonSerializerType.SystemTextJson)] [DataRow("", "instill.yaml", JsonSerializerType.NewtonsoftJson)] [DataRow("", "instill.yaml", JsonSerializerType.SystemTextJson)] + [DataRow("", "ideogram.yaml", JsonSerializerType.NewtonsoftJson)] + [DataRow("", "ideogram.yaml", JsonSerializerType.SystemTextJson)] public Task SdkGenerator(string callerName, string fileName, JsonSerializerType jsonSerializerType) { if (callerName == "Empty") diff --git a/src/tests/AutoSDK.UnitTests/DataTests.cs b/src/tests/AutoSDK.UnitTests/DataTests.cs index 74499a83d6..d99f8644ce 100644 --- a/src/tests/AutoSDK.UnitTests/DataTests.cs +++ b/src/tests/AutoSDK.UnitTests/DataTests.cs @@ -26,6 +26,7 @@ public partial class DataTests [DataRow("twitch.json")] [DataRow("heygen.yaml")] [DataRow("instill.yaml")] + [DataRow("ideogram.yaml")] public Task PrepareData(string resourceName) { return VerifyAsync(Data.Prepare(( diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt index 90c450ea99..b48b34c6ac 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt @@ -106,12 +106,9 @@ StopSequencesItem(string)[completion], TopKReturn(int)[completion], CompletionBodyLogitBias(class)[completion], - FrequencyPenalty(allOf)[completion], - Penalty(ref)[completion], - PresencePenalty(allOf)[completion], - Penalty(ref)[completion], - CountPenalty(allOf)[completion], - Penalty(ref)[completion], + Penalty(ref)[completion], + Penalty(ref)[completion], + Penalty(ref)[completion], Epoch(int)[completion], Penalty(class)[completion, chat], Scale(double)[completion, chat], @@ -186,8 +183,7 @@ EmbeddingsBody(class)[], Texts(array)[], TextsItem(string)[], - Type(allOf)[], - EmbedType(ref)[], + EmbedType(ref)[], FileDeleteResponse(class)[Library management], Id(string)[Library management], FileId(string)[Library management], @@ -245,11 +241,10 @@ FileIdsItem(string)[RAG Engine], AnswerLength(ref)[RAG Engine], Mode(ref)[RAG Engine], - RetrievalStrategy(allOf)[RAG Engine], - RetrievalStrategy3(ref)[RAG Engine], + RetrievalStrategy(ref)[RAG Engine], RetrievalSimilarityThreshold(double)[RAG Engine], HybridSearchAlpha(double)[RAG Engine], - RetrievalStrategy3(enum)[RAG Engine], + RetrievalStrategy(enum)[RAG Engine], LibraryAnswerResponse(class)[RAG Engine], Id(string)[RAG Engine], AnswerInContext(bool)[RAG Engine], @@ -272,8 +267,7 @@ LabelsItem(string)[RAG Engine], FileIds(array)[RAG Engine], FileIdsItem(string)[RAG Engine], - RetrievalStrategy2(allOf)[RAG Engine], - RetrievalStrategy3(ref)[RAG Engine], + RetrievalStrategy(ref)[RAG Engine], MaxNeighbors(int)[RAG Engine], RetrievalSimilarityThreshold(double)[RAG Engine], HybridSearchAlpha(double)[RAG Engine], @@ -296,8 +290,7 @@ ModelName(enum)[Jamba Complete], ParaphraseBody(class)[paraphrase], Text(string)[paraphrase], - Style(allOf)[paraphrase], - StyleType(ref)[paraphrase], + StyleType(ref)[paraphrase], StartIndex(int)[paraphrase], EndIndex(int)[paraphrase], StyleType(enum)[paraphrase], @@ -375,18 +368,14 @@ MockResponseConfig(ref)[Jamba Complete], Documents(array)[Jamba Complete], DocumentSchema(ref)[Jamba Complete], - ResponseFormat2(allOf)[Jamba Complete], - ResponseFormat(ref)[Jamba Complete], + ResponseFormat(ref)[Jamba Complete], LanguageStudioApiServerDataTypesJ2ChatChatRequest(class)[chat], Messages(array)[chat], ChatMessage(ref)[chat], System(string)[chat], - FrequencyPenalty2(allOf)[chat], - Penalty(ref)[chat], - PresencePenalty2(allOf)[chat], - Penalty(ref)[chat], - CountPenalty2(allOf)[chat], - Penalty(ref)[chat], + Penalty(ref)[chat], + Penalty(ref)[chat], + Penalty(ref)[chat], NumResults(int)[chat], Temperature(double)[chat], MaxTokens(int)[chat], diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt index 30c56aacd1..39e91b6176 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt @@ -78,12 +78,9 @@ StopSequencesItem(string), TopKReturn(int), CompletionBodyLogitBias(class), - FrequencyPenalty(allOf), - Penalty(ref), - PresencePenalty(allOf), - Penalty(ref), - CountPenalty(allOf), - Penalty(ref), + Penalty(ref), + Penalty(ref), + Penalty(ref), Epoch(int), ConversationalRagFlowPublicFields(class), Messages(array), @@ -148,8 +145,7 @@ EmbeddingsBody(class), Texts(array), TextsItem(string), - Type(allOf), - EmbedType(ref), + EmbedType(ref), FileDeleteResponse(class), Id(string), FileId(string), @@ -199,8 +195,7 @@ FileIdsItem(string), AnswerLength(ref), Mode(ref), - RetrievalStrategy(allOf), - RetrievalStrategy3(ref), + RetrievalStrategy(ref), RetrievalSimilarityThreshold(double), HybridSearchAlpha(double), LibraryAnswerResponse(class), @@ -217,8 +212,7 @@ LabelsItem(string), FileIds(array), FileIdsItem(string), - RetrievalStrategy2(allOf), - RetrievalStrategy3(ref), + RetrievalStrategy(ref), MaxNeighbors(int), RetrievalSimilarityThreshold(double), HybridSearchAlpha(double), @@ -253,8 +247,7 @@ ModelName(enum), ParaphraseBody(class), Text(string), - Style(allOf), - StyleType(ref), + StyleType(ref), StartIndex(int), EndIndex(int), Penalty(class), @@ -266,7 +259,7 @@ ApplyToEmojis(bool), ResponseFormat(class), ResponseFormatType(enum), - RetrievalStrategy3(enum), + RetrievalStrategy(enum), RoleType(enum), Segment(class), SegmentText(string), @@ -375,18 +368,14 @@ MockResponseConfig(ref), Documents(array), DocumentSchema(ref), - ResponseFormat2(allOf), - ResponseFormat(ref), + ResponseFormat(ref), LanguageStudioApiServerDataTypesJ2ChatChatRequest(class), Messages(array), ChatMessage(ref), System(string), - FrequencyPenalty2(allOf), - Penalty(ref), - PresencePenalty2(allOf), - Penalty(ref), - CountPenalty2(allOf), - Penalty(ref), + Penalty(ref), + Penalty(ref), + Penalty(ref), NumResults(int), Temperature(double), MaxTokens(int), diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt index 074f6e635e..0e0bd2ce42 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt @@ -2396,10 +2396,8 @@ Summary(string)[security-advisories], Description(string)[security-advisories], RepositoryAdvisorySeverity(enum)[security-advisories], - Author(allOf)[security-advisories], - SimpleUser(ref)[security-advisories], - Publisher(allOf)[security-advisories], - SimpleUser(ref)[security-advisories], + SimpleRepository(ref)[security-advisories], + SimpleUser(ref)[security-advisories], Identifiers(array)[security-advisories], RepositoryAdvisoryIdentifier(class)[security-advisories], RepositoryAdvisoryIdentifierType(enum)[security-advisories], @@ -2433,8 +2431,7 @@ SimpleUser(ref)[security-advisories], CollaboratingTeams(array)[security-advisories], Team(ref)[security-advisories], - PrivateFork(allOf)[security-advisories], - SimpleRepository(ref)[security-advisories], + SimpleUser(ref)[security-advisories], TeamSimple(class)[orgs, pulls], Id(int)[orgs, pulls], NodeId(string)[orgs, pulls], @@ -31967,7 +31964,7 @@ Name(string)[], Version(string)[], NpmUser(string)[], - Author2(oneOf)[], + Author(oneOf)[], AuthorVariant1(string)[], WebhookRegistryPackagePublishedRegistryPackagePackageVersionNpmMetadataAuthor(class)[], Bugs(oneOf)[], @@ -32908,7 +32905,7 @@ Url(Uri)[], CommentsUrl(Uri)[], WebhookStatusCommitCommit(class)[], - Author3(allOf)[], + Author2(allOf)[], WebhookStatusCommitCommitAuthorVariant1(class)[], Date(DateTime)[], Email(string)[], diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt index ed4838a9be..dab7701417 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt @@ -2396,10 +2396,8 @@ Summary(string), Description(string), RepositoryAdvisorySeverity(enum), - Author(allOf), - SimpleUser(ref), - Publisher(allOf), - SimpleUser(ref), + SimpleRepository(ref), + SimpleUser(ref), Identifiers(array), RepositoryAdvisoryIdentifier(class), RepositoryAdvisoryIdentifierType(enum), @@ -2433,8 +2431,7 @@ SimpleUser(ref), CollaboratingTeams(array), Team(ref), - PrivateFork(allOf), - SimpleRepository(ref), + SimpleUser(ref), TeamSimple(class), Id(int), NodeId(string), @@ -31967,7 +31964,7 @@ Name(string), Version(string), NpmUser(string), - Author2(oneOf), + Author(oneOf), AuthorVariant1(string), WebhookRegistryPackagePublishedRegistryPackagePackageVersionNpmMetadataAuthor(class), Bugs(oneOf), @@ -32908,7 +32905,7 @@ Url(Uri), CommentsUrl(Uri), WebhookStatusCommitCommit(class), - Author3(allOf), + Author2(allOf), WebhookStatusCommitCommitAuthorVariant1(class), Date(DateTime), Email(string), diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt index b2d779fb3c..ab772aa0ed 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt @@ -229,8 +229,7 @@ Limit(int)[run, public], Select(array)[run, public], RunSelect(ref)[run, public], - Order(allOf)[run, public], - RunDateOrder(ref)[run, public], + RunDateOrder(ref)[run, public], RunTypeEnum(enum)[run, public, annotation-queues, datasets], RunsFilterDataSourceTypeEnum(enum)[run, public], RunSelect(enum)[run, public], @@ -257,14 +256,13 @@ Name2(anyOf)[datasets], NameVariant1(string)[datasets], NameVariant2(null)[datasets], - DataType(allOf)[datasets], - DataType2(ref)[datasets], + DataType(ref)[datasets], OutputKeys(array)[datasets], OutputKeysItem(string)[datasets], Description5(anyOf)[datasets], DescriptionVariant1(string)[datasets], DescriptionVariant2(null)[datasets], - DataType2(enum)[datasets, public], + DataType(enum)[datasets, public], BodyUploadExamplesApiV1ExamplesUploadDatasetIdPost(class)[examples], File(byte[])[examples], InputKeys(array)[examples], @@ -561,8 +559,7 @@ EndTime3(anyOf)[charts], EndTimeVariant1(DateTime)[charts], EndTimeVariant2(null)[charts], - Stride2(allOf)[charts], - TimedeltaInput(ref)[charts], + TimedeltaInput(ref)[charts], TimedeltaInput(class)[run, feedback, charts], Days(int)[run, feedback, charts], Minutes(int)[run, feedback, charts], @@ -640,8 +637,7 @@ EndTime2(anyOf)[charts], EndTimeVariant1(DateTime)[charts], EndTimeVariant2(null)[charts], - Stride(allOf)[charts], - TimedeltaInput(ref)[charts], + TimedeltaInput(ref)[charts], AfterIndex(anyOf)[charts], AfterIndexVariant1(int)[charts], AfterIndexVariant2(null)[charts], @@ -725,8 +721,8 @@ DescriptionVariant1(string)[datasets], DescriptionVariant2(null)[datasets], CreatedAt(DateTime)[datasets], - DataType3(anyOf)[datasets], - DataType2(ref)[datasets], + DataType2(anyOf)[datasets], + DataType(ref)[datasets], DataTypeVariant2(null)[datasets], InputsSchemaDefinition(anyOf)[datasets], DatasetInputsSchemaDefinition(class)[datasets], @@ -751,8 +747,8 @@ DescriptionVariant1(string)[datasets], DescriptionVariant2(null)[datasets], CreatedAt(DateTime)[datasets], - DataType4(anyOf)[datasets], - DataType2(ref)[datasets], + DataType3(anyOf)[datasets], + DataType(ref)[datasets], DataTypeVariant2(null)[datasets], InputsSchemaDefinition2(anyOf)[datasets], DatasetCreateInputsSchemaDefinition(class)[datasets], @@ -794,8 +790,8 @@ DescriptionVariant1(string)[public], DescriptionVariant2(null)[public], CreatedAt(DateTime)[public], - DataType5(anyOf)[public], - DataType2(ref)[public], + DataType4(anyOf)[public], + DataType(ref)[public], DataTypeVariant2(null)[public], InputsSchemaDefinition3(anyOf)[public], DatasetPublicSchemaInputsSchemaDefinition(class)[public], @@ -814,8 +810,8 @@ DescriptionVariant1(string)[datasets], DescriptionVariant2(null)[datasets], CreatedAt(DateTime)[datasets], - DataType6(anyOf)[datasets], - DataType2(ref)[datasets], + DataType5(anyOf)[datasets], + DataType(ref)[datasets], DataTypeVariant2(null)[datasets], InputsSchemaDefinition4(anyOf)[datasets], DatasetSchemaForUpdateInputsSchemaDefinition(class)[datasets], @@ -1711,8 +1707,7 @@ RoleName(anyOf)[orgs, workspaces], RoleNameVariant1(string)[orgs, workspaces], RoleNameVariant2(null)[orgs, workspaces], - AccessScope2(allOf)[orgs, workspaces], - AccessScope(ref)[orgs, workspaces], + AccessScope(ref)[orgs, workspaces], IdentityAnnotationQueueRunStatusCreateSchema(class)[annotation-queues], Status(anyOf)[annotation-queues], StatusVariant1(string)[annotation-queues], @@ -1998,8 +1993,7 @@ RoleName2(anyOf)[tenant, workspaces], RoleNameVariant1(string)[tenant, workspaces], RoleNameVariant2(null)[tenant, workspaces], - AccessScope3(allOf)[tenant, workspaces], - AccessScope(ref)[tenant, workspaces], + AccessScope(ref)[tenant, workspaces], Email(anyOf)[tenant, workspaces], EmailVariant1(string)[tenant, workspaces], EmailVariant2(null)[tenant, workspaces], @@ -2076,10 +2070,8 @@ Timezone(string)[run], Groups(array)[run], MonitorGroupSpec(ref)[run], - Interval(allOf)[run], - TimedeltaInput(ref)[run], - Stride3(allOf)[run], - TimedeltaInput(ref)[run], + TimedeltaInput(ref)[run], + TimedeltaInput(ref)[run], MonitorResponse(class)[run], Blocks(array)[run], MonitorBlock(ref)[run], @@ -2112,8 +2104,7 @@ RoleName3(anyOf)[orgs], RoleNameVariant1(string)[orgs], RoleNameVariant2(null)[orgs], - AccessScope4(allOf)[orgs], - AccessScope(ref)[orgs], + AccessScope(ref)[orgs], Email2(anyOf)[orgs], EmailVariant1(string)[orgs], EmailVariant2(null)[orgs], @@ -2144,8 +2135,7 @@ FullName6(anyOf)[orgs], FullNameVariant1(string)[orgs], FullNameVariant2(null)[orgs], - AccessScope5(allOf)[orgs], - AccessScope(ref)[orgs], + AccessScope(ref)[orgs], Id(string)[orgs], UserId3(anyOf)[orgs], UserIdVariant1(string)[orgs], @@ -2312,8 +2302,7 @@ FullName7(anyOf)[orgs, tenant, workspaces], FullNameVariant1(string)[orgs, tenant, workspaces], FullNameVariant2(null)[orgs, tenant, workspaces], - AccessScope6(allOf)[orgs, tenant, workspaces], - AccessScope(ref)[orgs, tenant, workspaces], + AccessScope(ref)[orgs, tenant, workspaces], Id(string)[orgs, tenant, workspaces], UserId4(anyOf)[orgs, tenant, workspaces], UserIdVariant1(string)[orgs, tenant, workspaces], @@ -2461,7 +2450,7 @@ OrganizationIdVariant2(null)[orgs, tenant], Permissions(array)[orgs, tenant], PermissionsItem(string)[orgs, tenant], - AccessScope7(anyOf)[orgs, tenant], + AccessScope2(anyOf)[orgs, tenant], AccessScope(ref)[orgs, tenant], AccessScopeVariant2(null)[orgs, tenant], RootModelDictStrListStr(class)[tracer-sessions], @@ -3787,8 +3776,8 @@ ReadDatasetsApiV1DatasetsGetIdVariant2(null)[datasets], ReadDatasetsApiV1DatasetsGetDataType(anyOf)[datasets], ReadDatasetsApiV1DatasetsGetDataTypeVariant1(array)[datasets], - DataType2(ref)[datasets], - DataType2(ref)[datasets], + DataType(ref)[datasets], + DataType(ref)[datasets], ReadDatasetsApiV1DatasetsGetDataTypeVariant3(null)[datasets], ReadDatasetsApiV1DatasetsGetName(anyOf)[datasets], ReadDatasetsApiV1DatasetsGetNameVariant1(string)[datasets], diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt index 404cf489a6..769a821eee 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt @@ -229,8 +229,7 @@ Limit(int), Select(array), RunSelect(ref), - Order(allOf), - RunDateOrder(ref), + RunDateOrder(ref), BodyCloneDatasetApiV1DatasetsClonePost(class), TargetDatasetId(string), SourceDatasetId(string), @@ -253,8 +252,7 @@ Name2(anyOf), NameVariant1(string), NameVariant2(null), - DataType(allOf), - DataType2(ref), + DataType(ref), OutputKeys(array), OutputKeysItem(string), Description5(anyOf), @@ -546,8 +544,7 @@ EndTime2(anyOf), EndTimeVariant1(DateTime), EndTimeVariant2(null), - Stride(allOf), - TimedeltaInput(ref), + TimedeltaInput(ref), AfterIndex(anyOf), AfterIndexVariant1(int), AfterIndexVariant2(null), @@ -561,8 +558,7 @@ EndTime3(anyOf), EndTimeVariant1(DateTime), EndTimeVariant2(null), - Stride2(allOf), - TimedeltaInput(ref), + TimedeltaInput(ref), CustomChartsResponse(class), Sections(array), CustomChartsSection(ref), @@ -614,15 +610,15 @@ EndsOn(anyOf), EndsOnVariant1(DateTime), EndsOnVariant2(null), - DataType2(enum), + DataType(enum), Dataset(class), Name(string), Description17(anyOf), DescriptionVariant1(string), DescriptionVariant2(null), CreatedAt(DateTime), - DataType3(anyOf), - DataType2(ref), + DataType2(anyOf), + DataType(ref), DataTypeVariant2(null), InputsSchemaDefinition(anyOf), DatasetInputsSchemaDefinition(class), @@ -647,8 +643,8 @@ DescriptionVariant1(string), DescriptionVariant2(null), CreatedAt(DateTime), - DataType4(anyOf), - DataType2(ref), + DataType3(anyOf), + DataType(ref), DataTypeVariant2(null), InputsSchemaDefinition2(anyOf), DatasetCreateInputsSchemaDefinition(class), @@ -690,8 +686,8 @@ DescriptionVariant1(string), DescriptionVariant2(null), CreatedAt(DateTime), - DataType5(anyOf), - DataType2(ref), + DataType4(anyOf), + DataType(ref), DataTypeVariant2(null), InputsSchemaDefinition3(anyOf), DatasetPublicSchemaInputsSchemaDefinition(class), @@ -710,8 +706,8 @@ DescriptionVariant1(string), DescriptionVariant2(null), CreatedAt(DateTime), - DataType6(anyOf), - DataType2(ref), + DataType5(anyOf), + DataType(ref), DataTypeVariant2(null), InputsSchemaDefinition4(anyOf), DatasetSchemaForUpdateInputsSchemaDefinition(class), @@ -1326,8 +1322,7 @@ RoleName(anyOf), RoleNameVariant1(string), RoleNameVariant2(null), - AccessScope2(allOf), - AccessScope(ref), + AccessScope(ref), IdentityAnnotationQueueRunStatusCreateSchema(class), Status(anyOf), StatusVariant1(string), @@ -1419,8 +1414,7 @@ RoleName2(anyOf), RoleNameVariant1(string), RoleNameVariant2(null), - AccessScope3(allOf), - AccessScope(ref), + AccessScope(ref), Email(anyOf), EmailVariant1(string), EmailVariant2(null), @@ -1504,10 +1498,8 @@ Timezone(string), Groups(array), MonitorGroupSpec(ref), - Interval(allOf), - TimedeltaInput(ref), - Stride3(allOf), - TimedeltaInput(ref), + TimedeltaInput(ref), + TimedeltaInput(ref), MonitorResponse(class), Blocks(array), MonitorBlock(ref), @@ -1540,8 +1532,7 @@ RoleName3(anyOf), RoleNameVariant1(string), RoleNameVariant2(null), - AccessScope4(allOf), - AccessScope(ref), + AccessScope(ref), Email2(anyOf), EmailVariant1(string), EmailVariant2(null), @@ -1572,8 +1563,7 @@ FullName6(anyOf), FullNameVariant1(string), FullNameVariant2(null), - AccessScope5(allOf), - AccessScope(ref), + AccessScope(ref), Id(string), UserId3(anyOf), UserIdVariant1(string), @@ -1725,8 +1715,7 @@ FullName7(anyOf), FullNameVariant1(string), FullNameVariant2(null), - AccessScope6(allOf), - AccessScope(ref), + AccessScope(ref), Id(string), UserId4(anyOf), UserIdVariant1(string), @@ -1927,7 +1916,7 @@ OrganizationIdVariant2(null), Permissions(array), PermissionsItem(string), - AccessScope7(anyOf), + AccessScope2(anyOf), AccessScope(ref), AccessScopeVariant2(null), RootModelDictStrListStr(class), @@ -3787,8 +3776,8 @@ ReadDatasetsApiV1DatasetsGetIdVariant2(null), ReadDatasetsApiV1DatasetsGetDataType(anyOf), ReadDatasetsApiV1DatasetsGetDataTypeVariant1(array), - DataType2(ref), - DataType2(ref), + DataType(ref), + DataType(ref), ReadDatasetsApiV1DatasetsGetDataTypeVariant3(null), ReadDatasetsApiV1DatasetsGetName(anyOf), ReadDatasetsApiV1DatasetsGetNameVariant1(string), diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/ideogram/ResolvedSchemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/ideogram/ResolvedSchemas/_.verified.txt new file mode 100644 index 0000000000..896eb3a044 --- /dev/null +++ b/src/tests/AutoSDK.UnitTests/Snapshots/ideogram/ResolvedSchemas/_.verified.txt @@ -0,0 +1,145 @@ +[ + DescribeResponse(class)[vision], + Descriptions(array)[vision], + Description(ref)[vision], + Description(class)[vision], + Text(string)[vision], + DescribeRequest(class)[vision], + ImageFile(byte[])[vision], + GenerateImageRequest(class)[generate], + ImageRequest(ref)[generate], + ImageRequest(class)[generate], + Prompt(string)[generate], + AspectRatio(ref)[generate], + ModelEnum(ref)[generate], + MagicPromptOption(ref)[generate], + Seed(int)[generate], + StyleType(ref)[generate], + NegativePrompt(string)[generate], + Resolution(ref)[generate], + ColorPaletteWithPresetNameOrMembers(ref)[generate], + AspectRatio(enum)[generate], + ModelEnum(enum)[generate], + MagicPromptOption(enum)[generate], + StyleType(enum)[generate], + Resolution(enum)[generate], + ColorPaletteWithPresetNameOrMembers(oneOf)[generate], + ColorPaletteWithPresetName(ref)[generate], + ColorPaletteWithMembers(ref)[generate], + ColorPaletteWithPresetName(class)[generate], + ColorPalettePresetName(ref)[generate], + ColorPalettePresetName(enum)[generate], + ColorPaletteWithMembers(class)[generate], + Members(array)[generate], + ColorPaletteMember(ref)[generate], + ColorPaletteMember(class)[generate], + ColorHex(string)[generate], + ColorWeight(double)[generate], + RemixImageRequest(class)[generate], + ImageRequest(ref)[generate], + ImageFile(byte[])[generate], + UpscaleImageRequest(class)[generate], + UpscaleInitialImageRequest(ref)[generate], + ImageFile(byte[])[generate], + UpscaleInitialImageRequest(class)[generate], + Prompt(string)[generate], + Resemblance(int)[generate], + Detail(int)[generate], + MagicPromptOption(ref)[generate], + Seed(int)[generate], + InitialImageRequest(class)[], + ImageWeight(int)[], + ImageRequest(ref)[], + GenerateImageResponse(class)[generate], + Created(DateTime)[generate], + Data(array)[generate], + ImageObject(ref)[generate], + ImageObject(class)[generate], + Url(Uri)[generate], + Prompt(string)[generate], + Resolution(string)[generate], + IsImageSafe(bool)[generate], + Seed(int)[generate], + GenerateImageSafetyError(class)[generate], + Error(string)[generate], + ImageSafetyError(class)[vision], + Error(string)[vision], + ManageApiSubscriptionResponse(class)[manage], + HasAcceptedTerms(bool)[manage], + HasStripeSetup(bool)[manage], + MetronomeDashboardUrl(string)[manage], + MetronomeDashboardDarkModeUrl(string)[manage], + MetronomeLinks(ref)[manage], + RechargeSettings(ref)[manage], + StripeBillingUrl(string)[manage], + MetronomeLinks(class)[manage], + InvoicesIframeUrl(string)[manage], + InvoicesIframeDarkModeUrl(string)[manage], + CreditsIframeUrl(string)[manage], + CreditsIframeDarkModeUrl(string)[manage], + RechargeSettings(class)[manage], + Price(ref)[manage], + Price(ref)[manage], + Price(class)[manage], + CurrencyCode(string)[manage], + Amount(double)[manage], + RechargeSettingsResponse(class)[], + IsActive(bool)[], + RechargeSettings(ref)[], + PostApiSubscriptionResponse(class)[manage], + RechargeSettings(ref)[manage], + PostApiSubscriptionError(class)[manage], + Messages(array)[manage], + MessagesItem(string)[manage], + PostApiSubscriptionRequest(class)[manage], + RechargeSettings(ref)[manage], + PostApiReactivateResponse(class)[manage], + RechargeSettings(ref)[manage], + GetApiKeysResponse(class)[manage], + CurrentApiKeys(array)[manage], + RedactedApiKey(ref)[manage], + RedactedApiKey(class)[manage], + RedactedApiKey1(string)[manage], + CreationTime(DateTime)[manage], + ApiKeyId(string)[manage], + PostApiKeyResponse(class)[manage], + ApiKey(string)[manage], + ApiKeyId(string)[manage], + ManageApiStripeSubscriptionResponse(class)[manage], + StripeSubscriptionUrl(string)[manage], + StripeBillingUrl(string)[manage], + GetApiTermsResponse(class)[manage], + ApiTerms(ref)[manage], + ApiTerms(class)[manage], + TermsId(string)[manage], + TermsUrl(string)[manage], + PostApiTermsRequest(class)[manage], + TermsId(string)[manage], + Seed(int)[], + ColorPaletteMembers(array)[], + ColorPaletteMember(ref)[], + DescribeRequest(ref)[vision], + GenerateImageRequest(ref)[generate], + PostApiSubscriptionRequest(ref)[manage], + PostApiTermsRequest(ref)[manage], + RemixImageRequest(ref)[generate], + UpscaleImageRequest(ref)[generate], + DeleteSingleApiKeyApiKeyId(string)[manage], + GetApiStripeSubscriptionIsBusiness(bool)[manage], + DescribeResponse(ref)[vision], + ImageSafetyError(ref)[vision], + GenerateImageResponse(ref)[generate], + GenerateImageSafetyError(ref)[generate], + GetApiKeysResponse(ref)[manage], + PostApiKeyResponse(ref)[manage], + PostApiReactivateResponse(ref)[manage], + ManageApiStripeSubscriptionResponse(ref)[manage], + ManageApiSubscriptionResponse(ref)[manage], + PostApiSubscriptionResponse(ref)[manage], + PostApiSubscriptionError(ref)[manage], + GetApiTermsResponse(ref)[manage], + GenerateImageResponse(ref)[generate], + GenerateImageSafetyError(ref)[generate], + GenerateImageResponse(ref)[generate], + GenerateImageSafetyError(ref)[generate] +] \ No newline at end of file diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/ideogram/Schemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/ideogram/Schemas/_.verified.txt new file mode 100644 index 0000000000..9233db28df --- /dev/null +++ b/src/tests/AutoSDK.UnitTests/Snapshots/ideogram/Schemas/_.verified.txt @@ -0,0 +1,145 @@ +[ + DescribeResponse(class), + Descriptions(array), + Description(ref), + DescribeRequest(class), + ImageFile(byte[]), + GenerateImageRequest(class), + ImageRequest(ref), + RemixImageRequest(class), + ImageRequest(ref), + ImageFile(byte[]), + UpscaleImageRequest(class), + UpscaleInitialImageRequest(ref), + ImageFile(byte[]), + ImageRequest(class), + Prompt(string), + AspectRatio(ref), + ModelEnum(ref), + MagicPromptOption(ref), + Seed(int), + StyleType(ref), + NegativePrompt(string), + Resolution(ref), + ColorPaletteWithPresetNameOrMembers(ref), + InitialImageRequest(class), + ImageWeight(int), + ImageRequest(ref), + UpscaleInitialImageRequest(class), + Prompt(string), + Resemblance(int), + Detail(int), + MagicPromptOption(ref), + Seed(int), + GenerateImageResponse(class), + Created(DateTime), + Data(array), + ImageObject(ref), + ImageObject(class), + Url(Uri), + Prompt(string), + Resolution(string), + IsImageSafe(bool), + Seed(int), + ModelEnum(enum), + GenerateImageSafetyError(class), + Error(string), + ImageSafetyError(class), + Error(string), + ManageApiSubscriptionResponse(class), + HasAcceptedTerms(bool), + HasStripeSetup(bool), + MetronomeDashboardUrl(string), + MetronomeDashboardDarkModeUrl(string), + MetronomeLinks(ref), + RechargeSettings(ref), + StripeBillingUrl(string), + MetronomeLinks(class), + InvoicesIframeUrl(string), + InvoicesIframeDarkModeUrl(string), + CreditsIframeUrl(string), + CreditsIframeDarkModeUrl(string), + RechargeSettingsResponse(class), + IsActive(bool), + RechargeSettings(ref), + RechargeSettings(class), + Price(ref), + Price(ref), + PostApiSubscriptionResponse(class), + RechargeSettings(ref), + PostApiSubscriptionError(class), + Messages(array), + MessagesItem(string), + PostApiSubscriptionRequest(class), + RechargeSettings(ref), + PostApiReactivateResponse(class), + RechargeSettings(ref), + GetApiKeysResponse(class), + CurrentApiKeys(array), + RedactedApiKey(ref), + RedactedApiKey(class), + RedactedApiKey1(string), + CreationTime(DateTime), + ApiKeyId(string), + PostApiKeyResponse(class), + ApiKey(string), + ApiKeyId(string), + ManageApiStripeSubscriptionResponse(class), + StripeSubscriptionUrl(string), + StripeBillingUrl(string), + GetApiTermsResponse(class), + ApiTerms(ref), + ApiTerms(class), + TermsId(string), + TermsUrl(string), + PostApiTermsRequest(class), + TermsId(string), + Description(class), + Text(string), + AspectRatio(enum), + MagicPromptOption(enum), + Seed(int), + StyleType(enum), + Resolution(enum), + ColorPaletteWithPresetNameOrMembers(oneOf), + ColorPaletteWithPresetName(ref), + ColorPaletteWithMembers(ref), + ColorPaletteWithPresetName(class), + ColorPalettePresetName(ref), + ColorPalettePresetName(enum), + ColorPaletteWithMembers(class), + Members(array), + ColorPaletteMember(ref), + ColorPaletteMembers(array), + ColorPaletteMember(ref), + ColorPaletteMember(class), + ColorHex(string), + ColorWeight(double), + Price(class), + CurrencyCode(string), + Amount(double), + DescribeRequest(ref), + GenerateImageRequest(ref), + PostApiSubscriptionRequest(ref), + PostApiTermsRequest(ref), + RemixImageRequest(ref), + UpscaleImageRequest(ref), + DeleteSingleApiKeyApiKeyId(string), + GetApiStripeSubscriptionIsBusiness(bool), + DescribeResponse(ref), + ImageSafetyError(ref), + GenerateImageResponse(ref), + GenerateImageSafetyError(ref), + GetApiKeysResponse(ref), + PostApiKeyResponse(ref), + PostApiReactivateResponse(ref), + ManageApiStripeSubscriptionResponse(ref), + ManageApiSubscriptionResponse(ref), + PostApiSubscriptionResponse(ref), + PostApiSubscriptionError(ref), + GetApiTermsResponse(ref), + GenerateImageResponse(ref), + GenerateImageSafetyError(ref), + GenerateImageResponse(ref), + GenerateImageSafetyError(ref) +] \ No newline at end of file diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/instill/ResolvedSchemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/instill/ResolvedSchemas/_.verified.txt index ddc0e3d446..9a0562ca60 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/instill/ResolvedSchemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/instill/ResolvedSchemas/_.verified.txt @@ -16,8 +16,7 @@ CreateTime(DateTime)[Token], UpdateTime(DateTime)[Token], AccessToken(string)[Token], - State(allOf)[Token], - ApiTokenState(ref)[Token], + ApiTokenState(ref)[Token], TokenType(string)[Token], Ttl(int)[Token], ExpireTime(DateTime)[Token], @@ -32,11 +31,8 @@ Role(string)[User], NewsletterSubscription(bool)[User], CookieToken(string)[User], - OnboardingStatus(allOf)[User], - OnboardingStatus2(ref)[User], - Profile(allOf)[User], - UserProfile(ref)[User], - OnboardingStatus2(enum)[User], + UserProfile(ref)[User], + OnboardingStatus(ref)[User], UserProfile(class)[User, Organization, Membership], DisplayName(string)[User, Organization, Membership], Bio(string)[User, Organization, Membership], @@ -44,64 +40,52 @@ PublicEmail(string)[User, Organization, Membership], CompanyName(string)[User, Organization, Membership], UserProfileSocialProfileLinks(class)[User, Organization, Membership], + OnboardingStatus(enum)[User], CheckNamespaceAdminResponse(class)[], - Type(allOf)[], - CheckNamespaceAdminResponseNamespace(ref)[], + Organization(ref)[], Uid(string)[], - User(allOf)[], - User9(ref)[], - Organization(allOf)[], - Organization7(ref)[], - CheckNamespaceAdminResponseNamespace(enum)[], - User9(class)[User, Organization, Membership], - Name(string)[User, Organization, Membership], - Uid(string)[User, Organization, Membership], - Id(string)[User, Organization, Membership], - CreateTime(DateTime)[User, Organization, Membership], - UpdateTime(DateTime)[User, Organization, Membership], - Profile3(allOf)[User, Organization, Membership], - UserProfile(ref)[User, Organization, Membership], - Organization7(class)[Organization, Membership], + User(ref)[], + CheckNamespaceAdminResponseNamespace(ref)[], + Organization(class)[Organization, Membership], Name(string)[Organization, Membership], Uid(string)[Organization, Membership], Id(string)[Organization, Membership], CreateTime(DateTime)[Organization, Membership], UpdateTime(DateTime)[Organization, Membership], - Owner(allOf)[Organization, Membership], - User9(ref)[Organization], - Profile2(allOf)[Organization, Membership], - OrganizationProfile(ref)[Organization], - Permission(allOf)[Organization, Membership], - Permission2(ref)[Organization], + Permission(ref)[Organization, Membership], + OrganizationProfile(ref)[Organization, Membership], + User(ref)[Organization, Membership], + Permission(class)[Organization], + CanEdit(bool)[Organization], OrganizationProfile(class)[Organization], DisplayName(string)[Organization], Bio(string)[Organization], Avatar(string)[Organization], PublicEmail(string)[Organization], OrganizationProfileSocialProfileLinks(class)[Organization], - Permission2(class)[Organization], - CanEdit(bool)[Organization], + User(class)[User, Organization, Membership], + Name(string)[User, Organization, Membership], + Uid(string)[User, Organization, Membership], + Id(string)[User, Organization, Membership], + CreateTime(DateTime)[User, Organization, Membership], + UpdateTime(DateTime)[User, Organization, Membership], + UserProfile(ref)[User, Organization, Membership], + CheckNamespaceAdminResponseNamespace(enum)[], CheckNamespaceByUIDAdminResponse(class)[], - Type2(allOf)[], - CheckNamespaceByUIDAdminResponseNamespace(ref)[], + Organization(ref)[], Id(string)[], - User2(allOf)[], - User9(ref)[], - Organization2(allOf)[], - Organization7(ref)[], + User(ref)[], + CheckNamespaceByUIDAdminResponseNamespace(ref)[], CheckNamespaceByUIDAdminResponseNamespace(enum)[], CheckNamespaceRequest(class)[Utils], Id(string)[Utils], CheckNamespaceResponse(class)[Utils], - Type3(allOf)[Utils], - CheckNamespaceResponseNamespace(ref)[Utils], + CheckNamespaceResponseNamespace(ref)[Utils], CheckNamespaceResponseNamespace(enum)[Utils], CreateOrganizationResponse(class)[Organization], - Organization3(allOf)[Organization], - Organization7(ref)[Organization], + Organization(ref)[Organization], CreateTokenResponse(class)[Token], - Token(allOf)[Token], - ApiToken(ref)[Token], + ApiToken(ref)[Token], CreditConsumptionChartRecord(class)[Metric], NamespaceId(string)[Metric], TimeBuckets(array)[Metric], @@ -114,17 +98,12 @@ DeleteTokenResponse(class)[Token], DeleteUserMembershipResponse(class)[Membership], GetAuthenticatedUserResponse(class)[User], - User3(allOf)[User], - AuthenticatedUser(ref)[User], + AuthenticatedUser(ref)[User], GetAuthenticatedUserSubscriptionResponse(class)[Subscription], - Subscription(allOf)[Subscription], - UserSubscription(ref)[Subscription], + UserSubscription(ref)[Subscription], UserSubscription(class)[Subscription], - Plan2(allOf)[Subscription], - UserSubscriptionPlan(ref)[Subscription], - Detail2(allOf)[Subscription], - StripeSubscriptionDetail(ref)[Subscription], - UserSubscriptionPlan(enum)[Subscription], + StripeSubscriptionDetail(ref)[Subscription], + UserSubscriptionPlan(ref)[Subscription], StripeSubscriptionDetail(class)[Subscription], ProductName(string)[Subscription], Id(string)[Subscription], @@ -132,42 +111,32 @@ Price(float)[Subscription], CanceledAt(int)[Subscription], TrialEnd(int)[Subscription], - Status2(allOf)[Subscription], - StripeSubscriptionDetailStatus(ref)[Subscription], + StripeSubscriptionDetailStatus(ref)[Subscription], Description(string)[Subscription], StripeSubscriptionDetailStatus(enum)[Subscription], + UserSubscriptionPlan(enum)[Subscription], GetOrganizationAdminResponse(class)[], - Organization4(allOf)[], - Organization7(ref)[], + Organization(ref)[], GetOrganizationMembershipResponse(class)[Membership], - Membership(allOf)[Membership], - OrganizationMembership(ref)[Membership], + OrganizationMembership(ref)[Membership], OrganizationMembership(class)[Membership], Name(string)[Membership], Role(string)[Membership], - State2(allOf)[Membership], - MembershipState(ref)[Membership], - User7(allOf)[Membership], - User9(ref)[Membership], - Organization8(allOf)[Membership], - Organization7(ref)[Membership], + Organization(ref)[Membership], + User(ref)[Membership], + MembershipState(ref)[Membership], MembershipState(enum)[Membership], GetOrganizationResponse(class)[Organization], - Organization5(allOf)[Organization], - Organization7(ref)[Organization], + Organization(ref)[Organization], GetOrganizationSubscriptionAdminResponse(class)[], - Subscription2(allOf)[], - OrganizationSubscription(ref)[], + OrganizationSubscription(ref)[], OrganizationSubscription(class)[Subscription], - Plan(allOf)[Subscription], - OrganizationSubscriptionPlan(ref)[Subscription], - Detail(allOf)[Subscription], - StripeSubscriptionDetail(ref)[Subscription], + StripeSubscriptionDetail(ref)[Subscription], + OrganizationSubscriptionPlan(ref)[Subscription], UsedSeats(int)[Subscription], OrganizationSubscriptionPlan(enum)[Subscription], GetOrganizationSubscriptionResponse(class)[Subscription], - Subscription3(allOf)[Subscription], - OrganizationSubscription(ref)[Subscription], + OrganizationSubscription(ref)[Subscription], GetRemainingCreditAdminResponse(class)[], Amount(float)[], GetRemainingCreditResponse(class)[Credit], @@ -175,29 +144,21 @@ Imperishable(float)[Credit], Total(float)[Credit], GetTokenResponse(class)[Token], - Token2(allOf)[Token], - ApiToken(ref)[Token], + ApiToken(ref)[Token], GetUserAdminResponse(class)[], - User4(allOf)[], - User9(ref)[], + User(ref)[], GetUserMembershipResponse(class)[Membership], - Membership2(allOf)[Membership], - UserMembership(ref)[Membership], + UserMembership(ref)[Membership], UserMembership(class)[Membership], Name(string)[Membership], Role(string)[Membership], - State3(allOf)[Membership], - MembershipState(ref)[Membership], - User10(allOf)[Membership], - User9(ref)[Membership], - Organization10(allOf)[Membership], - Organization7(ref)[Membership], + Organization(ref)[Membership], + User(ref)[Membership], + MembershipState(ref)[Membership], GetUserResponse(class)[User], - User5(allOf)[User], - User9(ref)[User], + User(ref)[User], GetUserSubscriptionAdminResponse(class)[], - Subscription4(allOf)[], - UserSubscription(ref)[], + UserSubscription(ref)[], ListCreditConsumptionChartRecordsResponse(class)[Metric], CreditConsumptionChartRecords(array)[Metric], CreditConsumptionChartRecord(ref)[Metric], @@ -206,12 +167,12 @@ OrganizationMembership(ref)[Membership], ListOrganizationsAdminResponse(class)[], Organizations(array)[], - Organization7(ref)[], + Organization(ref)[], NextPageToken(string)[], TotalSize(int)[], ListOrganizationsResponse(class)[Organization], Organizations(array)[Organization], - Organization7(ref)[Organization], + Organization(ref)[Organization], NextPageToken(string)[Organization], TotalSize(int)[Organization], ListPipelineTriggerChartRecordsResponse(class)[Metric], @@ -220,10 +181,8 @@ PipelineTriggerChartRecord(class)[Metric], PipelineId(string)[Metric], PipelineUid(string)[Metric], - TriggerMode(allOf)[Metric], - Mode(ref)[Metric], - Status(allOf)[Metric], - Mgmtv1betaStatus(ref)[Metric], + Mgmtv1betaStatus(ref)[Metric], + Mode(ref)[Metric], TimeBuckets(array)[Metric], TimeBucketsItem(DateTime)[Metric], TriggerCounts(array)[Metric], @@ -255,34 +214,28 @@ UserMembership(ref)[Membership], ListUsersAdminResponse(class)[], Users(array)[], - User9(ref)[], + User(ref)[], NextPageToken(string)[], TotalSize(int)[], ListUsersResponse(class)[User], Users(array)[User], - User9(ref)[User], + User(ref)[User], NextPageToken(string)[User], TotalSize(int)[User], LookUpOrganizationAdminResponse(class)[], - Organization6(allOf)[], - Organization7(ref)[], + Organization(ref)[], LookUpUserAdminResponse(class)[], - User6(allOf)[], - User9(ref)[], + User(ref)[], PatchAuthenticatedUserResponse(class)[User], - User8(allOf)[User], - AuthenticatedUser(ref)[User], + AuthenticatedUser(ref)[User], SubtractCreditAdminResponse(class)[], Amount(float)[], UpdateOrganizationMembershipResponse(class)[Membership], - Membership3(allOf)[Membership], - OrganizationMembership(ref)[Membership], + OrganizationMembership(ref)[Membership], UpdateOrganizationResponse(class)[Organization], - Organization9(allOf)[Organization], - Organization7(ref)[Organization], + Organization(ref)[Organization], UpdateUserMembershipResponse(class)[Membership], - Membership4(allOf)[Membership], - UserMembership(ref)[Membership], + UserMembership(ref)[Membership], ValidateTokenResponse(class)[Token], UserUid(string)[Token], View(enum)[], @@ -307,14 +260,12 @@ GetFileCatalogResponseMetadata(class)[Catalog], FileUid(string)[Catalog], FileId(string)[Catalog], - FileType(allOf)[Catalog], - FileType2(ref)[], + FileProcessStatus(ref)[Catalog], FileSize(string)[Catalog], FileUploadTime(DateTime)[Catalog], - FileProcessStatus(allOf)[Catalog], - FileProcessStatus2(ref)[], - FileType2(enum)[Catalog], - FileProcessStatus2(enum)[Catalog], + FileType(ref)[Catalog], + FileProcessStatus(enum)[Catalog], + FileType(enum)[Catalog], GetFileCatalogResponseText(class)[Catalog], PipelineIds(array)[Catalog], PipelineIdsItem(string)[], @@ -356,11 +307,9 @@ TotalTokens(long)[Catalog], UsedStorage(string)[Catalog], CreateCatalogResponse(class)[Catalog], - Catalog2(allOf)[Catalog], - Catalog(ref)[Catalog], + Catalog(ref)[Catalog], CreateRepositoryTagResponse(class)[], - Tag(allOf)[], - RepositoryTag(ref)[], + RepositoryTag(ref)[], RepositoryTag(class)[], Name(string)[], Id(string)[], @@ -369,16 +318,13 @@ DeleteCatalogFileResponse(class)[Catalog], FileUid(string)[Catalog], DeleteCatalogResponse(class)[Catalog], - Catalog3(allOf)[Catalog], - Catalog(ref)[Catalog], + Catalog(ref)[Catalog], DeleteRepositoryTagResponse(class)[], File(class)[Catalog], FileUid(string)[Catalog], Name(string)[Catalog], - Type4(allOf)[Catalog], - FileType2(ref)[Catalog], - ProcessStatus(allOf)[Catalog], - FileProcessStatus2(ref)[Catalog], + FileProcessStatus(ref)[Catalog], + FileType(ref)[Catalog], ProcessOutcome(string)[Catalog], Retrievable(bool)[Catalog], Content(string)[Catalog], @@ -393,16 +339,13 @@ TotalTokens(int)[Catalog], GetFileCatalogResponse(class)[Catalog], OriginalData(string)[Catalog], - Metadata(allOf)[Catalog], - GetFileCatalogResponseMetadata(ref)[Catalog], - Text(allOf)[Catalog], - GetFileCatalogResponseText(ref)[Catalog], + GetFileCatalogResponseText(ref)[Catalog], + GetFileCatalogResponseMetadata(ref)[Catalog], Chunks(array)[Catalog], GetFileCatalogResponseChunk(ref)[Catalog], GetFileCatalogResponseChunk(class)[Catalog], Uid(string)[Catalog], - Type5(allOf)[Catalog], - GetFileCatalogResponseChunkType(ref)[Catalog], + GetFileCatalogResponseChunkType(ref)[Catalog], StartPos(int)[Catalog], EndPos(int)[Catalog], Content(string)[Catalog], @@ -412,12 +355,10 @@ CreateTime(DateTime)[Catalog], Retrievable(bool)[Catalog], GetRepositoryTagResponse(class)[], - Tag2(allOf)[], - RepositoryTag(ref)[], + RepositoryTag(ref)[], GetSourceFileResponse(class)[Catalog], - SourceFile(allOf)[Catalog], - SourceFile2(ref)[Catalog], - SourceFile2(class)[Catalog], + SourceFile(ref)[Catalog], + SourceFile(class)[Catalog], OriginalFileUid(string)[Catalog], Content(string)[Catalog], CreateTime(DateTime)[Catalog], @@ -431,8 +372,7 @@ TotalSize(int)[Catalog], PageSize(int)[Catalog], NextPageToken(string)[Catalog], - Filter(allOf)[Catalog], - ListCatalogFilesFilter(ref)[Catalog], + ListCatalogFilesFilter(ref)[Catalog], ListCatalogsResponse(class)[Catalog], Catalogs(array)[Catalog], Catalog(ref)[Catalog], @@ -464,17 +404,14 @@ SimilarChunks(array)[Catalog], SimilarityChunk(ref)[Catalog], UpdateCatalogResponse(class)[Catalog], - Catalog4(allOf)[Catalog], - Catalog(ref)[Catalog], + Catalog(ref)[Catalog], UpdateChunkResponse(class)[Catalog], - Chunk(allOf)[Catalog], - Artifactv1alphaChunk(ref)[Catalog], + Artifactv1alphaChunk(ref)[Catalog], UploadCatalogFileResponse(class)[Catalog], - File2(allOf)[Catalog], - File(ref)[Catalog], + File(ref)[Catalog], AuthenticatedUser(ref)[User], - Organization7(ref)[Organization], - Organization7(ref)[Organization], + Organization(ref)[Organization], + Organization(ref)[Organization], UserMembership(ref)[Membership], OrganizationMembership(ref)[Membership], ApiToken(ref)[Token], diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/instill/Schemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/instill/Schemas/_.verified.txt index fa4d944e60..9836a559c3 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/instill/Schemas/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/instill/Schemas/_.verified.txt @@ -16,8 +16,7 @@ CreateTime(DateTime), UpdateTime(DateTime), AccessToken(string), - State(allOf), - ApiTokenState(ref), + ApiTokenState(ref), TokenType(string), Ttl(int), ExpireTime(DateTime), @@ -32,40 +31,29 @@ Role(string), NewsletterSubscription(bool), CookieToken(string), - OnboardingStatus(allOf), - OnboardingStatus2(ref), - Profile(allOf), - UserProfile(ref), + UserProfile(ref), + OnboardingStatus(ref), CheckNamespaceAdminResponse(class), - Type(allOf), - CheckNamespaceAdminResponseNamespace(ref), + Organization(ref), Uid(string), - User(allOf), - User9(ref), - Organization(allOf), - Organization7(ref), + User(ref), + CheckNamespaceAdminResponseNamespace(ref), CheckNamespaceAdminResponseNamespace(enum), CheckNamespaceByUIDAdminResponse(class), - Type2(allOf), - CheckNamespaceByUIDAdminResponseNamespace(ref), + Organization(ref), Id(string), - User2(allOf), - User9(ref), - Organization2(allOf), - Organization7(ref), + User(ref), + CheckNamespaceByUIDAdminResponseNamespace(ref), CheckNamespaceByUIDAdminResponseNamespace(enum), CheckNamespaceRequest(class), Id(string), CheckNamespaceResponse(class), - Type3(allOf), - CheckNamespaceResponseNamespace(ref), + CheckNamespaceResponseNamespace(ref), CheckNamespaceResponseNamespace(enum), CreateOrganizationResponse(class), - Organization3(allOf), - Organization7(ref), + Organization(ref), CreateTokenResponse(class), - Token(allOf), - ApiToken(ref), + ApiToken(ref), CreditConsumptionChartRecord(class), NamespaceId(string), TimeBuckets(array), @@ -78,26 +66,19 @@ DeleteTokenResponse(class), DeleteUserMembershipResponse(class), GetAuthenticatedUserResponse(class), - User3(allOf), - AuthenticatedUser(ref), + AuthenticatedUser(ref), GetAuthenticatedUserSubscriptionResponse(class), - Subscription(allOf), - UserSubscription(ref), + UserSubscription(ref), GetOrganizationAdminResponse(class), - Organization4(allOf), - Organization7(ref), + Organization(ref), GetOrganizationMembershipResponse(class), - Membership(allOf), - OrganizationMembership(ref), + OrganizationMembership(ref), GetOrganizationResponse(class), - Organization5(allOf), - Organization7(ref), + Organization(ref), GetOrganizationSubscriptionAdminResponse(class), - Subscription2(allOf), - OrganizationSubscription(ref), + OrganizationSubscription(ref), GetOrganizationSubscriptionResponse(class), - Subscription3(allOf), - OrganizationSubscription(ref), + OrganizationSubscription(ref), GetRemainingCreditAdminResponse(class), Amount(float), GetRemainingCreditResponse(class), @@ -105,20 +86,15 @@ Imperishable(float), Total(float), GetTokenResponse(class), - Token2(allOf), - ApiToken(ref), + ApiToken(ref), GetUserAdminResponse(class), - User4(allOf), - User9(ref), + User(ref), GetUserMembershipResponse(class), - Membership2(allOf), - UserMembership(ref), + UserMembership(ref), GetUserResponse(class), - User5(allOf), - User9(ref), + User(ref), GetUserSubscriptionAdminResponse(class), - Subscription4(allOf), - UserSubscription(ref), + UserSubscription(ref), ListCreditConsumptionChartRecordsResponse(class), CreditConsumptionChartRecords(array), CreditConsumptionChartRecord(ref), @@ -127,12 +103,12 @@ OrganizationMembership(ref), ListOrganizationsAdminResponse(class), Organizations(array), - Organization7(ref), + Organization(ref), NextPageToken(string), TotalSize(int), ListOrganizationsResponse(class), Organizations(array), - Organization7(ref), + Organization(ref), NextPageToken(string), TotalSize(int), ListPipelineTriggerChartRecordsResponse(class), @@ -153,44 +129,36 @@ UserMembership(ref), ListUsersAdminResponse(class), Users(array), - User9(ref), + User(ref), NextPageToken(string), TotalSize(int), ListUsersResponse(class), Users(array), - User9(ref), + User(ref), NextPageToken(string), TotalSize(int), LookUpOrganizationAdminResponse(class), - Organization6(allOf), - Organization7(ref), + Organization(ref), LookUpUserAdminResponse(class), - User6(allOf), - User9(ref), + User(ref), MembershipState(enum), Mode(enum), - OnboardingStatus2(enum), - Organization7(class), + OnboardingStatus(enum), + Organization(class), Name(string), Uid(string), Id(string), CreateTime(DateTime), UpdateTime(DateTime), - Owner(allOf), - User9(ref), - Profile2(allOf), - OrganizationProfile(ref), - Permission(allOf), - Permission2(ref), + Permission(ref), + OrganizationProfile(ref), + User(ref), OrganizationMembership(class), Name(string), Role(string), - State2(allOf), - MembershipState(ref), - User7(allOf), - User9(ref), - Organization8(allOf), - Organization7(ref), + Organization(ref), + User(ref), + MembershipState(ref), OrganizationProfile(class), DisplayName(string), Bio(string), @@ -198,24 +166,19 @@ PublicEmail(string), OrganizationProfileSocialProfileLinks(class), OrganizationSubscription(class), - Plan(allOf), - OrganizationSubscriptionPlan(ref), - Detail(allOf), - StripeSubscriptionDetail(ref), + StripeSubscriptionDetail(ref), + OrganizationSubscriptionPlan(ref), UsedSeats(int), OrganizationSubscriptionPlan(enum), PatchAuthenticatedUserResponse(class), - User8(allOf), - AuthenticatedUser(ref), - Permission2(class), + AuthenticatedUser(ref), + Permission(class), CanEdit(bool), PipelineTriggerChartRecord(class), PipelineId(string), PipelineUid(string), - TriggerMode(allOf), - Mode(ref), - Status(allOf), - Mgmtv1betaStatus(ref), + Mgmtv1betaStatus(ref), + Mode(ref), TimeBuckets(array), TimeBucketsItem(DateTime), TriggerCounts(array), @@ -238,38 +201,30 @@ Price(float), CanceledAt(int), TrialEnd(int), - Status2(allOf), - StripeSubscriptionDetailStatus(ref), + StripeSubscriptionDetailStatus(ref), Description(string), StripeSubscriptionDetailStatus(enum), SubtractCreditAdminResponse(class), Amount(float), UpdateOrganizationMembershipResponse(class), - Membership3(allOf), - OrganizationMembership(ref), + OrganizationMembership(ref), UpdateOrganizationResponse(class), - Organization9(allOf), - Organization7(ref), + Organization(ref), UpdateUserMembershipResponse(class), - Membership4(allOf), - UserMembership(ref), - User9(class), + UserMembership(ref), + User(class), Name(string), Uid(string), Id(string), CreateTime(DateTime), UpdateTime(DateTime), - Profile3(allOf), - UserProfile(ref), + UserProfile(ref), UserMembership(class), Name(string), Role(string), - State3(allOf), - MembershipState(ref), - User10(allOf), - User9(ref), - Organization10(allOf), - Organization7(ref), + Organization(ref), + User(ref), + MembershipState(ref), UserProfile(class), DisplayName(string), Bio(string), @@ -278,10 +233,8 @@ CompanyName(string), UserProfileSocialProfileLinks(class), UserSubscription(class), - Plan2(allOf), - UserSubscriptionPlan(ref), - Detail2(allOf), - StripeSubscriptionDetail(ref), + StripeSubscriptionDetail(ref), + UserSubscriptionPlan(ref), UserSubscriptionPlan(enum), ValidateTokenResponse(class), UserUid(string), @@ -307,12 +260,10 @@ GetFileCatalogResponseMetadata(class), FileUid(string), FileId(string), - FileType(allOf), - FileType2(ref), + FileProcessStatus(ref), FileSize(string), FileUploadTime(DateTime), - FileProcessStatus(allOf), - FileProcessStatus2(ref), + FileType(ref), GetFileCatalogResponseText(class), PipelineIds(array), PipelineIdsItem(string), @@ -354,24 +305,19 @@ TotalTokens(long), UsedStorage(string), CreateCatalogResponse(class), - Catalog2(allOf), - Catalog(ref), + Catalog(ref), CreateRepositoryTagResponse(class), - Tag(allOf), - RepositoryTag(ref), + RepositoryTag(ref), DeleteCatalogFileResponse(class), FileUid(string), DeleteCatalogResponse(class), - Catalog3(allOf), - Catalog(ref), + Catalog(ref), DeleteRepositoryTagResponse(class), File(class), FileUid(string), Name(string), - Type4(allOf), - FileType2(ref), - ProcessStatus(allOf), - FileProcessStatus2(ref), + FileProcessStatus(ref), + FileType(ref), ProcessOutcome(string), Retrievable(bool), Content(string), @@ -384,20 +330,17 @@ Size(string), TotalChunks(int), TotalTokens(int), - FileProcessStatus2(enum), - FileType2(enum), + FileProcessStatus(enum), + FileType(enum), GetFileCatalogResponse(class), OriginalData(string), - Metadata(allOf), - GetFileCatalogResponseMetadata(ref), - Text(allOf), - GetFileCatalogResponseText(ref), + GetFileCatalogResponseText(ref), + GetFileCatalogResponseMetadata(ref), Chunks(array), GetFileCatalogResponseChunk(ref), GetFileCatalogResponseChunk(class), Uid(string), - Type5(allOf), - GetFileCatalogResponseChunkType(ref), + GetFileCatalogResponseChunkType(ref), StartPos(int), EndPos(int), Content(string), @@ -407,11 +350,9 @@ CreateTime(DateTime), Retrievable(bool), GetRepositoryTagResponse(class), - Tag2(allOf), - RepositoryTag(ref), + RepositoryTag(ref), GetSourceFileResponse(class), - SourceFile(allOf), - SourceFile2(ref), + SourceFile(ref), ListCatalogFilesFilter(class), FileUids(array), FileUidsItem(string), @@ -421,8 +362,7 @@ TotalSize(int), PageSize(int), NextPageToken(string), - Filter(allOf), - ListCatalogFilesFilter(ref), + ListCatalogFilesFilter(ref), ListCatalogsResponse(class), Catalogs(array), Catalog(ref), @@ -458,23 +398,20 @@ SimilarityChunksSearchResponse(class), SimilarChunks(array), SimilarityChunk(ref), - SourceFile2(class), + SourceFile(class), OriginalFileUid(string), Content(string), CreateTime(DateTime), UpdateTime(DateTime), UpdateCatalogResponse(class), - Catalog4(allOf), - Catalog(ref), + Catalog(ref), UpdateChunkResponse(class), - Chunk(allOf), - Artifactv1alphaChunk(ref), + Artifactv1alphaChunk(ref), UploadCatalogFileResponse(class), - File2(allOf), - File(ref), + File(ref), AuthenticatedUser(ref), - Organization7(ref), - Organization7(ref), + Organization(ref), + Organization(ref), UserMembership(ref), OrganizationMembership(ref), ApiToken(ref),