From ad380a5efb0d74fc2c0357ac41869ae3a1449060 Mon Sep 17 00:00:00 2001 From: HavenDV Date: Wed, 11 Sep 2024 19:31:43 +0400 Subject: [PATCH] test: Added heygen spec. --- .github/workflows/main.yml | 1 + AutoSDK.sln | 1 + specs/heygen.yaml | 923 ++++++++++++++++++ .../AutoSDK/Extensions/OpenApiExtensions.cs | 1 + ...ests.SdkGenerator_Diagnostics.verified.txt | 1 + .../_#G.Api.Authorizations..g.verified.cs | 21 + .../_#G.Api.Constructors..g.verified.cs | 28 + .../_#G.Api.V1VideoStatusGet.g.verified.cs | 65 ++ .../NewtonsoftJson/_#G.Api.g.verified.cs | 152 +++ ...G.AssetsClient.V1AssetUpload.g.verified.cs | 57 ++ .../_#G.AssetsClient.g.verified.cs | 66 ++ ...VideoAPIClient.V1VideoDelete.g.verified.cs | 65 ++ ...deoAPIClient.V2VideoGenerate.g.verified.cs | 115 +++ .../_#G.CreateVideoAPIClient.g.verified.cs | 66 ++ ..._#G.ListsClient.V1AvatarList.g.verified.cs | 57 ++ .../_#G.ListsClient.V1VideoList.g.verified.cs | 57 ++ .../_#G.ListsClient.V1VoiceList.g.verified.cs | 57 ++ .../_#G.ListsClient.V2Avatars.g.verified.cs | 57 ++ .../_#G.ListsClient.V2Voices.g.verified.cs | 57 ++ .../_#G.ListsClient.g.verified.cs | 64 ++ ...alizedVideoAddContactRequest.g.verified.cs | 30 + ...tactRequestVariablesListItem.g.verified.cs | 30 + ....StreamingCreateTokenRequest.g.verified.cs | 19 + ...G.Models.StreamingIceRequest.g.verified.cs | 30 + ...StreamingIceRequestCandidate.g.verified.cs | 42 + ...ls.StreamingInterruptRequest.g.verified.cs | 24 + ...G.Models.StreamingNewRequest.g.verified.cs | 24 + ...Models.StreamingStartRequest.g.verified.cs | 30 + ...els.StreamingStartRequestSdp.g.verified.cs | 96 ++ ....Models.StreamingStopRequest.g.verified.cs | 24 + ....Models.StreamingTaskRequest.g.verified.cs | 30 + ....V1WebhookEndpointAddRequest.g.verified.cs | 30 + ...bhookEndpointAddRequestEvent.g.verified.cs | 19 + ...ls.V2TemplateGenerateRequest.g.verified.cs | 48 + ...lateGenerateRequestDimension.g.verified.cs | 30 + ...lateGenerateRequestVariables.g.verified.cs | 24 + ...ateRequestVariablesFirstName.g.verified.cs | 36 + ...VariablesFirstNameProperties.g.verified.cs | 24 + ...odels.V2VideoGenerateRequest.g.verified.cs | 54 + ...eoGenerateRequestAspectRatio.g.verified.cs | 19 + ...deoGenerateRequestCallbackId.g.verified.cs | 19 + ...ideoGenerateRequestDimension.g.verified.cs | 30 + ...deoGenerateRequestVideoInput.g.verified.cs | 30 + ...teRequestVideoInputCharacter.g.verified.cs | 36 + ...nerateRequestVideoInputVoice.g.verified.cs | 36 + ...dels.V2VideoTranslateRequest.g.verified.cs | 48 + ....PersonalizedVideoAddContact.g.verified.cs | 99 ++ ...sonalizedVideoAudienceDetail.g.verified.cs | 65 ++ ...rsonalizedVideoProjectDetail.g.verified.cs | 65 ++ .../_#G.PersonalizedVideoClient.g.verified.cs | 67 ++ .../_#G.Polyfills.g.verified.cs | 54 + ...PIClient.StreamingAvatarList.g.verified.cs | 57 ++ ...IClient.StreamingCreateToken.g.verified.cs | 89 ++ ...eamingAPIClient.StreamingIce.g.verified.cs | 97 ++ ...APIClient.StreamingInterrupt.g.verified.cs | 94 ++ ...amingAPIClient.StreamingList.g.verified.cs | 57 ++ ...eamingAPIClient.StreamingNew.g.verified.cs | 94 ++ ...mingAPIClient.StreamingStart.g.verified.cs | 97 ++ ...amingAPIClient.StreamingStop.g.verified.cs | 94 ++ ...amingAPIClient.StreamingTask.g.verified.cs | 99 ++ .../_#G.StreamingAPIClient.g.verified.cs | 66 ++ ...otoClient.V1TalkingPhotoList.g.verified.cs | 57 ++ ...oClient.V1TalkingPhotoUpload.g.verified.cs | 57 ++ ...lient.V2TalkingPhotoIdDelete.g.verified.cs | 57 ++ .../_#G.TalkingPhotoClient.g.verified.cs | 66 ++ ...APIClient.V2TemplateGenerate.g.verified.cs | 112 +++ ...mplateAPIClient.V2TemplateId.g.verified.cs | 57 ++ ...emplateAPIClient.V2Templates.g.verified.cs | 57 ++ .../_#G.TemplateAPIClient.g.verified.cs | 72 ++ ...rClient.V2UserRemainingQuota.g.verified.cs | 57 ++ .../_#G.UserClient.g.verified.cs | 66 ++ ...teAPIClient.V2VideoTranslate.g.verified.cs | 114 +++ ...ent.V2VideoTranslateIdStatus.g.verified.cs | 57 ++ ...ideoTranslateTargetLanguages.g.verified.cs | 57 ++ .../_#G.VideoTranslateAPIClient.g.verified.cs | 66 ++ ...sClient.V1WebhookEndpointAdd.g.verified.cs | 99 ++ ...ient.V1WebhookEndpointDelete.g.verified.cs | 65 ++ ...Client.V1WebhookEndpointList.g.verified.cs | 57 ++ ...sClient.V1WebhookWebhookList.g.verified.cs | 57 ++ .../_#G.WebhooksClient.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 + .../_#G.Api.V1VideoStatusGet.g.verified.cs | 65 ++ .../SystemTextJson/_#G.Api.g.verified.cs | 159 +++ ...G.AssetsClient.V1AssetUpload.g.verified.cs | 57 ++ .../_#G.AssetsClient.g.verified.cs | 66 ++ ...VideoAPIClient.V1VideoDelete.g.verified.cs | 65 ++ ...deoAPIClient.V2VideoGenerate.g.verified.cs | 115 +++ .../_#G.CreateVideoAPIClient.g.verified.cs | 66 ++ ..._#G.ListsClient.V1AvatarList.g.verified.cs | 57 ++ .../_#G.ListsClient.V1VideoList.g.verified.cs | 57 ++ .../_#G.ListsClient.V1VoiceList.g.verified.cs | 57 ++ .../_#G.ListsClient.V2Avatars.g.verified.cs | 57 ++ .../_#G.ListsClient.V2Voices.g.verified.cs | 57 ++ .../_#G.ListsClient.g.verified.cs | 64 ++ ...alizedVideoAddContactRequest.g.verified.cs | 30 + ...tactRequestVariablesListItem.g.verified.cs | 30 + ....StreamingCreateTokenRequest.g.verified.cs | 19 + ...G.Models.StreamingIceRequest.g.verified.cs | 30 + ...StreamingIceRequestCandidate.g.verified.cs | 42 + ...ls.StreamingInterruptRequest.g.verified.cs | 24 + ...G.Models.StreamingNewRequest.g.verified.cs | 24 + ...Models.StreamingStartRequest.g.verified.cs | 30 + ...els.StreamingStartRequestSdp.g.verified.cs | 96 ++ ....Models.StreamingStopRequest.g.verified.cs | 24 + ....Models.StreamingTaskRequest.g.verified.cs | 30 + ....V1WebhookEndpointAddRequest.g.verified.cs | 30 + ...bhookEndpointAddRequestEvent.g.verified.cs | 19 + ...ls.V2TemplateGenerateRequest.g.verified.cs | 48 + ...lateGenerateRequestDimension.g.verified.cs | 30 + ...lateGenerateRequestVariables.g.verified.cs | 24 + ...ateRequestVariablesFirstName.g.verified.cs | 36 + ...VariablesFirstNameProperties.g.verified.cs | 24 + ...odels.V2VideoGenerateRequest.g.verified.cs | 54 + ...eoGenerateRequestAspectRatio.g.verified.cs | 19 + ...deoGenerateRequestCallbackId.g.verified.cs | 19 + ...ideoGenerateRequestDimension.g.verified.cs | 30 + ...deoGenerateRequestVideoInput.g.verified.cs | 30 + ...teRequestVideoInputCharacter.g.verified.cs | 36 + ...nerateRequestVideoInputVoice.g.verified.cs | 36 + ...dels.V2VideoTranslateRequest.g.verified.cs | 48 + ....PersonalizedVideoAddContact.g.verified.cs | 99 ++ ...sonalizedVideoAudienceDetail.g.verified.cs | 65 ++ ...rsonalizedVideoProjectDetail.g.verified.cs | 65 ++ .../_#G.PersonalizedVideoClient.g.verified.cs | 67 ++ .../_#G.Polyfills.g.verified.cs | 54 + ...PIClient.StreamingAvatarList.g.verified.cs | 57 ++ ...IClient.StreamingCreateToken.g.verified.cs | 89 ++ ...eamingAPIClient.StreamingIce.g.verified.cs | 97 ++ ...APIClient.StreamingInterrupt.g.verified.cs | 94 ++ ...amingAPIClient.StreamingList.g.verified.cs | 57 ++ ...eamingAPIClient.StreamingNew.g.verified.cs | 94 ++ ...mingAPIClient.StreamingStart.g.verified.cs | 97 ++ ...amingAPIClient.StreamingStop.g.verified.cs | 94 ++ ...amingAPIClient.StreamingTask.g.verified.cs | 99 ++ .../_#G.StreamingAPIClient.g.verified.cs | 66 ++ ...otoClient.V1TalkingPhotoList.g.verified.cs | 57 ++ ...oClient.V1TalkingPhotoUpload.g.verified.cs | 57 ++ ...lient.V2TalkingPhotoIdDelete.g.verified.cs | 57 ++ .../_#G.TalkingPhotoClient.g.verified.cs | 66 ++ ...APIClient.V2TemplateGenerate.g.verified.cs | 112 +++ ...mplateAPIClient.V2TemplateId.g.verified.cs | 57 ++ ...emplateAPIClient.V2Templates.g.verified.cs | 57 ++ .../_#G.TemplateAPIClient.g.verified.cs | 72 ++ ...rClient.V2UserRemainingQuota.g.verified.cs | 57 ++ .../_#G.UserClient.g.verified.cs | 66 ++ ...teAPIClient.V2VideoTranslate.g.verified.cs | 114 +++ ...ent.V2VideoTranslateIdStatus.g.verified.cs | 57 ++ ...ideoTranslateTargetLanguages.g.verified.cs | 57 ++ .../_#G.VideoTranslateAPIClient.g.verified.cs | 66 ++ ...sClient.V1WebhookEndpointAdd.g.verified.cs | 99 ++ ...ient.V1WebhookEndpointDelete.g.verified.cs | 65 ++ ...Client.V1WebhookEndpointList.g.verified.cs | 57 ++ ...sClient.V1WebhookWebhookList.g.verified.cs | 57 ++ .../_#G.WebhooksClient.g.verified.cs | 66 ++ ...JsonConverters.UnixTimestamp.g.verified.cs | 40 + src/tests/AutoSDK.SnapshotTests/Tests.cs | 6 + src/tests/AutoSDK.UnitTests/DataTests.cs | 1 + .../heygen/ResolvedSchemas/_.verified.txt | 76 ++ .../Snapshots/heygen/Schemas/_.verified.txt | 76 ++ 162 files changed, 9846 insertions(+) create mode 100644 specs/heygen.yaml create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.Authorizations..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.Constructors..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.V1VideoStatusGet.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.AssetsClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1AvatarList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VideoList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VoiceList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Avatars.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Voices.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingInterruptRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingNewRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStopRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingTaskRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.UserClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.Authorizations..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.Constructors..g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.V1VideoStatusGet.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.AssetsClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1AvatarList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VideoList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VoiceList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Avatars.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Voices.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingIceRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingInterruptRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingNewRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStartRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStopRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingTaskRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.UserClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.g.verified.cs create mode 100644 src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs create mode 100644 src/tests/AutoSDK.UnitTests/Snapshots/heygen/ResolvedSchemas/_.verified.txt create mode 100644 src/tests/AutoSDK.UnitTests/Snapshots/heygen/Schemas/_.verified.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86325f5a29..249150ef25 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,6 +41,7 @@ jobs: - replicate.yaml - special-cases.yaml - together.yaml + - heygen.yaml steps: - name: Checkout uses: actions/checkout@v4 diff --git a/AutoSDK.sln b/AutoSDK.sln index 586f2ddd58..11148b40d7 100644 --- a/AutoSDK.sln +++ b/AutoSDK.sln @@ -45,6 +45,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "specs", "specs", "{7E829AE4 specs\assemblyai.yaml = specs\assemblyai.yaml specs\mystic.yaml = specs\mystic.yaml specs\security.yaml = specs\security.yaml + specs\heygen.yaml = specs\heygen.yaml EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoSDK.IntegrationTests.Cli", "src\tests\AutoSDK.IntegrationTests.Cli\AutoSDK.IntegrationTests.Cli.csproj", "{41F1B4D8-5F6F-40FB-A1C2-A5E6A4B62AA7}" diff --git a/specs/heygen.yaml b/specs/heygen.yaml new file mode 100644 index 0000000000..4a9da2f320 --- /dev/null +++ b/specs/heygen.yaml @@ -0,0 +1,923 @@ +openapi: 3.0.3 +info: + title: HeyGen API + description: >- + Welcome to the **HeyGen API** Postman Collection. This collection provides a + convenient way to interact with the HeyGen API directly from Postman. + + + **Documentation**: [https://docs.heygen.com](https://docs.heygen.com/) + + **Guides**: + [https://docs.heygen.com/docs
](https://docs.heygen.com/docs/quick-start)**API + Reference**: + [https://docs.heygen.com/reference](https://docs.heygen.com/reference/authentication-1) + + + ## Authorization + + + To send requests to the API endpoints, you must use a valid API token. You + can get your API token from the [Settings > API + ](https://app.heygen.com/settings?nav=API) page in your HeyGen account. + + + 1. In Postman, go to the **Environments** tab on the left panel. + + 2. Select the **My HeyGen API Environment** environment provided by HeyGen. + + 3. Update the `heygen-api-token` value with your current HeyGen API token. + + 4. Ensure **My HeyGen API Environment** is selected as the active + environment using the environment selector at the top right corner of + Postman. + + + ### 400 response + + + A 400 error response typically indicates that your request body is + corrupted. To avoid this, ensure that your request body is correctly + formatted and includes all necessary elements, such as closing parentheses. + + + ### **Need some help?** + + + If you need assistance, you can reach out to us through the following + channels: + + + - **Customer Support Chat:** Available in our web interface. + + - **Emails:** api@heygen.com, + [support@heygen.com](https://mailto:support@heygen.com) + + - **Community Discussions:** Check out our [discussions + channel](https://null) – there's a good chance our community has the answer + you're looking for. + version: 1.0.0 + contact: {} +servers: + - url: https://api.heygen.com + - url: https://upload.heygen.com +paths: + /v1/voice.list: + get: + tags: + - Lists + summary: v1/voice.list + description: v1/voice.list + operationId: v1VoiceList + responses: + '200': + description: '' + /v1/avatar.list: + get: + tags: + - Lists + summary: v1/avatar.list + description: v1/avatar.list + operationId: v1AvatarList + responses: + '200': + description: '' + /v2/voices: + get: + tags: + - Lists + summary: v2/voices + description: v2/voices + operationId: v2Voices + responses: + '200': + description: '' + /v2/avatars: + get: + tags: + - Lists + summary: v2/avatars + description: v2/avatars + operationId: v2Avatars + responses: + '200': + description: '' + /v1/video.list: + get: + tags: + - Lists + summary: v1/video.list + description: v1/video.list + operationId: v1VideoList + responses: + '200': + description: '' + /v2/video/generate: + post: + tags: + - Create Video API + summary: v2/video/generate + description: >- + Generated Video: + [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545) + + + + operationId: v2VideoGenerate + requestBody: + content: + application/json: + schema: + type: object + properties: + aspect_ratio: + nullable: true + example: null + callback_id: + nullable: true + example: null + dimension: + type: object + properties: + height: + type: number + example: 720 + width: + type: number + example: 1280 + test: + type: boolean + example: true + title: + type: string + example: My Title + video_inputs: + type: array + items: + type: object + properties: + character: + type: object + properties: + avatar_id: + type: string + example: Kristin_public_3_20240108 + avatar_style: + type: string + example: normal + type: + type: string + example: avatar + voice: + type: object + properties: + input_text: + type: string + example: >- + Welcome to the new era of video creation with + HeyGen! Simply type your script to get started! + type: + type: string + example: text + voice_id: + type: string + example: 2f72ee82b83d4b00af16c4771d611752 + example: + - character: + avatar_id: Kristin_public_3_20240108 + avatar_style: normal + type: avatar + voice: + input_text: >- + Welcome to the new era of video creation with HeyGen! + Simply type your script to get started! + type: text + voice_id: 2f72ee82b83d4b00af16c4771d611752 + examples: + v2/video/generate: + value: + aspect_ratio: null + callback_id: null + dimension: + height: 720 + width: 1280 + test: true + title: My Title + video_inputs: + - character: + avatar_id: Kristin_public_3_20240108 + avatar_style: normal + type: avatar + voice: + input_text: >- + Welcome to the new era of video creation with HeyGen! + Simply type your script to get started! + type: text + voice_id: 2f72ee82b83d4b00af16c4771d611752 + responses: + '200': + description: '' + /v1/video.delete: + delete: + tags: + - Create Video API + summary: v1/video.delete + description: v1/video.delete + operationId: v1VideoDelete + parameters: + - name: video_id + in: query + schema: + type: string + example: + responses: + '200': + description: '' + /v2/templates: + get: + tags: + - Template API + summary: v2/templates + description: v2/templates + operationId: v2Templates + responses: + '200': + description: '' + /v2/template/: + get: + tags: + - Template API + summary: v2/template/ + description: v2/template/ + operationId: v2TemplateId + responses: + '200': + description: '' + /v2/template//generate: + post: + tags: + - Template API + summary: v2/template/generate + description: >- + Generated Video: + [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75) + + + + operationId: v2TemplateGenerate + requestBody: + content: + application/json: + schema: + type: object + properties: + caption: + type: boolean + example: false + dimension: + type: object + properties: + height: + type: number + example: 720 + width: + type: number + example: 1280 + test: + type: boolean + example: false + title: + type: string + example: New Video + variables: + type: object + properties: + first_name: + type: object + properties: + name: + type: string + example: first_name + properties: + type: object + properties: + content: + type: string + example: John + type: + type: string + example: text + examples: + v2/template/generate: + value: + caption: false + dimension: + height: 720 + width: 1280 + test: false + title: New Video + variables: + first_name: + name: first_name + properties: + content: John + type: text + responses: + '200': + description: '' + /v2/video_translate/target_languages: + get: + tags: + - Video Translate API + summary: v2/video_translate/target_languages + description: v2/video_translate/target_languages + operationId: v2VideoTranslateTargetLanguages + requestBody: + content: + application/json: + examples: + v2/video_translate/target_languages: + value: '' + responses: + '200': + description: '' + /v2/video_translate: + post: + tags: + - Video Translate API + summary: v2/video_translate + description: >- + Generated Video: + [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) + operationId: v2VideoTranslate + requestBody: + content: + application/json: + schema: + type: object + properties: + output_language: + type: string + example: English - American Accent + speaker_num: + type: number + example: 1 + title: + type: string + example: My Title + translate_audio_only: + type: boolean + example: false + video_url: + type: string + example: https://static.heygen.ai/heygen/asset/originalnew.mp4 + examples: + v2/video_translate: + value: + output_language: English - American Accent + speaker_num: 1 + title: My Title + translate_audio_only: false + video_url: https://static.heygen.ai/heygen/asset/originalnew.mp4 + responses: + '200': + description: '' + /v2/video_translate/: + get: + tags: + - Video Translate API + summary: v2/video_translate/ (status) + description: v2/video_translate/ (status) + operationId: v2VideoTranslateIdStatus + requestBody: + content: + application/json: + examples: + v2/video_translate/ (status): + value: '' + responses: + '200': + description: '' + /v1/streaming.new: + post: + tags: + - Streaming API + summary: streaming.new + description: streaming.new + operationId: streamingNew + requestBody: + content: + application/json: + schema: + type: object + properties: + quality: + type: string + example: medium + examples: + streaming.new: + value: + quality: medium + responses: + '200': + description: '' + /v1/streaming.start: + post: + tags: + - Streaming API + summary: streaming.start + description: streaming.start + operationId: streamingStart + requestBody: + content: + application/json: + schema: + type: object + properties: + sdp: + type: object + properties: + sdp: + type: string + example: "v=0\r\no=- 865306769317114273 1711711067 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 5B:57:56:56:47:37:A2:76:46:2B:FA:72:6D:61:1D:70:98:8A:4B:8D:BD:E9:54:7E:0E:8D:86:7B:13:BD:5B:B3\r\na=extmap-allow-mixed\r\na=group:BUNDLE 0 1 2\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=mid:0\r\na=ice-ufrag:WGLlXrCpTGFDczaD\r\na=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=ssrc:771866534 cname:pion\r\na=ssrc:771866534 msid:pion video\r\na=ssrc:771866534 mslabel:pion\r\na=ssrc:771866534 label:video\r\na=msid:pion video\r\na=sendonly\r\na=candidate:211536166 1 udp 2130706431 192.168.95.148 58919 typ host\r\na=candidate:211536166 2 udp 2130706431 192.168.95.148 58919 typ host\r\na=candidate:233762139 1 udp 2130706431 172.17.0.1 39783 typ host\r\na=candidate:233762139 2 udp 2130706431 172.17.0.1 39783 typ host\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127\r\na=candidate:551173388 1 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018\r\na=candidate:551173388 2 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018\r\na=candidate:551173388 1 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276\r\na=candidate:551173388 2 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276\r\na=candidate:551173388 1 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224\r\na=candidate:551173388 2 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224\r\na=end-of-candidates\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=mid:1\r\na=ice-ufrag:WGLlXrCpTGFDczaD\r\na=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:4043859165 cname:pion\r\na=ssrc:4043859165 msid:pion audio\r\na=ssrc:4043859165 mslabel:pion\r\na=ssrc:4043859165 label:audio\r\na=msid:pion audio\r\na=sendrecv\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=mid:2\r\na=sendrecv\r\na=sctp-port:5000\r\na=ice-ufrag:WGLlXrCpTGFDczaD\r\na=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE\r\n" + type: + type: string + example: offer + session_id: + type: string + example: f8c1f5bd-edbd-11ee-ac61-06daf6be75b4 + examples: + streaming.start: + value: + sdp: + sdp: "v=0\r\no=- 865306769317114273 1711711067 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 5B:57:56:56:47:37:A2:76:46:2B:FA:72:6D:61:1D:70:98:8A:4B:8D:BD:E9:54:7E:0E:8D:86:7B:13:BD:5B:B3\r\na=extmap-allow-mixed\r\na=group:BUNDLE 0 1 2\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=mid:0\r\na=ice-ufrag:WGLlXrCpTGFDczaD\r\na=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=ssrc:771866534 cname:pion\r\na=ssrc:771866534 msid:pion video\r\na=ssrc:771866534 mslabel:pion\r\na=ssrc:771866534 label:video\r\na=msid:pion video\r\na=sendonly\r\na=candidate:211536166 1 udp 2130706431 192.168.95.148 58919 typ host\r\na=candidate:211536166 2 udp 2130706431 192.168.95.148 58919 typ host\r\na=candidate:233762139 1 udp 2130706431 172.17.0.1 39783 typ host\r\na=candidate:233762139 2 udp 2130706431 172.17.0.1 39783 typ host\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574\r\na=candidate:2409875042 1 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127\r\na=candidate:2409875042 2 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127\r\na=candidate:551173388 1 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018\r\na=candidate:551173388 2 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018\r\na=candidate:551173388 1 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276\r\na=candidate:551173388 2 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276\r\na=candidate:551173388 1 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224\r\na=candidate:551173388 2 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224\r\na=end-of-candidates\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=mid:1\r\na=ice-ufrag:WGLlXrCpTGFDczaD\r\na=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:4043859165 cname:pion\r\na=ssrc:4043859165 msid:pion audio\r\na=ssrc:4043859165 mslabel:pion\r\na=ssrc:4043859165 label:audio\r\na=msid:pion audio\r\na=sendrecv\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=mid:2\r\na=sendrecv\r\na=sctp-port:5000\r\na=ice-ufrag:WGLlXrCpTGFDczaD\r\na=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE\r\n" + type: offer + session_id: f8c1f5bd-edbd-11ee-ac61-06daf6be75b4 + responses: + '200': + description: '' + /v1/streaming.list: + get: + tags: + - Streaming API + summary: streaming.list + description: streaming.list + operationId: streamingList + requestBody: + content: + text/plain: + examples: + streaming.list: + value: '' + responses: + '200': + description: '' + /v1/streaming.ice: + post: + tags: + - Streaming API + summary: streaming.ice + description: streaming.ice + operationId: streamingIce + requestBody: + content: + application/json: + schema: + type: object + properties: + candidate: + type: object + properties: + candidate: + type: string + example: + sdpMLineIndex: + type: string + example: + sdpMid: + type: string + example: + usernameFragment: + type: string + example: + session_id: + type: string + example: + examples: + streaming.ice: + value: + candidate: + candidate: + sdpMLineIndex: + sdpMid: + usernameFragment: + session_id: + responses: + '200': + description: '' + /v1/streaming.task: + post: + tags: + - Streaming API + summary: streaming.task + description: streaming.task + operationId: streamingTask + requestBody: + content: + application/json: + schema: + type: object + properties: + session_id: + type: string + example: + text: + type: string + example: Hey, there! + examples: + streaming.task: + value: + session_id: + text: Hey, there! + responses: + '200': + description: '' + /v1/streaming.stop: + post: + tags: + - Streaming API + summary: streaming.stop + description: streaming.stop + operationId: streamingStop + requestBody: + content: + application/json: + schema: + type: object + properties: + session_id: + type: string + example: + examples: + streaming.stop: + value: + session_id: + responses: + '200': + description: '' + /v1/streaming.interrupt: + post: + tags: + - Streaming API + summary: streaming.interrupt + description: >- + This is endpoint is to interrupt a speaking avatar. If the avatar is not + speaking, it doesn't do anything. + operationId: streamingInterrupt + requestBody: + content: + application/json: + schema: + type: object + properties: + session_id: + type: string + example: + examples: + streaming.interrupt: + value: + session_id: + responses: + '200': + description: '' + /v1/streaming.create_token: + post: + tags: + - Streaming API + summary: streaming.create_token + description: streaming.create_token + operationId: streamingCreateToken + requestBody: + content: + application/json: + schema: + type: object + properties: {} + examples: + streaming.create_token: + value: {} + responses: + '200': + description: '' + /v1/streaming/avatar.list: + get: + tags: + - Streaming API + summary: streaming/avatar.list + description: streaming/avatar.list + operationId: streamingAvatarList + requestBody: + content: + text/plain: + examples: + streaming/avatar.list: + value: '' + responses: + '200': + description: '' + /v1/webhook/webhook.list: + get: + tags: + - Webhooks + summary: v1/webhook/webhook.list + description: v1/webhook/webhook.list + operationId: v1WebhookWebhookList + responses: + '200': + description: '' + /v1/webhook/endpoint.add: + post: + tags: + - Webhooks + summary: v1/webhook/endpoint.add + description: v1/webhook/endpoint.add + operationId: v1WebhookEndpointAdd + requestBody: + content: + application/json: + schema: + type: object + properties: + events: + type: array + items: {} + example: [] + url: + type: string + example: + examples: + v1/webhook/endpoint.add: + value: + events: [] + url: + responses: + '200': + description: '' + /v1/webhook/endpoint.delete: + delete: + tags: + - Webhooks + summary: v1/webhook/endpoint.delete + description: v1/webhook/endpoint.delete + operationId: v1WebhookEndpointDelete + parameters: + - name: endpoint_id + in: query + schema: + type: string + example: + responses: + '200': + description: '' + /v1/webhook/endpoint.list: + get: + tags: + - Webhooks + summary: v1/webhook/endpoint.list + description: v1/webhook/endpoint.list + operationId: v1WebhookEndpointList + responses: + '200': + description: '' + /v1/talking_photo.list: + get: + tags: + - Talking Photo + summary: v1/talking_photo.list + description: v1/talking_photo.list + operationId: v1TalkingPhotoList + responses: + '200': + description: '' + /v1/talking_photo: + post: + tags: + - Talking Photo + summary: v1/talking_photo (upload) + description: v1/talking_photo (upload) + operationId: v1TalkingPhotoUpload + requestBody: + content: {} + responses: + '200': + description: '' + /v2/talking_photo/: + delete: + tags: + - Talking Photo + summary: v2/talking_photo/ (delete) + description: v2/talking_photo/ (delete) + operationId: v2TalkingPhotoIdDelete + responses: + '200': + description: '' + /v1/personalized_video/add_contact: + post: + tags: + - Personalized Video + summary: personalized_video/add_contact + description: personalized_video/add_contact + operationId: personalizedVideoAddContact + requestBody: + content: + application/json: + schema: + type: object + properties: + project_id: + type: string + example: + variables_list: + type: array + items: + type: object + properties: + email: + type: string + example: john@mail.com + first_name: + type: string + example: John + example: + - email: john@mail.com + first_name: John + examples: + personalized_video/add_contact: + value: + project_id: + variables_list: + - email: john@mail.com + first_name: John + responses: + '200': + description: '' + /v1/personalized_video/audience/detail: + get: + tags: + - Personalized Video + summary: personalized_video/audience/detail + description: personalized_video/audience/detail + operationId: personalizedVideoAudienceDetail + parameters: + - name: id + in: query + schema: + type: string + example: + responses: + '200': + description: '' + /v1/personalized_video/project/detail: + get: + tags: + - Personalized Video + summary: personalized_video/project/detail + description: personalized_video/project/detail + operationId: personalizedVideoProjectDetail + parameters: + - name: id + in: query + schema: + type: string + example: + responses: + '200': + description: '' + /v2/user/remaining_quota: + get: + tags: + - User + summary: v2/user/remaining_quota + description: v2/user/remaining_quota + operationId: v2UserRemainingQuota + responses: + '200': + description: '' + /v1/asset: + post: + tags: + - Assets + summary: v1/asset (upload) + description: v1/asset (upload) + operationId: v1AssetUpload + requestBody: + content: {} + responses: + '200': + description: '' + /v1/video_status.get: + get: + summary: v1/video_status.get + description: v1/video_status.get + operationId: v1VideoStatusGet + parameters: + - name: video_id + in: query + schema: + type: string + example: + responses: + '200': + description: '' +components: + securitySchemes: + apiKey: + type: apiKey + name: X-Api-Key + in: header +security: + - apiKey: [] +tags: + - name: Lists + - name: Create Video API + description: >- + Create personalized avatar videos with ease using the **HeyGen API**. By + selecting an avatar and a voice, you can create engaging videos for + various purposes. 🌟 + + + **Guide**: + [https://docs.heygen.com/docs/create-video
](https://docs.heygen.com/docs/create-video)**Reference**: + [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2) + - name: Template API + description: >- + Templates enable you to add and customize existing text, images, videos, + audios (coming soon), voices and avatars, while avatar videos consist only + of avatars without these elements. If you plan to use it within a workflow + and need richer content, templates are likely a better fit for your use + case compared to simple talking avatar videos. 🌟 + + + **Quick Comparison:** + + + - **Avatar Videos:** Avatar videos are centered around avatars delivering + content without any additional elements. They are ideal for + straightforward, avatar-focused communication. + + - **Template Videos:** In contrast, template videos offer a wide canvas + for creativity. They enable you to customize existing text, images, + videos, audios, voices and avatars seamlessly. If you need a richer, more + versatile content format for your workflow, templates are the perfect + choice. + + + **Guide**: + [https://docs.heygen.com/docs/generate-video-from-template-v2](https://docs.heygen.com/docs/generate-video-from-template-v2) + + **Reference**: + [https://docs.heygen.com/reference/generate-from-template-v2](https://docs.heygen.com/reference/generate-from-template-v2)[](https://docs.heygen.com/reference/create-an-avatar-video-v2) + - name: Video Translate API + description: "The\_[Video Translate](https://labs.heygen.com/video-translate)\_by HeyGen\_provides a powerful solution for effortlessly translating videos, integrating natural voice cloning and authentic speaking styles seamlessly. Now, you can harness its capabilities programmatically through the\_**Video Translate API**!\n\n**Guide**: [https://docs.heygen.com/docs/video-translate-api
](https://docs.heygen.com/docs/video-translate-api)**Reference**: [https://docs.heygen.com/reference/video-translate](https://docs.heygen.com/reference/video-translate)" + - name: Streaming API + description: >- + HeyGen's **Streaming API** allows developers to seamlessly integrate + dynamic digital avatars into their applications for immersive and + interactive user experiences. With this API, you can create _virtual + assistants, real-time training simulations,_ and more, with a focus on + real-time, low-latency communication between _users_ and _avatars_ with + power of WebRTC. + + + **Guide**: + [https://docs.heygen.com/docs/streaming-api
](https://docs.heygen.com/docs/streaming-api)**Reference**: + [https://docs.heygen.com/reference/new-session](https://docs.heygen.com/reference/new-session) + - name: Webhooks + description: "Webhook events are how the\_**HeyGen**\_notifies your\__endpoints_\_when a variety of interactions or events happen, including when avatar video processing\__succeeds_\_or\__fails_. Webhook events are sent by HeyGen as POST requests to your webhook endpoint.\n\n**Guide**: [https://docs.heygen.com/docs/using-heygens-webhook-events
](https://docs.heygen.com/docs/using-heygens-webhook-events)**Reference**: [https://docs.heygen.com/reference/add-a-webhook-endpoint](https://docs.heygen.com/reference/add-a-webhook-endpoint)" + - name: Talking Photo + description: >- + These API endpoints allow you to manage photo avatars in your account. + + + **Reference**: + [https://docs.heygen.com/reference/upload-talking-photo](https://docs.heygen.com/reference/upload-talking-photo) + - name: Personalized Video + description: "Import contacts into your HeyGen\_**Personalized Video**\_campaign.\_\n\n**Guide**: [https://docs.heygen.com/docs/import-contacts-via-api](https://docs.heygen.com/docs/import-contacts-via-api) \nReference: [https://docs.heygen.com/reference/add-contact](https://docs.heygen.com/reference/add-contact)" + - name: User + description: >- + Obtain information about your account. + + + **Reference**: + [https://docs.heygen.com/reference/get-remaining-quota-v2](https://docs.heygen.com/reference/get-remaining-quota-v2) + - name: Assets + description: >- + Upload an image or video asset to your account. + + + **Reference**: + [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1) diff --git a/src/libs/AutoSDK/Extensions/OpenApiExtensions.cs b/src/libs/AutoSDK/Extensions/OpenApiExtensions.cs index 9e33a7fbd8..95e1700962 100644 --- a/src/libs/AutoSDK/Extensions/OpenApiExtensions.cs +++ b/src/libs/AutoSDK/Extensions/OpenApiExtensions.cs @@ -288,6 +288,7 @@ public static string ClearForXml(this string text) text = text ?? throw new ArgumentNullException(nameof(text)); return text + .Replace("\r\n", "\n") .Replace("&", "&") .Replace("<", "<") .Replace(">", ">"); diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/Tests.SdkGenerator_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.Authorizations..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.Authorizations..g.verified.cs new file mode 100644 index 0000000000..e66b99969f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/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("X-Api-Key", apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.Constructors..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.Constructors..g.verified.cs new file mode 100644 index 0000000000..3bdbd47b17 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/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/heygen/NewtonsoftJson/_#G.Api.V1VideoStatusGet.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.V1VideoStatusGet.g.verified.cs new file mode 100644 index 0000000000..c455f58ef4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.V1VideoStatusGet.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.Api.V1VideoStatusGet.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1VideoStatusGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? videoId); + partial void PrepareV1VideoStatusGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? videoId); + partial void ProcessV1VideoStatusGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/video_status.get
+ /// v1/video_status.get + ///
+ /// + /// Example: <video_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VideoStatusGetAsync( + string? videoId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VideoStatusGetArguments( + httpClient: _httpClient, + videoId: ref videoId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/video_status.get?video_id={videoId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VideoStatusGetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + videoId: videoId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1VideoStatusGetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..be398f7e60 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Api.g.verified.cs @@ -0,0 +1,152 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// Welcome to the **HeyGen API** Postman Collection. This collection provides a convenient way to interact with the HeyGen API directly from Postman.
+ /// **Documentation**: [https://docs.heygen.com](https://docs.heygen.com/)
+ /// **Guides**: [https://docs.heygen.com/docs<br>](https://docs.heygen.com/docs/quick-start)**API Reference**: [https://docs.heygen.com/reference](https://docs.heygen.com/reference/authentication-1)
+ /// ## Authorization
+ /// To send requests to the API endpoints, you must use a valid API token. You can get your API token from the [Settings &gt; API ](https://app.heygen.com/settings?nav=API) page in your HeyGen account.
+ /// 1. In Postman, go to the **Environments** tab on the left panel.
+ ///
+ /// 2. Select the **My HeyGen API Environment** environment provided by HeyGen.
+ ///
+ /// 3. Update the `heygen-api-token` value with your current HeyGen API token.
+ ///
+ /// 4. Ensure **My HeyGen API Environment** is selected as the active environment using the environment selector at the top right corner of Postman.
+ ///
+ /// ### 400 response
+ /// A 400 error response typically indicates that your request body is corrupted. To avoid this, ensure that your request body is correctly formatted and includes all necessary elements, such as closing parentheses.
+ /// ### **Need some help?**
+ /// If you need assistance, you can reach out to us through the following channels:
+ /// - **Customer Support Chat:** Available in our web interface.
+ ///
+ /// - **Emails:** api@heygen.com, [support@heygen.com](https://mailto:support@heygen.com)
+ ///
+ /// - **Community Discussions:** Check out our [discussions channel](https://null) – there's a good chance our community has the answer you're looking for.
+ /// 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::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// + /// + public ListsClient Lists => new ListsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Create personalized avatar videos with ease using the **HeyGen API**. By selecting an avatar and a voice, you can create engaging videos for various purposes. 🌟
+ /// **Guide**: [https://docs.heygen.com/docs/create-video
](https://docs.heygen.com/docs/create-video)**Reference**: [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2) + ///
+ public CreateVideoAPIClient CreateVideoAPI => new CreateVideoAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Templates enable you to add and customize existing text, images, videos, audios (coming soon), voices and avatars, while avatar videos consist only of avatars without these elements. If you plan to use it within a workflow and need richer content, templates are likely a better fit for your use case compared to simple talking avatar videos. 🌟
+ /// **Quick Comparison:**
+ /// - **Avatar Videos:** Avatar videos are centered around avatars delivering content without any additional elements. They are ideal for straightforward, avatar-focused communication.
+ ///
+ /// - **Template Videos:** In contrast, template videos offer a wide canvas for creativity. They enable you to customize existing text, images, videos, audios, voices and avatars seamlessly. If you need a richer, more versatile content format for your workflow, templates are the perfect choice.
+ ///
+ /// **Guide**: [https://docs.heygen.com/docs/generate-video-from-template-v2](https://docs.heygen.com/docs/generate-video-from-template-v2)
+ /// **Reference**: [https://docs.heygen.com/reference/generate-from-template-v2](https://docs.heygen.com/reference/generate-from-template-v2)[](https://docs.heygen.com/reference/create-an-avatar-video-v2) + ///
+ public TemplateAPIClient TemplateAPI => new TemplateAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// The [Video Translate](https://labs.heygen.com/video-translate) by HeyGen provides a powerful solution for effortlessly translating videos, integrating natural voice cloning and authentic speaking styles seamlessly. Now, you can harness its capabilities programmatically through the **Video Translate API**!
+ /// **Guide**: [https://docs.heygen.com/docs/video-translate-api
](https://docs.heygen.com/docs/video-translate-api)**Reference**: [https://docs.heygen.com/reference/video-translate](https://docs.heygen.com/reference/video-translate) + ///
+ public VideoTranslateAPIClient VideoTranslateAPI => new VideoTranslateAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// HeyGen's **Streaming API** allows developers to seamlessly integrate dynamic digital avatars into their applications for immersive and interactive user experiences. With this API, you can create _virtual assistants, real-time training simulations,_ and more, with a focus on real-time, low-latency communication between _users_ and _avatars_ with power of WebRTC.
+ /// **Guide**: [https://docs.heygen.com/docs/streaming-api
](https://docs.heygen.com/docs/streaming-api)**Reference**: [https://docs.heygen.com/reference/new-session](https://docs.heygen.com/reference/new-session) + ///
+ public StreamingAPIClient StreamingAPI => new StreamingAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Webhook events are how the **HeyGen** notifies your _endpoints_ when a variety of interactions or events happen, including when avatar video processing _succeeds_ or _fails_. Webhook events are sent by HeyGen as POST requests to your webhook endpoint.
+ /// **Guide**: [https://docs.heygen.com/docs/using-heygens-webhook-events
](https://docs.heygen.com/docs/using-heygens-webhook-events)**Reference**: [https://docs.heygen.com/reference/add-a-webhook-endpoint](https://docs.heygen.com/reference/add-a-webhook-endpoint) + ///
+ public WebhooksClient Webhooks => new WebhooksClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// These API endpoints allow you to manage photo avatars in your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-talking-photo](https://docs.heygen.com/reference/upload-talking-photo) + ///
+ public TalkingPhotoClient TalkingPhoto => new TalkingPhotoClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Import contacts into your HeyGen **Personalized Video** campaign. 
+ /// **Guide**: [https://docs.heygen.com/docs/import-contacts-via-api](https://docs.heygen.com/docs/import-contacts-via-api)
+ /// Reference: [https://docs.heygen.com/reference/add-contact](https://docs.heygen.com/reference/add-contact) + ///
+ public PersonalizedVideoClient PersonalizedVideo => new PersonalizedVideoClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Obtain information about your account.
+ /// **Reference**: [https://docs.heygen.com/reference/get-remaining-quota-v2](https://docs.heygen.com/reference/get-remaining-quota-v2) + ///
+ public UserClient User => new UserClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Upload an image or video asset to your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1) + ///
+ public AssetsClient Assets => new AssetsClient(_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, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs new file mode 100644 index 0000000000..74159ab3f6 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.AssetsClient.V1AssetUpload.g.cs + +#nullable enable + +namespace G +{ + public partial class AssetsClient + { + partial void PrepareV1AssetUploadArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1AssetUploadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1AssetUploadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/asset (upload)
+ /// v1/asset (upload) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AssetUploadAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1AssetUploadArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/asset", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1AssetUploadRequest( + 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); + ProcessV1AssetUploadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.AssetsClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.AssetsClient.g.verified.cs new file mode 100644 index 0000000000..030ef72adc --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.AssetsClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.AssetsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Upload an image or video asset to your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1)
+ /// 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 AssetsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the AssetsClient. + /// 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 AssetsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs new file mode 100644 index 0000000000..5a4d0e3b65 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.CreateVideoAPIClient.V1VideoDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class CreateVideoAPIClient + { + partial void PrepareV1VideoDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? videoId); + partial void PrepareV1VideoDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? videoId); + partial void ProcessV1VideoDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/video.delete
+ /// v1/video.delete + ///
+ /// + /// Example: <video_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VideoDeleteAsync( + string? videoId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VideoDeleteArguments( + httpClient: _httpClient, + videoId: ref videoId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/video.delete?video_id={videoId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VideoDeleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + videoId: videoId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1VideoDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs new file mode 100644 index 0000000000..044c1d6582 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs @@ -0,0 +1,115 @@ +//HintName: G.CreateVideoAPIClient.V2VideoGenerate.g.cs + +#nullable enable + +namespace G +{ + public partial class CreateVideoAPIClient + { + partial void PrepareV2VideoGenerateArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V2VideoGenerateRequest request); + partial void PrepareV2VideoGenerateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V2VideoGenerateRequest request); + partial void ProcessV2VideoGenerateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video/generate
+ /// Generated Video: [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545)
+ /// <img src="https://resource.heygen.ai/video/gifs/67cd13935445457eaa99040070bdb545.gif" alt=""> + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoGenerateAsync( + global::G.V2VideoGenerateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV2VideoGenerateArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video/generate", 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); + PrepareV2VideoGenerateRequest( + 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); + ProcessV2VideoGenerateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v2/video/generate
+ /// Generated Video: [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545)
+ /// <img src="https://resource.heygen.ai/video/gifs/67cd13935445457eaa99040070bdb545.gif" alt=""> + ///
+ /// + /// + /// + /// + /// Example: true + /// + /// + /// Example: My Title + /// + /// + /// Example: [] + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoGenerateAsync( + global::G.V2VideoGenerateRequestAspectRatio? aspectRatio = default, + global::G.V2VideoGenerateRequestCallbackId? callbackId = default, + global::G.V2VideoGenerateRequestDimension? dimension = default, + bool test = default, + string? title = default, + global::System.Collections.Generic.IList? videoInputs = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V2VideoGenerateRequest + { + AspectRatio = aspectRatio, + CallbackId = callbackId, + Dimension = dimension, + Test = test, + Title = title, + VideoInputs = videoInputs, + }; + + await V2VideoGenerateAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.g.verified.cs new file mode 100644 index 0000000000..4c191c699f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.CreateVideoAPIClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.CreateVideoAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Create personalized avatar videos with ease using the **HeyGen API**. By selecting an avatar and a voice, you can create engaging videos for various purposes. 🌟
+ /// **Guide**: [https://docs.heygen.com/docs/create-video<br>](https://docs.heygen.com/docs/create-video)**Reference**: [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2)
+ /// 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 CreateVideoAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the CreateVideoAPIClient. + /// 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 CreateVideoAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.ListsClient.V1AvatarList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1AvatarList.g.verified.cs new file mode 100644 index 0000000000..a3e40ecf8f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1AvatarList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V1AvatarList.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV1AvatarListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1AvatarListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1AvatarListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/avatar.list
+ /// v1/avatar.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AvatarListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1AvatarListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/avatar.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1AvatarListRequest( + 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); + ProcessV1AvatarListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VideoList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VideoList.g.verified.cs new file mode 100644 index 0000000000..de7a1dc57a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VideoList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V1VideoList.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV1VideoListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1VideoListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1VideoListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/video.list
+ /// v1/video.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VideoListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VideoListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/video.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VideoListRequest( + 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); + ProcessV1VideoListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VoiceList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VoiceList.g.verified.cs new file mode 100644 index 0000000000..2bafc55b76 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V1VoiceList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V1VoiceList.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV1VoiceListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1VoiceListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1VoiceListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/voice.list
+ /// v1/voice.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VoiceListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VoiceListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voice.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VoiceListRequest( + 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); + ProcessV1VoiceListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Avatars.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Avatars.g.verified.cs new file mode 100644 index 0000000000..6b5ae4c599 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Avatars.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V2Avatars.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV2AvatarsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2AvatarsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2AvatarsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/avatars
+ /// v2/avatars + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2AvatarsAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2AvatarsArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/avatars", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2AvatarsRequest( + 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); + ProcessV2AvatarsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Voices.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Voices.g.verified.cs new file mode 100644 index 0000000000..5962adee38 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.V2Voices.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V2Voices.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV2VoicesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2VoicesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2VoicesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/voices
+ /// v2/voices + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VoicesAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2VoicesArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/voices", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2VoicesRequest( + 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); + ProcessV2VoicesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.g.verified.cs new file mode 100644 index 0000000000..9f76e6b1fc --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.ListsClient.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.ListsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// 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 ListsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ListsClient. + /// 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 ListsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs new file mode 100644 index 0000000000..fc47b21630 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.PersonalizedVideoAddContactRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PersonalizedVideoAddContactRequest + { + /// + /// Example: <project_id> + /// + [global::Newtonsoft.Json.JsonProperty("project_id")] + public string? ProjectId { get; set; } + + /// + /// Example: [] + /// + [global::Newtonsoft.Json.JsonProperty("variables_list")] + public global::System.Collections.Generic.IList? VariablesList { 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/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs new file mode 100644 index 0000000000..4f496ac2f9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PersonalizedVideoAddContactRequestVariablesListItem + { + /// + /// Example: john@mail.com + /// + [global::Newtonsoft.Json.JsonProperty("email")] + public string? Email { get; set; } + + /// + /// Example: John + /// + [global::Newtonsoft.Json.JsonProperty("first_name")] + public string? FirstName { 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/heygen/NewtonsoftJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs new file mode 100644 index 0000000000..9831dd910b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.StreamingCreateTokenRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingCreateTokenRequest + { + + /// + /// 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/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequest.g.verified.cs new file mode 100644 index 0000000000..1de32603f2 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.StreamingIceRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingIceRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("candidate")] + public global::G.StreamingIceRequestCandidate? Candidate { get; set; } + + /// + /// Example: <SESSION_ID> + /// + [global::Newtonsoft.Json.JsonProperty("session_id")] + public string? SessionId { 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/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs new file mode 100644 index 0000000000..d84be8f17e --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.StreamingIceRequestCandidate.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingIceRequestCandidate + { + /// + /// Example: <CANDIDATE> + /// + [global::Newtonsoft.Json.JsonProperty("candidate")] + public string? Candidate { get; set; } + + /// + /// Example: <SDP_MLINE_INDEX> + /// + [global::Newtonsoft.Json.JsonProperty("sdpMLineIndex")] + public string? SdpMLineIndex { get; set; } + + /// + /// Example: <SDP_MID> + /// + [global::Newtonsoft.Json.JsonProperty("sdpMid")] + public string? SdpMid { get; set; } + + /// + /// Example: <USERNAME_FRAGMENT> + /// + [global::Newtonsoft.Json.JsonProperty("usernameFragment")] + public string? UsernameFragment { 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/heygen/NewtonsoftJson/_#G.Models.StreamingInterruptRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingInterruptRequest.g.verified.cs new file mode 100644 index 0000000000..0951b342d0 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingInterruptRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.StreamingInterruptRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingInterruptRequest + { + /// + /// Example: <session_id> + /// + [global::Newtonsoft.Json.JsonProperty("session_id")] + public string? SessionId { 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/heygen/NewtonsoftJson/_#G.Models.StreamingNewRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingNewRequest.g.verified.cs new file mode 100644 index 0000000000..ec8d735784 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingNewRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.StreamingNewRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingNewRequest + { + /// + /// Example: medium + /// + [global::Newtonsoft.Json.JsonProperty("quality")] + public string? Quality { 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/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequest.g.verified.cs new file mode 100644 index 0000000000..79a807e883 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.StreamingStartRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingStartRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("sdp")] + public global::G.StreamingStartRequestSdp? Sdp { get; set; } + + /// + /// Example: f8c1f5bd-edbd-11ee-ac61-06daf6be75b4 + /// + [global::Newtonsoft.Json.JsonProperty("session_id")] + public string? SessionId { 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/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs new file mode 100644 index 0000000000..8ba1a86569 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.Models.StreamingStartRequestSdp.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingStartRequestSdp + { + /// + /// Example: v=0
+ /// o=- 865306769317114273 1711711067 IN IP4 0.0.0.0
+ /// s=-
+ /// t=0 0
+ /// a=fingerprint:sha-256 5B:57:56:56:47:37:A2:76:46:2B:FA:72:6D:61:1D:70:98:8A:4B:8D:BD:E9:54:7E:0E:8D:86:7B:13:BD:5B:B3
+ /// a=extmap-allow-mixed
+ /// a=group:BUNDLE 0 1 2
+ /// m=video 9 UDP/TLS/RTP/SAVPF 96
+ /// c=IN IP4 0.0.0.0
+ /// a=setup:actpass
+ /// a=mid:0
+ /// a=ice-ufrag:WGLlXrCpTGFDczaD
+ /// a=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE
+ /// a=rtcp-mux
+ /// a=rtcp-rsize
+ /// a=rtpmap:96 VP8/90000
+ /// a=ssrc:771866534 cname:pion
+ /// a=ssrc:771866534 msid:pion video
+ /// a=ssrc:771866534 mslabel:pion
+ /// a=ssrc:771866534 label:video
+ /// a=msid:pion video
+ /// a=sendonly
+ /// a=candidate:211536166 1 udp 2130706431 192.168.95.148 58919 typ host
+ /// a=candidate:211536166 2 udp 2130706431 192.168.95.148 58919 typ host
+ /// a=candidate:233762139 1 udp 2130706431 172.17.0.1 39783 typ host
+ /// a=candidate:233762139 2 udp 2130706431 172.17.0.1 39783 typ host
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127
+ /// a=candidate:551173388 1 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018
+ /// a=candidate:551173388 2 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018
+ /// a=candidate:551173388 1 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276
+ /// a=candidate:551173388 2 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276
+ /// a=candidate:551173388 1 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224
+ /// a=candidate:551173388 2 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224
+ /// a=end-of-candidates
+ /// m=audio 9 UDP/TLS/RTP/SAVPF 111
+ /// c=IN IP4 0.0.0.0
+ /// a=setup:actpass
+ /// a=mid:1
+ /// a=ice-ufrag:WGLlXrCpTGFDczaD
+ /// a=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE
+ /// a=rtcp-mux
+ /// a=rtcp-rsize
+ /// a=rtpmap:111 opus/48000/2
+ /// a=fmtp:111 minptime=10;useinbandfec=1
+ /// a=ssrc:4043859165 cname:pion
+ /// a=ssrc:4043859165 msid:pion audio
+ /// a=ssrc:4043859165 mslabel:pion
+ /// a=ssrc:4043859165 label:audio
+ /// a=msid:pion audio
+ /// a=sendrecv
+ /// m=application 9 UDP/DTLS/SCTP webrtc-datachannel
+ /// c=IN IP4 0.0.0.0
+ /// a=setup:actpass
+ /// a=mid:2
+ /// a=sendrecv
+ /// a=sctp-port:5000
+ /// a=ice-ufrag:WGLlXrCpTGFDczaD
+ /// a=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE + ///
+ [global::Newtonsoft.Json.JsonProperty("sdp")] + public string? Sdp { get; set; } + + /// + /// Example: offer + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public string? Type { 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/heygen/NewtonsoftJson/_#G.Models.StreamingStopRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStopRequest.g.verified.cs new file mode 100644 index 0000000000..d9702fb83c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingStopRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.StreamingStopRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingStopRequest + { + /// + /// Example: <session_id> + /// + [global::Newtonsoft.Json.JsonProperty("session_id")] + public string? SessionId { 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/heygen/NewtonsoftJson/_#G.Models.StreamingTaskRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingTaskRequest.g.verified.cs new file mode 100644 index 0000000000..0cb3e89a79 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.StreamingTaskRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.StreamingTaskRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingTaskRequest + { + /// + /// Example: <session_id> + /// + [global::Newtonsoft.Json.JsonProperty("session_id")] + public string? SessionId { get; set; } + + /// + /// Example: Hey, there! + /// + [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/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs new file mode 100644 index 0000000000..0c2947d5da --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V1WebhookEndpointAddRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1WebhookEndpointAddRequest + { + /// + /// Example: [] + /// + [global::Newtonsoft.Json.JsonProperty("events")] + public global::System.Collections.Generic.IList? Events { get; set; } + + /// + /// Example: <url> + /// + [global::Newtonsoft.Json.JsonProperty("url")] + public string? Url { 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/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs new file mode 100644 index 0000000000..d7379d1b5e --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1WebhookEndpointAddRequestEvent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1WebhookEndpointAddRequestEvent + { + + /// + /// 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/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs new file mode 100644 index 0000000000..9e2b9e8d80 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.V2TemplateGenerateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequest + { + /// + /// Example: false + /// + [global::Newtonsoft.Json.JsonProperty("caption")] + public bool Caption { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("dimension")] + public global::G.V2TemplateGenerateRequestDimension? Dimension { get; set; } + + /// + /// Example: false + /// + [global::Newtonsoft.Json.JsonProperty("test")] + public bool Test { get; set; } + + /// + /// Example: New Video + /// + [global::Newtonsoft.Json.JsonProperty("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("variables")] + public global::G.V2TemplateGenerateRequestVariables? Variables { 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/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs new file mode 100644 index 0000000000..053ecec4c9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V2TemplateGenerateRequestDimension.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestDimension + { + /// + /// Example: 720 + /// + [global::Newtonsoft.Json.JsonProperty("height")] + public double Height { get; set; } + + /// + /// Example: 1280 + /// + [global::Newtonsoft.Json.JsonProperty("width")] + public double Width { 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/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs new file mode 100644 index 0000000000..5a9280dabf --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.V2TemplateGenerateRequestVariables.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestVariables + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("first_name")] + public global::G.V2TemplateGenerateRequestVariablesFirstName? FirstName { 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/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs new file mode 100644 index 0000000000..5a954efc8f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.V2TemplateGenerateRequestVariablesFirstName.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestVariablesFirstName + { + /// + /// Example: first_name + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("properties")] + public global::G.V2TemplateGenerateRequestVariablesFirstNameProperties? Properties { get; set; } + + /// + /// Example: text + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public string? Type { 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/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs new file mode 100644 index 0000000000..dc8ab8c465 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestVariablesFirstNameProperties + { + /// + /// Example: John + /// + [global::Newtonsoft.Json.JsonProperty("content")] + public string? Content { 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/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs new file mode 100644 index 0000000000..2fb1206bae --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.V2VideoGenerateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("aspect_ratio")] + public global::G.V2VideoGenerateRequestAspectRatio? AspectRatio { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("callback_id")] + public global::G.V2VideoGenerateRequestCallbackId? CallbackId { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("dimension")] + public global::G.V2VideoGenerateRequestDimension? Dimension { get; set; } + + /// + /// Example: true + /// + [global::Newtonsoft.Json.JsonProperty("test")] + public bool Test { get; set; } + + /// + /// Example: My Title + /// + [global::Newtonsoft.Json.JsonProperty("title")] + public string? Title { get; set; } + + /// + /// Example: [] + /// + [global::Newtonsoft.Json.JsonProperty("video_inputs")] + public global::System.Collections.Generic.IList? VideoInputs { 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/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs new file mode 100644 index 0000000000..3a17c55064 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V2VideoGenerateRequestAspectRatio.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestAspectRatio + { + + /// + /// 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/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs new file mode 100644 index 0000000000..5bf3631995 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V2VideoGenerateRequestCallbackId.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestCallbackId + { + + /// + /// 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/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs new file mode 100644 index 0000000000..8cb61aebff --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V2VideoGenerateRequestDimension.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestDimension + { + /// + /// Example: 720 + /// + [global::Newtonsoft.Json.JsonProperty("height")] + public double Height { get; set; } + + /// + /// Example: 1280 + /// + [global::Newtonsoft.Json.JsonProperty("width")] + public double Width { 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/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs new file mode 100644 index 0000000000..47e465dff8 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V2VideoGenerateRequestVideoInput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestVideoInput + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("character")] + public global::G.V2VideoGenerateRequestVideoInputCharacter? Character { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("voice")] + public global::G.V2VideoGenerateRequestVideoInputVoice? Voice { 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/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs new file mode 100644 index 0000000000..a204aad85a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.V2VideoGenerateRequestVideoInputCharacter.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestVideoInputCharacter + { + /// + /// Example: Kristin_public_3_20240108 + /// + [global::Newtonsoft.Json.JsonProperty("avatar_id")] + public string? AvatarId { get; set; } + + /// + /// Example: normal + /// + [global::Newtonsoft.Json.JsonProperty("avatar_style")] + public string? AvatarStyle { get; set; } + + /// + /// Example: avatar + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public string? Type { 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/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs new file mode 100644 index 0000000000..c960cdfd89 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.V2VideoGenerateRequestVideoInputVoice.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestVideoInputVoice + { + /// + /// Example: Welcome to the new era of video creation with HeyGen! Simply type your script to get started! + /// + [global::Newtonsoft.Json.JsonProperty("input_text")] + public string? InputText { get; set; } + + /// + /// Example: text + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public string? Type { get; set; } + + /// + /// Example: 2f72ee82b83d4b00af16c4771d611752 + /// + [global::Newtonsoft.Json.JsonProperty("voice_id")] + public string? VoiceId { 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/heygen/NewtonsoftJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs new file mode 100644 index 0000000000..965478b3aa --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.V2VideoTranslateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoTranslateRequest + { + /// + /// Example: English - American Accent + /// + [global::Newtonsoft.Json.JsonProperty("output_language")] + public string? OutputLanguage { get; set; } + + /// + /// Example: 1 + /// + [global::Newtonsoft.Json.JsonProperty("speaker_num")] + public double SpeakerNum { get; set; } + + /// + /// Example: My Title + /// + [global::Newtonsoft.Json.JsonProperty("title")] + public string? Title { get; set; } + + /// + /// Example: false + /// + [global::Newtonsoft.Json.JsonProperty("translate_audio_only")] + public bool TranslateAudioOnly { get; set; } + + /// + /// Example: https://static.heygen.ai/heygen/asset/originalnew.mp4 + /// + [global::Newtonsoft.Json.JsonProperty("video_url")] + public string? VideoUrl { 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/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs new file mode 100644 index 0000000000..b8cf893ee5 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs + +#nullable enable + +namespace G +{ + public partial class PersonalizedVideoClient + { + partial void PreparePersonalizedVideoAddContactArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.PersonalizedVideoAddContactRequest request); + partial void PreparePersonalizedVideoAddContactRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.PersonalizedVideoAddContactRequest request); + partial void ProcessPersonalizedVideoAddContactResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// personalized_video/add_contact
+ /// personalized_video/add_contact + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoAddContactAsync( + global::G.PersonalizedVideoAddContactRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePersonalizedVideoAddContactArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/personalized_video/add_contact", 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); + PreparePersonalizedVideoAddContactRequest( + 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); + ProcessPersonalizedVideoAddContactResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// personalized_video/add_contact
+ /// personalized_video/add_contact + ///
+ /// + /// Example: <project_id> + /// + /// + /// Example: [] + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoAddContactAsync( + string? projectId = default, + global::System.Collections.Generic.IList? variablesList = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.PersonalizedVideoAddContactRequest + { + ProjectId = projectId, + VariablesList = variablesList, + }; + + await PersonalizedVideoAddContactAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs new file mode 100644 index 0000000000..2182d1808a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs + +#nullable enable + +namespace G +{ + public partial class PersonalizedVideoClient + { + partial void PreparePersonalizedVideoAudienceDetailArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? id); + partial void PreparePersonalizedVideoAudienceDetailRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? id); + partial void ProcessPersonalizedVideoAudienceDetailResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// personalized_video/audience/detail
+ /// personalized_video/audience/detail + ///
+ /// + /// Example: <video-id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoAudienceDetailAsync( + string? id = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PreparePersonalizedVideoAudienceDetailArguments( + httpClient: _httpClient, + id: ref id); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/personalized_video/audience/detail?id={id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePersonalizedVideoAudienceDetailRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPersonalizedVideoAudienceDetailResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs new file mode 100644 index 0000000000..5472c0f669 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs + +#nullable enable + +namespace G +{ + public partial class PersonalizedVideoClient + { + partial void PreparePersonalizedVideoProjectDetailArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? id); + partial void PreparePersonalizedVideoProjectDetailRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? id); + partial void ProcessPersonalizedVideoProjectDetailResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// personalized_video/project/detail
+ /// personalized_video/project/detail + ///
+ /// + /// Example: <project-id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoProjectDetailAsync( + string? id = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PreparePersonalizedVideoProjectDetailArguments( + httpClient: _httpClient, + id: ref id); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/personalized_video/project/detail?id={id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePersonalizedVideoProjectDetailRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPersonalizedVideoProjectDetailResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.g.verified.cs new file mode 100644 index 0000000000..60293a4a4f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.PersonalizedVideoClient.g.verified.cs @@ -0,0 +1,67 @@ +//HintName: G.PersonalizedVideoClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Import contacts into your HeyGen **Personalized Video** campaign. 
+ /// **Guide**: [https://docs.heygen.com/docs/import-contacts-via-api](https://docs.heygen.com/docs/import-contacts-via-api)
+ /// Reference: [https://docs.heygen.com/reference/add-contact](https://docs.heygen.com/reference/add-contact)
+ /// 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 PersonalizedVideoClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the PersonalizedVideoClient. + /// 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 PersonalizedVideoClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..9ef159498a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/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/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs new file mode 100644 index 0000000000..b3ea579f98 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.StreamingAPIClient.StreamingAvatarList.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingAvatarListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareStreamingAvatarListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessStreamingAvatarListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming/avatar.list
+ /// streaming/avatar.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingAvatarListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareStreamingAvatarListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming/avatar.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareStreamingAvatarListRequest( + 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); + ProcessStreamingAvatarListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs new file mode 100644 index 0000000000..e450e80a0c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs @@ -0,0 +1,89 @@ +//HintName: G.StreamingAPIClient.StreamingCreateToken.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingCreateTokenArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingCreateTokenRequest request); + partial void PrepareStreamingCreateTokenRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingCreateTokenRequest request); + partial void ProcessStreamingCreateTokenResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.create_token
+ /// streaming.create_token + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingCreateTokenAsync( + global::G.StreamingCreateTokenRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingCreateTokenArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.create_token", 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); + PrepareStreamingCreateTokenRequest( + 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); + ProcessStreamingCreateTokenResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.create_token
+ /// streaming.create_token + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingCreateTokenAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingCreateTokenRequest + { + }; + + await StreamingCreateTokenAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs new file mode 100644 index 0000000000..2f6aa3b1c9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.StreamingAPIClient.StreamingIce.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingIceArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingIceRequest request); + partial void PrepareStreamingIceRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingIceRequest request); + partial void ProcessStreamingIceResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.ice
+ /// streaming.ice + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingIceAsync( + global::G.StreamingIceRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingIceArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.ice", 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); + PrepareStreamingIceRequest( + 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); + ProcessStreamingIceResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.ice
+ /// streaming.ice + ///
+ /// + /// + /// Example: <SESSION_ID> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingIceAsync( + global::G.StreamingIceRequestCandidate? candidate = default, + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingIceRequest + { + Candidate = candidate, + SessionId = sessionId, + }; + + await StreamingIceAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs new file mode 100644 index 0000000000..f674bc460c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs @@ -0,0 +1,94 @@ +//HintName: G.StreamingAPIClient.StreamingInterrupt.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingInterruptArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingInterruptRequest request); + partial void PrepareStreamingInterruptRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingInterruptRequest request); + partial void ProcessStreamingInterruptResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.interrupt
+ /// This is endpoint is to interrupt a speaking avatar. If the avatar is not speaking, it doesn't do anything. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingInterruptAsync( + global::G.StreamingInterruptRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingInterruptArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.interrupt", 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); + PrepareStreamingInterruptRequest( + 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); + ProcessStreamingInterruptResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.interrupt
+ /// This is endpoint is to interrupt a speaking avatar. If the avatar is not speaking, it doesn't do anything. + ///
+ /// + /// Example: <session_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingInterruptAsync( + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingInterruptRequest + { + SessionId = sessionId, + }; + + await StreamingInterruptAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs new file mode 100644 index 0000000000..82751b83ae --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.StreamingAPIClient.StreamingList.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareStreamingListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessStreamingListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.list
+ /// streaming.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareStreamingListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareStreamingListRequest( + 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); + ProcessStreamingListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs new file mode 100644 index 0000000000..c7f6352b0d --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs @@ -0,0 +1,94 @@ +//HintName: G.StreamingAPIClient.StreamingNew.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingNewArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingNewRequest request); + partial void PrepareStreamingNewRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingNewRequest request); + partial void ProcessStreamingNewResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.new
+ /// streaming.new + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingNewAsync( + global::G.StreamingNewRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingNewArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.new", 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); + PrepareStreamingNewRequest( + 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); + ProcessStreamingNewResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.new
+ /// streaming.new + ///
+ /// + /// Example: medium + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingNewAsync( + string? quality = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingNewRequest + { + Quality = quality, + }; + + await StreamingNewAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs new file mode 100644 index 0000000000..9ce6386137 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.StreamingAPIClient.StreamingStart.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingStartArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingStartRequest request); + partial void PrepareStreamingStartRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingStartRequest request); + partial void ProcessStreamingStartResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.start
+ /// streaming.start + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStartAsync( + global::G.StreamingStartRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingStartArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.start", 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); + PrepareStreamingStartRequest( + 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); + ProcessStreamingStartResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.start
+ /// streaming.start + ///
+ /// + /// + /// Example: f8c1f5bd-edbd-11ee-ac61-06daf6be75b4 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStartAsync( + global::G.StreamingStartRequestSdp? sdp = default, + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingStartRequest + { + Sdp = sdp, + SessionId = sessionId, + }; + + await StreamingStartAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs new file mode 100644 index 0000000000..7a3aaaa22c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs @@ -0,0 +1,94 @@ +//HintName: G.StreamingAPIClient.StreamingStop.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingStopArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingStopRequest request); + partial void PrepareStreamingStopRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingStopRequest request); + partial void ProcessStreamingStopResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.stop
+ /// streaming.stop + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStopAsync( + global::G.StreamingStopRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingStopArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.stop", 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); + PrepareStreamingStopRequest( + 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); + ProcessStreamingStopResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.stop
+ /// streaming.stop + ///
+ /// + /// Example: <session_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStopAsync( + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingStopRequest + { + SessionId = sessionId, + }; + + await StreamingStopAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs new file mode 100644 index 0000000000..4c5b4cfa44 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.StreamingAPIClient.StreamingTask.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingTaskArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingTaskRequest request); + partial void PrepareStreamingTaskRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingTaskRequest request); + partial void ProcessStreamingTaskResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.task
+ /// streaming.task + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingTaskAsync( + global::G.StreamingTaskRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingTaskArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.task", 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); + PrepareStreamingTaskRequest( + 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); + ProcessStreamingTaskResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.task
+ /// streaming.task + ///
+ /// + /// Example: <session_id> + /// + /// + /// Example: Hey, there! + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingTaskAsync( + string? sessionId = default, + string? text = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingTaskRequest + { + SessionId = sessionId, + Text = text, + }; + + await StreamingTaskAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.g.verified.cs new file mode 100644 index 0000000000..319d8e398c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.StreamingAPIClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.StreamingAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// HeyGen's **Streaming API** allows developers to seamlessly integrate dynamic digital avatars into their applications for immersive and interactive user experiences. With this API, you can create _virtual assistants, real-time training simulations,_ and more, with a focus on real-time, low-latency communication between _users_ and _avatars_ with power of WebRTC.
+ /// **Guide**: [https://docs.heygen.com/docs/streaming-api<br>](https://docs.heygen.com/docs/streaming-api)**Reference**: [https://docs.heygen.com/reference/new-session](https://docs.heygen.com/reference/new-session)
+ /// 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 StreamingAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the StreamingAPIClient. + /// 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 StreamingAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs new file mode 100644 index 0000000000..6b9fce35ec --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TalkingPhotoClient.V1TalkingPhotoList.g.cs + +#nullable enable + +namespace G +{ + public partial class TalkingPhotoClient + { + partial void PrepareV1TalkingPhotoListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1TalkingPhotoListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1TalkingPhotoListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/talking_photo.list
+ /// v1/talking_photo.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TalkingPhotoListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1TalkingPhotoListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/talking_photo.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1TalkingPhotoListRequest( + 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); + ProcessV1TalkingPhotoListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs new file mode 100644 index 0000000000..1307656567 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs + +#nullable enable + +namespace G +{ + public partial class TalkingPhotoClient + { + partial void PrepareV1TalkingPhotoUploadArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1TalkingPhotoUploadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1TalkingPhotoUploadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/talking_photo (upload)
+ /// v1/talking_photo (upload) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TalkingPhotoUploadAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1TalkingPhotoUploadArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/talking_photo", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1TalkingPhotoUploadRequest( + 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); + ProcessV1TalkingPhotoUploadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs new file mode 100644 index 0000000000..17890c1574 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class TalkingPhotoClient + { + partial void PrepareV2TalkingPhotoIdDeleteArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2TalkingPhotoIdDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2TalkingPhotoIdDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/talking_photo/<id> (delete)
+ /// v2/talking_photo/<id> (delete) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TalkingPhotoIdDeleteAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2TalkingPhotoIdDeleteArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/talking_photo/", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2TalkingPhotoIdDeleteRequest( + 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); + ProcessV2TalkingPhotoIdDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.g.verified.cs new file mode 100644 index 0000000000..a84091e0ef --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TalkingPhotoClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.TalkingPhotoClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// These API endpoints allow you to manage photo avatars in your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-talking-photo](https://docs.heygen.com/reference/upload-talking-photo)
+ /// 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 TalkingPhotoClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the TalkingPhotoClient. + /// 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 TalkingPhotoClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs new file mode 100644 index 0000000000..e0dbadf51b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs @@ -0,0 +1,112 @@ +//HintName: G.TemplateAPIClient.V2TemplateGenerate.g.cs + +#nullable enable + +namespace G +{ + public partial class TemplateAPIClient + { + partial void PrepareV2TemplateGenerateArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V2TemplateGenerateRequest request); + partial void PrepareV2TemplateGenerateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V2TemplateGenerateRequest request); + partial void ProcessV2TemplateGenerateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/template/generate
+ /// Generated Video: [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75)
+ /// <img src="https://resource.heygen.ai/video/gifs/7cba9d29d6db46b88471221fdbc4fb75.gif" alt=""> + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplateGenerateAsync( + global::G.V2TemplateGenerateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV2TemplateGenerateArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/template//generate", 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); + PrepareV2TemplateGenerateRequest( + 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); + ProcessV2TemplateGenerateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v2/template/generate
+ /// Generated Video: [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75)
+ /// <img src="https://resource.heygen.ai/video/gifs/7cba9d29d6db46b88471221fdbc4fb75.gif" alt=""> + ///
+ /// + /// Example: false + /// + /// + /// + /// Example: false + /// + /// + /// Example: New Video + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplateGenerateAsync( + bool caption = default, + global::G.V2TemplateGenerateRequestDimension? dimension = default, + bool test = default, + string? title = default, + global::G.V2TemplateGenerateRequestVariables? variables = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V2TemplateGenerateRequest + { + Caption = caption, + Dimension = dimension, + Test = test, + Title = title, + Variables = variables, + }; + + await V2TemplateGenerateAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs new file mode 100644 index 0000000000..38df3da06e --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TemplateAPIClient.V2TemplateId.g.cs + +#nullable enable + +namespace G +{ + public partial class TemplateAPIClient + { + partial void PrepareV2TemplateIdArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2TemplateIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2TemplateIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/template/<id>
+ /// v2/template/<id> + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplateIdAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2TemplateIdArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/template/", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2TemplateIdRequest( + 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); + ProcessV2TemplateIdResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs new file mode 100644 index 0000000000..793a0402c4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TemplateAPIClient.V2Templates.g.cs + +#nullable enable + +namespace G +{ + public partial class TemplateAPIClient + { + partial void PrepareV2TemplatesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2TemplatesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2TemplatesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/templates
+ /// v2/templates + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplatesAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2TemplatesArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/templates", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2TemplatesRequest( + 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); + ProcessV2TemplatesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.g.verified.cs new file mode 100644 index 0000000000..e661d4eddc --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.TemplateAPIClient.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.TemplateAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Templates enable you to add and customize existing text, images, videos, audios (coming soon), voices and avatars, while avatar videos consist only of avatars without these elements. If you plan to use it within a workflow and need richer content, templates are likely a better fit for your use case compared to simple talking avatar videos. 🌟
+ /// **Quick Comparison:**
+ /// - **Avatar Videos:** Avatar videos are centered around avatars delivering content without any additional elements. They are ideal for straightforward, avatar-focused communication.
+ ///
+ /// - **Template Videos:** In contrast, template videos offer a wide canvas for creativity. They enable you to customize existing text, images, videos, audios, voices and avatars seamlessly. If you need a richer, more versatile content format for your workflow, templates are the perfect choice.
+ ///
+ /// **Guide**: [https://docs.heygen.com/docs/generate-video-from-template-v2](https://docs.heygen.com/docs/generate-video-from-template-v2)
+ /// **Reference**: [https://docs.heygen.com/reference/generate-from-template-v2](https://docs.heygen.com/reference/generate-from-template-v2)[](https://docs.heygen.com/reference/create-an-avatar-video-v2)
+ /// 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 TemplateAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the TemplateAPIClient. + /// 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 TemplateAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs new file mode 100644 index 0000000000..4bca21ecde --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.UserClient.V2UserRemainingQuota.g.cs + +#nullable enable + +namespace G +{ + public partial class UserClient + { + partial void PrepareV2UserRemainingQuotaArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2UserRemainingQuotaRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2UserRemainingQuotaResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/user/remaining_quota
+ /// v2/user/remaining_quota + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2UserRemainingQuotaAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2UserRemainingQuotaArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/user/remaining_quota", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2UserRemainingQuotaRequest( + 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); + ProcessV2UserRemainingQuotaResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.UserClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.UserClient.g.verified.cs new file mode 100644 index 0000000000..41f8b6e877 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.UserClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.UserClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Obtain information about your account.
+ /// **Reference**: [https://docs.heygen.com/reference/get-remaining-quota-v2](https://docs.heygen.com/reference/get-remaining-quota-v2)
+ /// 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 UserClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the UserClient. + /// 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 UserClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs new file mode 100644 index 0000000000..c8921928f4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs @@ -0,0 +1,114 @@ +//HintName: G.VideoTranslateAPIClient.V2VideoTranslate.g.cs + +#nullable enable + +namespace G +{ + public partial class VideoTranslateAPIClient + { + partial void PrepareV2VideoTranslateArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V2VideoTranslateRequest request); + partial void PrepareV2VideoTranslateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V2VideoTranslateRequest request); + partial void ProcessV2VideoTranslateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video_translate
+ /// Generated Video: [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateAsync( + global::G.V2VideoTranslateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV2VideoTranslateArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video_translate", 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); + PrepareV2VideoTranslateRequest( + 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); + ProcessV2VideoTranslateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v2/video_translate
+ /// Generated Video: [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) + ///
+ /// + /// Example: English - American Accent + /// + /// + /// Example: 1 + /// + /// + /// Example: My Title + /// + /// + /// Example: false + /// + /// + /// Example: https://static.heygen.ai/heygen/asset/originalnew.mp4 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateAsync( + string? outputLanguage = default, + double speakerNum = default, + string? title = default, + bool translateAudioOnly = default, + string? videoUrl = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V2VideoTranslateRequest + { + OutputLanguage = outputLanguage, + SpeakerNum = speakerNum, + Title = title, + TranslateAudioOnly = translateAudioOnly, + VideoUrl = videoUrl, + }; + + await V2VideoTranslateAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs new file mode 100644 index 0000000000..4b052aec87 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.cs + +#nullable enable + +namespace G +{ + public partial class VideoTranslateAPIClient + { + partial void PrepareV2VideoTranslateIdStatusArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2VideoTranslateIdStatusRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2VideoTranslateIdStatusResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video_translate/<id> (status)
+ /// v2/video_translate/<id> (status) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateIdStatusAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2VideoTranslateIdStatusArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video_translate/", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2VideoTranslateIdStatusRequest( + 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); + ProcessV2VideoTranslateIdStatusResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs new file mode 100644 index 0000000000..7ba4a89258 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.cs + +#nullable enable + +namespace G +{ + public partial class VideoTranslateAPIClient + { + partial void PrepareV2VideoTranslateTargetLanguagesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2VideoTranslateTargetLanguagesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2VideoTranslateTargetLanguagesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video_translate/target_languages
+ /// v2/video_translate/target_languages + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateTargetLanguagesAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2VideoTranslateTargetLanguagesArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video_translate/target_languages", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2VideoTranslateTargetLanguagesRequest( + 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); + ProcessV2VideoTranslateTargetLanguagesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.g.verified.cs new file mode 100644 index 0000000000..35cf78ffb0 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.VideoTranslateAPIClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.VideoTranslateAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// The [Video Translate](https://labs.heygen.com/video-translate) by HeyGen provides a powerful solution for effortlessly translating videos, integrating natural voice cloning and authentic speaking styles seamlessly. Now, you can harness its capabilities programmatically through the **Video Translate API**!
+ /// **Guide**: [https://docs.heygen.com/docs/video-translate-api<br>](https://docs.heygen.com/docs/video-translate-api)**Reference**: [https://docs.heygen.com/reference/video-translate](https://docs.heygen.com/reference/video-translate)
+ /// 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 VideoTranslateAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the VideoTranslateAPIClient. + /// 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 VideoTranslateAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs new file mode 100644 index 0000000000..b232ed7fff --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.WebhooksClient.V1WebhookEndpointAdd.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookEndpointAddArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V1WebhookEndpointAddRequest request); + partial void PrepareV1WebhookEndpointAddRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V1WebhookEndpointAddRequest request); + partial void ProcessV1WebhookEndpointAddResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/endpoint.add
+ /// v1/webhook/endpoint.add + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointAddAsync( + global::G.V1WebhookEndpointAddRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1WebhookEndpointAddArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/webhook/endpoint.add", 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); + PrepareV1WebhookEndpointAddRequest( + 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); + ProcessV1WebhookEndpointAddResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v1/webhook/endpoint.add
+ /// v1/webhook/endpoint.add + ///
+ /// + /// Example: [] + /// + /// + /// Example: <url> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointAddAsync( + global::System.Collections.Generic.IList? events = default, + string? url = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V1WebhookEndpointAddRequest + { + Events = events, + Url = url, + }; + + await V1WebhookEndpointAddAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs new file mode 100644 index 0000000000..8558e24203 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.WebhooksClient.V1WebhookEndpointDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookEndpointDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? endpointId); + partial void PrepareV1WebhookEndpointDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? endpointId); + partial void ProcessV1WebhookEndpointDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/endpoint.delete
+ /// v1/webhook/endpoint.delete + ///
+ /// + /// Example: <endpoint_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointDeleteAsync( + string? endpointId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1WebhookEndpointDeleteArguments( + httpClient: _httpClient, + endpointId: ref endpointId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/webhook/endpoint.delete?endpoint_id={endpointId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1WebhookEndpointDeleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + endpointId: endpointId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1WebhookEndpointDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs new file mode 100644 index 0000000000..5f2e3241eb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.WebhooksClient.V1WebhookEndpointList.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookEndpointListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1WebhookEndpointListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1WebhookEndpointListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/endpoint.list
+ /// v1/webhook/endpoint.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1WebhookEndpointListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/webhook/endpoint.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1WebhookEndpointListRequest( + 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); + ProcessV1WebhookEndpointListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs new file mode 100644 index 0000000000..6dc4502f0c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.WebhooksClient.V1WebhookWebhookList.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookWebhookListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1WebhookWebhookListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1WebhookWebhookListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/webhook.list
+ /// v1/webhook/webhook.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookWebhookListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1WebhookWebhookListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/webhook/webhook.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1WebhookWebhookListRequest( + 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); + ProcessV1WebhookWebhookListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.g.verified.cs new file mode 100644 index 0000000000..7800b6c5b9 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#G.WebhooksClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.WebhooksClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Webhook events are how the **HeyGen** notifies your _endpoints_ when a variety of interactions or events happen, including when avatar video processing _succeeds_ or _fails_. Webhook events are sent by HeyGen as POST requests to your webhook endpoint.
+ /// **Guide**: [https://docs.heygen.com/docs/using-heygens-webhook-events<br>](https://docs.heygen.com/docs/using-heygens-webhook-events)**Reference**: [https://docs.heygen.com/reference/add-a-webhook-endpoint](https://docs.heygen.com/reference/add-a-webhook-endpoint)
+ /// 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 WebhooksClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the WebhooksClient. + /// 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 WebhooksClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + + 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/heygen/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs new file mode 100644 index 0000000000..a63b78f9cb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/NewtonsoftJson/_#JsonConverters.UnixTimestamp.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: JsonConverters.UnixTimestamp.g.cs +#nullable enable + +namespace AutoSDK.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/heygen/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/Tests.SdkGenerator_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.Authorizations..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.Authorizations..g.verified.cs new file mode 100644 index 0000000000..e66b99969f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/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("X-Api-Key", apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.Constructors..g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.Constructors..g.verified.cs new file mode 100644 index 0000000000..3bdbd47b17 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/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/heygen/SystemTextJson/_#G.Api.V1VideoStatusGet.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.V1VideoStatusGet.g.verified.cs new file mode 100644 index 0000000000..c455f58ef4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.V1VideoStatusGet.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.Api.V1VideoStatusGet.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1VideoStatusGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? videoId); + partial void PrepareV1VideoStatusGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? videoId); + partial void ProcessV1VideoStatusGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/video_status.get
+ /// v1/video_status.get + ///
+ /// + /// Example: <video_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VideoStatusGetAsync( + string? videoId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VideoStatusGetArguments( + httpClient: _httpClient, + videoId: ref videoId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/video_status.get?video_id={videoId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VideoStatusGetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + videoId: videoId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1VideoStatusGetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..6fe03a704c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Api.g.verified.cs @@ -0,0 +1,159 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// Welcome to the **HeyGen API** Postman Collection. This collection provides a convenient way to interact with the HeyGen API directly from Postman.
+ /// **Documentation**: [https://docs.heygen.com](https://docs.heygen.com/)
+ /// **Guides**: [https://docs.heygen.com/docs<br>](https://docs.heygen.com/docs/quick-start)**API Reference**: [https://docs.heygen.com/reference](https://docs.heygen.com/reference/authentication-1)
+ /// ## Authorization
+ /// To send requests to the API endpoints, you must use a valid API token. You can get your API token from the [Settings &gt; API ](https://app.heygen.com/settings?nav=API) page in your HeyGen account.
+ /// 1. In Postman, go to the **Environments** tab on the left panel.
+ ///
+ /// 2. Select the **My HeyGen API Environment** environment provided by HeyGen.
+ ///
+ /// 3. Update the `heygen-api-token` value with your current HeyGen API token.
+ ///
+ /// 4. Ensure **My HeyGen API Environment** is selected as the active environment using the environment selector at the top right corner of Postman.
+ ///
+ /// ### 400 response
+ /// A 400 error response typically indicates that your request body is corrupted. To avoid this, ensure that your request body is correctly formatted and includes all necessary elements, such as closing parentheses.
+ /// ### **Need some help?**
+ /// If you need assistance, you can reach out to us through the following channels:
+ /// - **Customer Support Chat:** Available in our web interface.
+ ///
+ /// - **Emails:** api@heygen.com, [support@heygen.com](https://mailto:support@heygen.com)
+ ///
+ /// - **Community Discussions:** Check out our [discussions channel](https://null) – there's a good chance our community has the answer you're looking for.
+ /// 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::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// + /// + public ListsClient Lists => new ListsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Create personalized avatar videos with ease using the **HeyGen API**. By selecting an avatar and a voice, you can create engaging videos for various purposes. 🌟
+ /// **Guide**: [https://docs.heygen.com/docs/create-video
](https://docs.heygen.com/docs/create-video)**Reference**: [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2) + ///
+ public CreateVideoAPIClient CreateVideoAPI => new CreateVideoAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Templates enable you to add and customize existing text, images, videos, audios (coming soon), voices and avatars, while avatar videos consist only of avatars without these elements. If you plan to use it within a workflow and need richer content, templates are likely a better fit for your use case compared to simple talking avatar videos. 🌟
+ /// **Quick Comparison:**
+ /// - **Avatar Videos:** Avatar videos are centered around avatars delivering content without any additional elements. They are ideal for straightforward, avatar-focused communication.
+ ///
+ /// - **Template Videos:** In contrast, template videos offer a wide canvas for creativity. They enable you to customize existing text, images, videos, audios, voices and avatars seamlessly. If you need a richer, more versatile content format for your workflow, templates are the perfect choice.
+ ///
+ /// **Guide**: [https://docs.heygen.com/docs/generate-video-from-template-v2](https://docs.heygen.com/docs/generate-video-from-template-v2)
+ /// **Reference**: [https://docs.heygen.com/reference/generate-from-template-v2](https://docs.heygen.com/reference/generate-from-template-v2)[](https://docs.heygen.com/reference/create-an-avatar-video-v2) + ///
+ public TemplateAPIClient TemplateAPI => new TemplateAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// The [Video Translate](https://labs.heygen.com/video-translate) by HeyGen provides a powerful solution for effortlessly translating videos, integrating natural voice cloning and authentic speaking styles seamlessly. Now, you can harness its capabilities programmatically through the **Video Translate API**!
+ /// **Guide**: [https://docs.heygen.com/docs/video-translate-api
](https://docs.heygen.com/docs/video-translate-api)**Reference**: [https://docs.heygen.com/reference/video-translate](https://docs.heygen.com/reference/video-translate) + ///
+ public VideoTranslateAPIClient VideoTranslateAPI => new VideoTranslateAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// HeyGen's **Streaming API** allows developers to seamlessly integrate dynamic digital avatars into their applications for immersive and interactive user experiences. With this API, you can create _virtual assistants, real-time training simulations,_ and more, with a focus on real-time, low-latency communication between _users_ and _avatars_ with power of WebRTC.
+ /// **Guide**: [https://docs.heygen.com/docs/streaming-api
](https://docs.heygen.com/docs/streaming-api)**Reference**: [https://docs.heygen.com/reference/new-session](https://docs.heygen.com/reference/new-session) + ///
+ public StreamingAPIClient StreamingAPI => new StreamingAPIClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Webhook events are how the **HeyGen** notifies your _endpoints_ when a variety of interactions or events happen, including when avatar video processing _succeeds_ or _fails_. Webhook events are sent by HeyGen as POST requests to your webhook endpoint.
+ /// **Guide**: [https://docs.heygen.com/docs/using-heygens-webhook-events
](https://docs.heygen.com/docs/using-heygens-webhook-events)**Reference**: [https://docs.heygen.com/reference/add-a-webhook-endpoint](https://docs.heygen.com/reference/add-a-webhook-endpoint) + ///
+ public WebhooksClient Webhooks => new WebhooksClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// These API endpoints allow you to manage photo avatars in your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-talking-photo](https://docs.heygen.com/reference/upload-talking-photo) + ///
+ public TalkingPhotoClient TalkingPhoto => new TalkingPhotoClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Import contacts into your HeyGen **Personalized Video** campaign. 
+ /// **Guide**: [https://docs.heygen.com/docs/import-contacts-via-api](https://docs.heygen.com/docs/import-contacts-via-api)
+ /// Reference: [https://docs.heygen.com/reference/add-contact](https://docs.heygen.com/reference/add-contact) + ///
+ public PersonalizedVideoClient PersonalizedVideo => new PersonalizedVideoClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Obtain information about your account.
+ /// **Reference**: [https://docs.heygen.com/reference/get-remaining-quota-v2](https://docs.heygen.com/reference/get-remaining-quota-v2) + ///
+ public UserClient User => new UserClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Upload an image or video asset to your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1) + ///
+ public AssetsClient Assets => new AssetsClient(_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, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions + { + PropertyNameCaseInsensitive = true, + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = + { + } + }; + + 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/heygen/SystemTextJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs new file mode 100644 index 0000000000..74159ab3f6 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.AssetsClient.V1AssetUpload.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.AssetsClient.V1AssetUpload.g.cs + +#nullable enable + +namespace G +{ + public partial class AssetsClient + { + partial void PrepareV1AssetUploadArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1AssetUploadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1AssetUploadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/asset (upload)
+ /// v1/asset (upload) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AssetUploadAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1AssetUploadArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/asset", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1AssetUploadRequest( + 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); + ProcessV1AssetUploadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.AssetsClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.AssetsClient.g.verified.cs new file mode 100644 index 0000000000..c57cc19127 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.AssetsClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.AssetsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Upload an image or video asset to your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-asset-1](https://docs.heygen.com/reference/upload-asset-1)
+ /// 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 AssetsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the AssetsClient. + /// 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 AssetsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs new file mode 100644 index 0000000000..5a4d0e3b65 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V1VideoDelete.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.CreateVideoAPIClient.V1VideoDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class CreateVideoAPIClient + { + partial void PrepareV1VideoDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? videoId); + partial void PrepareV1VideoDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? videoId); + partial void ProcessV1VideoDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/video.delete
+ /// v1/video.delete + ///
+ /// + /// Example: <video_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VideoDeleteAsync( + string? videoId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VideoDeleteArguments( + httpClient: _httpClient, + videoId: ref videoId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/video.delete?video_id={videoId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VideoDeleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + videoId: videoId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1VideoDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs new file mode 100644 index 0000000000..7cc8bd6a36 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.V2VideoGenerate.g.verified.cs @@ -0,0 +1,115 @@ +//HintName: G.CreateVideoAPIClient.V2VideoGenerate.g.cs + +#nullable enable + +namespace G +{ + public partial class CreateVideoAPIClient + { + partial void PrepareV2VideoGenerateArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V2VideoGenerateRequest request); + partial void PrepareV2VideoGenerateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V2VideoGenerateRequest request); + partial void ProcessV2VideoGenerateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video/generate
+ /// Generated Video: [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545)
+ /// <img src="https://resource.heygen.ai/video/gifs/67cd13935445457eaa99040070bdb545.gif" alt=""> + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoGenerateAsync( + global::G.V2VideoGenerateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV2VideoGenerateArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video/generate", 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); + PrepareV2VideoGenerateRequest( + 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); + ProcessV2VideoGenerateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v2/video/generate
+ /// Generated Video: [https://app.heygen.com/share/67cd13935445457eaa99040070bdb545](https://app.heygen.com/share/67cd13935445457eaa99040070bdb545)
+ /// <img src="https://resource.heygen.ai/video/gifs/67cd13935445457eaa99040070bdb545.gif" alt=""> + ///
+ /// + /// + /// + /// + /// Example: true + /// + /// + /// Example: My Title + /// + /// + /// Example: [] + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoGenerateAsync( + global::G.V2VideoGenerateRequestAspectRatio? aspectRatio = default, + global::G.V2VideoGenerateRequestCallbackId? callbackId = default, + global::G.V2VideoGenerateRequestDimension? dimension = default, + bool test = default, + string? title = default, + global::System.Collections.Generic.IList? videoInputs = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V2VideoGenerateRequest + { + AspectRatio = aspectRatio, + CallbackId = callbackId, + Dimension = dimension, + Test = test, + Title = title, + VideoInputs = videoInputs, + }; + + await V2VideoGenerateAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.g.verified.cs new file mode 100644 index 0000000000..a3afbee28b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.CreateVideoAPIClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.CreateVideoAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Create personalized avatar videos with ease using the **HeyGen API**. By selecting an avatar and a voice, you can create engaging videos for various purposes. 🌟
+ /// **Guide**: [https://docs.heygen.com/docs/create-video<br>](https://docs.heygen.com/docs/create-video)**Reference**: [https://docs.heygen.com/reference/create-an-avatar-video-v2](https://docs.heygen.com/reference/create-an-avatar-video-v2)
+ /// 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 CreateVideoAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the CreateVideoAPIClient. + /// 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 CreateVideoAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.ListsClient.V1AvatarList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1AvatarList.g.verified.cs new file mode 100644 index 0000000000..a3e40ecf8f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1AvatarList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V1AvatarList.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV1AvatarListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1AvatarListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1AvatarListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/avatar.list
+ /// v1/avatar.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AvatarListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1AvatarListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/avatar.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1AvatarListRequest( + 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); + ProcessV1AvatarListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VideoList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VideoList.g.verified.cs new file mode 100644 index 0000000000..de7a1dc57a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VideoList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V1VideoList.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV1VideoListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1VideoListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1VideoListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/video.list
+ /// v1/video.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VideoListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VideoListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/video.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VideoListRequest( + 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); + ProcessV1VideoListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VoiceList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VoiceList.g.verified.cs new file mode 100644 index 0000000000..2bafc55b76 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V1VoiceList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V1VoiceList.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV1VoiceListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1VoiceListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1VoiceListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/voice.list
+ /// v1/voice.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1VoiceListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1VoiceListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voice.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1VoiceListRequest( + 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); + ProcessV1VoiceListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Avatars.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Avatars.g.verified.cs new file mode 100644 index 0000000000..6b5ae4c599 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Avatars.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V2Avatars.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV2AvatarsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2AvatarsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2AvatarsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/avatars
+ /// v2/avatars + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2AvatarsAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2AvatarsArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/avatars", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2AvatarsRequest( + 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); + ProcessV2AvatarsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Voices.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Voices.g.verified.cs new file mode 100644 index 0000000000..5962adee38 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.V2Voices.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.ListsClient.V2Voices.g.cs + +#nullable enable + +namespace G +{ + public partial class ListsClient + { + partial void PrepareV2VoicesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2VoicesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2VoicesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/voices
+ /// v2/voices + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VoicesAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2VoicesArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/voices", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2VoicesRequest( + 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); + ProcessV2VoicesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.g.verified.cs new file mode 100644 index 0000000000..ca48e21db7 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.ListsClient.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.ListsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// 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 ListsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ListsClient. + /// 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 ListsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs new file mode 100644 index 0000000000..1e8e303412 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.PersonalizedVideoAddContactRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PersonalizedVideoAddContactRequest + { + /// + /// Example: <project_id> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Example: [] + /// + [global::System.Text.Json.Serialization.JsonPropertyName("variables_list")] + public global::System.Collections.Generic.IList? VariablesList { 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/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs new file mode 100644 index 0000000000..0481538ea5 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.PersonalizedVideoAddContactRequestVariablesListItem.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PersonalizedVideoAddContactRequestVariablesListItem + { + /// + /// Example: john@mail.com + /// + [global::System.Text.Json.Serialization.JsonPropertyName("email")] + public string? Email { get; set; } + + /// + /// Example: John + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_name")] + public string? FirstName { 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/heygen/SystemTextJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs new file mode 100644 index 0000000000..a4165802cb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingCreateTokenRequest.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.StreamingCreateTokenRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingCreateTokenRequest + { + + /// + /// 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/heygen/SystemTextJson/_#G.Models.StreamingIceRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingIceRequest.g.verified.cs new file mode 100644 index 0000000000..5929310899 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingIceRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.StreamingIceRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingIceRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("candidate")] + public global::G.StreamingIceRequestCandidate? Candidate { get; set; } + + /// + /// Example: <SESSION_ID> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_id")] + public string? SessionId { 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/heygen/SystemTextJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs new file mode 100644 index 0000000000..6d7cbc84d1 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingIceRequestCandidate.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.StreamingIceRequestCandidate.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingIceRequestCandidate + { + /// + /// Example: <CANDIDATE> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("candidate")] + public string? Candidate { get; set; } + + /// + /// Example: <SDP_MLINE_INDEX> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sdpMLineIndex")] + public string? SdpMLineIndex { get; set; } + + /// + /// Example: <SDP_MID> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sdpMid")] + public string? SdpMid { get; set; } + + /// + /// Example: <USERNAME_FRAGMENT> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usernameFragment")] + public string? UsernameFragment { 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/heygen/SystemTextJson/_#G.Models.StreamingInterruptRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingInterruptRequest.g.verified.cs new file mode 100644 index 0000000000..88fea4e600 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingInterruptRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.StreamingInterruptRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingInterruptRequest + { + /// + /// Example: <session_id> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_id")] + public string? SessionId { 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/heygen/SystemTextJson/_#G.Models.StreamingNewRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingNewRequest.g.verified.cs new file mode 100644 index 0000000000..e626a3a42b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingNewRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.StreamingNewRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingNewRequest + { + /// + /// Example: medium + /// + [global::System.Text.Json.Serialization.JsonPropertyName("quality")] + public string? Quality { 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/heygen/SystemTextJson/_#G.Models.StreamingStartRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStartRequest.g.verified.cs new file mode 100644 index 0000000000..f3bdbcd6b0 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStartRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.StreamingStartRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingStartRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sdp")] + public global::G.StreamingStartRequestSdp? Sdp { get; set; } + + /// + /// Example: f8c1f5bd-edbd-11ee-ac61-06daf6be75b4 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_id")] + public string? SessionId { 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/heygen/SystemTextJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs new file mode 100644 index 0000000000..35f479b2a5 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStartRequestSdp.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.Models.StreamingStartRequestSdp.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingStartRequestSdp + { + /// + /// Example: v=0
+ /// o=- 865306769317114273 1711711067 IN IP4 0.0.0.0
+ /// s=-
+ /// t=0 0
+ /// a=fingerprint:sha-256 5B:57:56:56:47:37:A2:76:46:2B:FA:72:6D:61:1D:70:98:8A:4B:8D:BD:E9:54:7E:0E:8D:86:7B:13:BD:5B:B3
+ /// a=extmap-allow-mixed
+ /// a=group:BUNDLE 0 1 2
+ /// m=video 9 UDP/TLS/RTP/SAVPF 96
+ /// c=IN IP4 0.0.0.0
+ /// a=setup:actpass
+ /// a=mid:0
+ /// a=ice-ufrag:WGLlXrCpTGFDczaD
+ /// a=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE
+ /// a=rtcp-mux
+ /// a=rtcp-rsize
+ /// a=rtpmap:96 VP8/90000
+ /// a=ssrc:771866534 cname:pion
+ /// a=ssrc:771866534 msid:pion video
+ /// a=ssrc:771866534 mslabel:pion
+ /// a=ssrc:771866534 label:video
+ /// a=msid:pion video
+ /// a=sendonly
+ /// a=candidate:211536166 1 udp 2130706431 192.168.95.148 58919 typ host
+ /// a=candidate:211536166 2 udp 2130706431 192.168.95.148 58919 typ host
+ /// a=candidate:233762139 1 udp 2130706431 172.17.0.1 39783 typ host
+ /// a=candidate:233762139 2 udp 2130706431 172.17.0.1 39783 typ host
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 33743 typ srflx raddr 0.0.0.0 rport 33743
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 52509 typ srflx raddr 0.0.0.0 rport 52509
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 48068 typ srflx raddr 0.0.0.0 rport 48068
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 39574 typ srflx raddr 0.0.0.0 rport 39574
+ /// a=candidate:2409875042 1 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127
+ /// a=candidate:2409875042 2 udp 1694498815 3.145.204.238 60127 typ srflx raddr 0.0.0.0 rport 60127
+ /// a=candidate:551173388 1 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018
+ /// a=candidate:551173388 2 udp 16777215 34.203.251.67 55901 typ relay raddr 0.0.0.0 rport 38018
+ /// a=candidate:551173388 1 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276
+ /// a=candidate:551173388 2 udp 16777215 34.203.251.67 26906 typ relay raddr 192.168.95.148 rport 37276
+ /// a=candidate:551173388 1 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224
+ /// a=candidate:551173388 2 udp 16777215 34.203.251.67 48909 typ relay raddr 192.168.95.148 rport 51224
+ /// a=end-of-candidates
+ /// m=audio 9 UDP/TLS/RTP/SAVPF 111
+ /// c=IN IP4 0.0.0.0
+ /// a=setup:actpass
+ /// a=mid:1
+ /// a=ice-ufrag:WGLlXrCpTGFDczaD
+ /// a=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE
+ /// a=rtcp-mux
+ /// a=rtcp-rsize
+ /// a=rtpmap:111 opus/48000/2
+ /// a=fmtp:111 minptime=10;useinbandfec=1
+ /// a=ssrc:4043859165 cname:pion
+ /// a=ssrc:4043859165 msid:pion audio
+ /// a=ssrc:4043859165 mslabel:pion
+ /// a=ssrc:4043859165 label:audio
+ /// a=msid:pion audio
+ /// a=sendrecv
+ /// m=application 9 UDP/DTLS/SCTP webrtc-datachannel
+ /// c=IN IP4 0.0.0.0
+ /// a=setup:actpass
+ /// a=mid:2
+ /// a=sendrecv
+ /// a=sctp-port:5000
+ /// a=ice-ufrag:WGLlXrCpTGFDczaD
+ /// a=ice-pwd:ikkYSSwwcEqeapAGiibnhMltrcdcsDPE + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("sdp")] + public string? Sdp { get; set; } + + /// + /// Example: offer + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { 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/heygen/SystemTextJson/_#G.Models.StreamingStopRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStopRequest.g.verified.cs new file mode 100644 index 0000000000..07e28fca49 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingStopRequest.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.StreamingStopRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingStopRequest + { + /// + /// Example: <session_id> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_id")] + public string? SessionId { 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/heygen/SystemTextJson/_#G.Models.StreamingTaskRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingTaskRequest.g.verified.cs new file mode 100644 index 0000000000..e7ce750e0f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.StreamingTaskRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.StreamingTaskRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class StreamingTaskRequest + { + /// + /// Example: <session_id> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_id")] + public string? SessionId { get; set; } + + /// + /// Example: Hey, there! + /// + [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/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs new file mode 100644 index 0000000000..e75d42bbdc --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V1WebhookEndpointAddRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1WebhookEndpointAddRequest + { + /// + /// Example: [] + /// + [global::System.Text.Json.Serialization.JsonPropertyName("events")] + public global::System.Collections.Generic.IList? Events { get; set; } + + /// + /// Example: <url> + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { 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/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs new file mode 100644 index 0000000000..74cfdb2c7c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V1WebhookEndpointAddRequestEvent.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1WebhookEndpointAddRequestEvent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1WebhookEndpointAddRequestEvent + { + + /// + /// 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/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs new file mode 100644 index 0000000000..e99aceb2c5 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequest.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.V2TemplateGenerateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequest + { + /// + /// Example: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("caption")] + public bool Caption { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dimension")] + public global::G.V2TemplateGenerateRequestDimension? Dimension { get; set; } + + /// + /// Example: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("test")] + public bool Test { get; set; } + + /// + /// Example: New Video + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("variables")] + public global::G.V2TemplateGenerateRequestVariables? Variables { 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/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs new file mode 100644 index 0000000000..8eb54e3f54 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestDimension.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V2TemplateGenerateRequestDimension.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestDimension + { + /// + /// Example: 720 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("height")] + public double Height { get; set; } + + /// + /// Example: 1280 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("width")] + public double Width { 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/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs new file mode 100644 index 0000000000..b5017f12aa --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariables.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.V2TemplateGenerateRequestVariables.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestVariables + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_name")] + public global::G.V2TemplateGenerateRequestVariablesFirstName? FirstName { 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/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs new file mode 100644 index 0000000000..c63ba0fa50 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstName.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.V2TemplateGenerateRequestVariablesFirstName.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestVariablesFirstName + { + /// + /// Example: first_name + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("properties")] + public global::G.V2TemplateGenerateRequestVariablesFirstNameProperties? Properties { get; set; } + + /// + /// Example: text + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { 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/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs new file mode 100644 index 0000000000..178323279c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.V2TemplateGenerateRequestVariablesFirstNameProperties.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2TemplateGenerateRequestVariablesFirstNameProperties + { + /// + /// Example: John + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public string? Content { 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/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs new file mode 100644 index 0000000000..c6763fc008 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequest.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.V2VideoGenerateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("aspect_ratio")] + public global::G.V2VideoGenerateRequestAspectRatio? AspectRatio { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("callback_id")] + public global::G.V2VideoGenerateRequestCallbackId? CallbackId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dimension")] + public global::G.V2VideoGenerateRequestDimension? Dimension { get; set; } + + /// + /// Example: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("test")] + public bool Test { get; set; } + + /// + /// Example: My Title + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// Example: [] + /// + [global::System.Text.Json.Serialization.JsonPropertyName("video_inputs")] + public global::System.Collections.Generic.IList? VideoInputs { 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/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs new file mode 100644 index 0000000000..e6d159eaa1 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestAspectRatio.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V2VideoGenerateRequestAspectRatio.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestAspectRatio + { + + /// + /// 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/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs new file mode 100644 index 0000000000..6b41372f51 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestCallbackId.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V2VideoGenerateRequestCallbackId.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestCallbackId + { + + /// + /// 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/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs new file mode 100644 index 0000000000..7154a7e18b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestDimension.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V2VideoGenerateRequestDimension.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestDimension + { + /// + /// Example: 720 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("height")] + public double Height { get; set; } + + /// + /// Example: 1280 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("width")] + public double Width { 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/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs new file mode 100644 index 0000000000..589af348d6 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInput.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.V2VideoGenerateRequestVideoInput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestVideoInput + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("character")] + public global::G.V2VideoGenerateRequestVideoInputCharacter? Character { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + public global::G.V2VideoGenerateRequestVideoInputVoice? Voice { 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/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs new file mode 100644 index 0000000000..f08f0ec65d --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputCharacter.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.V2VideoGenerateRequestVideoInputCharacter.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestVideoInputCharacter + { + /// + /// Example: Kristin_public_3_20240108 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("avatar_id")] + public string? AvatarId { get; set; } + + /// + /// Example: normal + /// + [global::System.Text.Json.Serialization.JsonPropertyName("avatar_style")] + public string? AvatarStyle { get; set; } + + /// + /// Example: avatar + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { 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/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs new file mode 100644 index 0000000000..4b991cc386 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoGenerateRequestVideoInputVoice.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.V2VideoGenerateRequestVideoInputVoice.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoGenerateRequestVideoInputVoice + { + /// + /// Example: Welcome to the new era of video creation with HeyGen! Simply type your script to get started! + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_text")] + public string? InputText { get; set; } + + /// + /// Example: text + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// Example: 2f72ee82b83d4b00af16c4771d611752 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] + public string? VoiceId { 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/heygen/SystemTextJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs new file mode 100644 index 0000000000..711ed85430 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Models.V2VideoTranslateRequest.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.V2VideoTranslateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V2VideoTranslateRequest + { + /// + /// Example: English - American Accent + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_language")] + public string? OutputLanguage { get; set; } + + /// + /// Example: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("speaker_num")] + public double SpeakerNum { get; set; } + + /// + /// Example: My Title + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// Example: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("translate_audio_only")] + public bool TranslateAudioOnly { get; set; } + + /// + /// Example: https://static.heygen.ai/heygen/asset/originalnew.mp4 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("video_url")] + public string? VideoUrl { 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/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs new file mode 100644 index 0000000000..18a1590051 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.PersonalizedVideoClient.PersonalizedVideoAddContact.g.cs + +#nullable enable + +namespace G +{ + public partial class PersonalizedVideoClient + { + partial void PreparePersonalizedVideoAddContactArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.PersonalizedVideoAddContactRequest request); + partial void PreparePersonalizedVideoAddContactRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.PersonalizedVideoAddContactRequest request); + partial void ProcessPersonalizedVideoAddContactResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// personalized_video/add_contact
+ /// personalized_video/add_contact + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoAddContactAsync( + global::G.PersonalizedVideoAddContactRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePersonalizedVideoAddContactArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/personalized_video/add_contact", 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); + PreparePersonalizedVideoAddContactRequest( + 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); + ProcessPersonalizedVideoAddContactResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// personalized_video/add_contact
+ /// personalized_video/add_contact + ///
+ /// + /// Example: <project_id> + /// + /// + /// Example: [] + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoAddContactAsync( + string? projectId = default, + global::System.Collections.Generic.IList? variablesList = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.PersonalizedVideoAddContactRequest + { + ProjectId = projectId, + VariablesList = variablesList, + }; + + await PersonalizedVideoAddContactAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs new file mode 100644 index 0000000000..2182d1808a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.PersonalizedVideoClient.PersonalizedVideoAudienceDetail.g.cs + +#nullable enable + +namespace G +{ + public partial class PersonalizedVideoClient + { + partial void PreparePersonalizedVideoAudienceDetailArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? id); + partial void PreparePersonalizedVideoAudienceDetailRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? id); + partial void ProcessPersonalizedVideoAudienceDetailResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// personalized_video/audience/detail
+ /// personalized_video/audience/detail + ///
+ /// + /// Example: <video-id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoAudienceDetailAsync( + string? id = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PreparePersonalizedVideoAudienceDetailArguments( + httpClient: _httpClient, + id: ref id); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/personalized_video/audience/detail?id={id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePersonalizedVideoAudienceDetailRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPersonalizedVideoAudienceDetailResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs new file mode 100644 index 0000000000..5472c0f669 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.PersonalizedVideoClient.PersonalizedVideoProjectDetail.g.cs + +#nullable enable + +namespace G +{ + public partial class PersonalizedVideoClient + { + partial void PreparePersonalizedVideoProjectDetailArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? id); + partial void PreparePersonalizedVideoProjectDetailRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? id); + partial void ProcessPersonalizedVideoProjectDetailResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// personalized_video/project/detail
+ /// personalized_video/project/detail + ///
+ /// + /// Example: <project-id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PersonalizedVideoProjectDetailAsync( + string? id = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PreparePersonalizedVideoProjectDetailArguments( + httpClient: _httpClient, + id: ref id); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/personalized_video/project/detail?id={id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePersonalizedVideoProjectDetailRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessPersonalizedVideoProjectDetailResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.g.verified.cs new file mode 100644 index 0000000000..f4bca5f10a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.PersonalizedVideoClient.g.verified.cs @@ -0,0 +1,67 @@ +//HintName: G.PersonalizedVideoClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Import contacts into your HeyGen **Personalized Video** campaign. 
+ /// **Guide**: [https://docs.heygen.com/docs/import-contacts-via-api](https://docs.heygen.com/docs/import-contacts-via-api)
+ /// Reference: [https://docs.heygen.com/reference/add-contact](https://docs.heygen.com/reference/add-contact)
+ /// 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 PersonalizedVideoClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the PersonalizedVideoClient. + /// 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 PersonalizedVideoClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..9ef159498a --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/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/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs new file mode 100644 index 0000000000..b3ea579f98 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingAvatarList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.StreamingAPIClient.StreamingAvatarList.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingAvatarListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareStreamingAvatarListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessStreamingAvatarListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming/avatar.list
+ /// streaming/avatar.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingAvatarListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareStreamingAvatarListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming/avatar.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareStreamingAvatarListRequest( + 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); + ProcessStreamingAvatarListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs new file mode 100644 index 0000000000..c2f991ca5c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingCreateToken.g.verified.cs @@ -0,0 +1,89 @@ +//HintName: G.StreamingAPIClient.StreamingCreateToken.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingCreateTokenArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingCreateTokenRequest request); + partial void PrepareStreamingCreateTokenRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingCreateTokenRequest request); + partial void ProcessStreamingCreateTokenResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.create_token
+ /// streaming.create_token + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingCreateTokenAsync( + global::G.StreamingCreateTokenRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingCreateTokenArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.create_token", 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); + PrepareStreamingCreateTokenRequest( + 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); + ProcessStreamingCreateTokenResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.create_token
+ /// streaming.create_token + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingCreateTokenAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingCreateTokenRequest + { + }; + + await StreamingCreateTokenAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs new file mode 100644 index 0000000000..a3d1975f95 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingIce.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.StreamingAPIClient.StreamingIce.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingIceArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingIceRequest request); + partial void PrepareStreamingIceRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingIceRequest request); + partial void ProcessStreamingIceResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.ice
+ /// streaming.ice + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingIceAsync( + global::G.StreamingIceRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingIceArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.ice", 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); + PrepareStreamingIceRequest( + 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); + ProcessStreamingIceResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.ice
+ /// streaming.ice + ///
+ /// + /// + /// Example: <SESSION_ID> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingIceAsync( + global::G.StreamingIceRequestCandidate? candidate = default, + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingIceRequest + { + Candidate = candidate, + SessionId = sessionId, + }; + + await StreamingIceAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs new file mode 100644 index 0000000000..8a51fddf4e --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingInterrupt.g.verified.cs @@ -0,0 +1,94 @@ +//HintName: G.StreamingAPIClient.StreamingInterrupt.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingInterruptArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingInterruptRequest request); + partial void PrepareStreamingInterruptRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingInterruptRequest request); + partial void ProcessStreamingInterruptResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.interrupt
+ /// This is endpoint is to interrupt a speaking avatar. If the avatar is not speaking, it doesn't do anything. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingInterruptAsync( + global::G.StreamingInterruptRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingInterruptArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.interrupt", 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); + PrepareStreamingInterruptRequest( + 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); + ProcessStreamingInterruptResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.interrupt
+ /// This is endpoint is to interrupt a speaking avatar. If the avatar is not speaking, it doesn't do anything. + ///
+ /// + /// Example: <session_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingInterruptAsync( + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingInterruptRequest + { + SessionId = sessionId, + }; + + await StreamingInterruptAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs new file mode 100644 index 0000000000..82751b83ae --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.StreamingAPIClient.StreamingList.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareStreamingListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessStreamingListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.list
+ /// streaming.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareStreamingListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareStreamingListRequest( + 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); + ProcessStreamingListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs new file mode 100644 index 0000000000..e459b5686f --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingNew.g.verified.cs @@ -0,0 +1,94 @@ +//HintName: G.StreamingAPIClient.StreamingNew.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingNewArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingNewRequest request); + partial void PrepareStreamingNewRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingNewRequest request); + partial void ProcessStreamingNewResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.new
+ /// streaming.new + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingNewAsync( + global::G.StreamingNewRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingNewArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.new", 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); + PrepareStreamingNewRequest( + 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); + ProcessStreamingNewResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.new
+ /// streaming.new + ///
+ /// + /// Example: medium + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingNewAsync( + string? quality = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingNewRequest + { + Quality = quality, + }; + + await StreamingNewAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs new file mode 100644 index 0000000000..252cd9ca0b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStart.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.StreamingAPIClient.StreamingStart.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingStartArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingStartRequest request); + partial void PrepareStreamingStartRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingStartRequest request); + partial void ProcessStreamingStartResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.start
+ /// streaming.start + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStartAsync( + global::G.StreamingStartRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingStartArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.start", 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); + PrepareStreamingStartRequest( + 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); + ProcessStreamingStartResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.start
+ /// streaming.start + ///
+ /// + /// + /// Example: f8c1f5bd-edbd-11ee-ac61-06daf6be75b4 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStartAsync( + global::G.StreamingStartRequestSdp? sdp = default, + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingStartRequest + { + Sdp = sdp, + SessionId = sessionId, + }; + + await StreamingStartAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs new file mode 100644 index 0000000000..9a27f558d6 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingStop.g.verified.cs @@ -0,0 +1,94 @@ +//HintName: G.StreamingAPIClient.StreamingStop.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingStopArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingStopRequest request); + partial void PrepareStreamingStopRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingStopRequest request); + partial void ProcessStreamingStopResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.stop
+ /// streaming.stop + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStopAsync( + global::G.StreamingStopRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingStopArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.stop", 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); + PrepareStreamingStopRequest( + 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); + ProcessStreamingStopResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.stop
+ /// streaming.stop + ///
+ /// + /// Example: <session_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingStopAsync( + string? sessionId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingStopRequest + { + SessionId = sessionId, + }; + + await StreamingStopAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs new file mode 100644 index 0000000000..4510e54968 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.StreamingTask.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.StreamingAPIClient.StreamingTask.g.cs + +#nullable enable + +namespace G +{ + public partial class StreamingAPIClient + { + partial void PrepareStreamingTaskArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.StreamingTaskRequest request); + partial void PrepareStreamingTaskRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.StreamingTaskRequest request); + partial void ProcessStreamingTaskResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// streaming.task
+ /// streaming.task + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingTaskAsync( + global::G.StreamingTaskRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareStreamingTaskArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/streaming.task", 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); + PrepareStreamingTaskRequest( + 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); + ProcessStreamingTaskResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// streaming.task
+ /// streaming.task + ///
+ /// + /// Example: <session_id> + /// + /// + /// Example: Hey, there! + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task StreamingTaskAsync( + string? sessionId = default, + string? text = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.StreamingTaskRequest + { + SessionId = sessionId, + Text = text, + }; + + await StreamingTaskAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.g.verified.cs new file mode 100644 index 0000000000..ccb78a9ca3 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.StreamingAPIClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.StreamingAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// HeyGen's **Streaming API** allows developers to seamlessly integrate dynamic digital avatars into their applications for immersive and interactive user experiences. With this API, you can create _virtual assistants, real-time training simulations,_ and more, with a focus on real-time, low-latency communication between _users_ and _avatars_ with power of WebRTC.
+ /// **Guide**: [https://docs.heygen.com/docs/streaming-api<br>](https://docs.heygen.com/docs/streaming-api)**Reference**: [https://docs.heygen.com/reference/new-session](https://docs.heygen.com/reference/new-session)
+ /// 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 StreamingAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the StreamingAPIClient. + /// 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 StreamingAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs new file mode 100644 index 0000000000..6b9fce35ec --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TalkingPhotoClient.V1TalkingPhotoList.g.cs + +#nullable enable + +namespace G +{ + public partial class TalkingPhotoClient + { + partial void PrepareV1TalkingPhotoListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1TalkingPhotoListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1TalkingPhotoListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/talking_photo.list
+ /// v1/talking_photo.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TalkingPhotoListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1TalkingPhotoListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/talking_photo.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1TalkingPhotoListRequest( + 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); + ProcessV1TalkingPhotoListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs new file mode 100644 index 0000000000..1307656567 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V1TalkingPhotoUpload.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TalkingPhotoClient.V1TalkingPhotoUpload.g.cs + +#nullable enable + +namespace G +{ + public partial class TalkingPhotoClient + { + partial void PrepareV1TalkingPhotoUploadArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1TalkingPhotoUploadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1TalkingPhotoUploadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/talking_photo (upload)
+ /// v1/talking_photo (upload) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TalkingPhotoUploadAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1TalkingPhotoUploadArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/talking_photo", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1TalkingPhotoUploadRequest( + 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); + ProcessV1TalkingPhotoUploadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs new file mode 100644 index 0000000000..17890c1574 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TalkingPhotoClient.V2TalkingPhotoIdDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class TalkingPhotoClient + { + partial void PrepareV2TalkingPhotoIdDeleteArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2TalkingPhotoIdDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2TalkingPhotoIdDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/talking_photo/<id> (delete)
+ /// v2/talking_photo/<id> (delete) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TalkingPhotoIdDeleteAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2TalkingPhotoIdDeleteArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/talking_photo/", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2TalkingPhotoIdDeleteRequest( + 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); + ProcessV2TalkingPhotoIdDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.g.verified.cs new file mode 100644 index 0000000000..e2f59c8577 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TalkingPhotoClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.TalkingPhotoClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// These API endpoints allow you to manage photo avatars in your account.
+ /// **Reference**: [https://docs.heygen.com/reference/upload-talking-photo](https://docs.heygen.com/reference/upload-talking-photo)
+ /// 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 TalkingPhotoClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the TalkingPhotoClient. + /// 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 TalkingPhotoClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs new file mode 100644 index 0000000000..7be3381d7b --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateGenerate.g.verified.cs @@ -0,0 +1,112 @@ +//HintName: G.TemplateAPIClient.V2TemplateGenerate.g.cs + +#nullable enable + +namespace G +{ + public partial class TemplateAPIClient + { + partial void PrepareV2TemplateGenerateArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V2TemplateGenerateRequest request); + partial void PrepareV2TemplateGenerateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V2TemplateGenerateRequest request); + partial void ProcessV2TemplateGenerateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/template/generate
+ /// Generated Video: [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75)
+ /// <img src="https://resource.heygen.ai/video/gifs/7cba9d29d6db46b88471221fdbc4fb75.gif" alt=""> + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplateGenerateAsync( + global::G.V2TemplateGenerateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV2TemplateGenerateArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/template//generate", 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); + PrepareV2TemplateGenerateRequest( + 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); + ProcessV2TemplateGenerateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v2/template/generate
+ /// Generated Video: [https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75](https://app.heygen.com/videos/7cba9d29d6db46b88471221fdbc4fb75)
+ /// <img src="https://resource.heygen.ai/video/gifs/7cba9d29d6db46b88471221fdbc4fb75.gif" alt=""> + ///
+ /// + /// Example: false + /// + /// + /// + /// Example: false + /// + /// + /// Example: New Video + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplateGenerateAsync( + bool caption = default, + global::G.V2TemplateGenerateRequestDimension? dimension = default, + bool test = default, + string? title = default, + global::G.V2TemplateGenerateRequestVariables? variables = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V2TemplateGenerateRequest + { + Caption = caption, + Dimension = dimension, + Test = test, + Title = title, + Variables = variables, + }; + + await V2TemplateGenerateAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs new file mode 100644 index 0000000000..38df3da06e --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2TemplateId.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TemplateAPIClient.V2TemplateId.g.cs + +#nullable enable + +namespace G +{ + public partial class TemplateAPIClient + { + partial void PrepareV2TemplateIdArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2TemplateIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2TemplateIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/template/<id>
+ /// v2/template/<id> + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplateIdAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2TemplateIdArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/template/", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2TemplateIdRequest( + 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); + ProcessV2TemplateIdResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs new file mode 100644 index 0000000000..793a0402c4 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.V2Templates.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.TemplateAPIClient.V2Templates.g.cs + +#nullable enable + +namespace G +{ + public partial class TemplateAPIClient + { + partial void PrepareV2TemplatesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2TemplatesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2TemplatesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/templates
+ /// v2/templates + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2TemplatesAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2TemplatesArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/templates", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2TemplatesRequest( + 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); + ProcessV2TemplatesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.g.verified.cs new file mode 100644 index 0000000000..f97a5e8189 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.TemplateAPIClient.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.TemplateAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Templates enable you to add and customize existing text, images, videos, audios (coming soon), voices and avatars, while avatar videos consist only of avatars without these elements. If you plan to use it within a workflow and need richer content, templates are likely a better fit for your use case compared to simple talking avatar videos. 🌟
+ /// **Quick Comparison:**
+ /// - **Avatar Videos:** Avatar videos are centered around avatars delivering content without any additional elements. They are ideal for straightforward, avatar-focused communication.
+ ///
+ /// - **Template Videos:** In contrast, template videos offer a wide canvas for creativity. They enable you to customize existing text, images, videos, audios, voices and avatars seamlessly. If you need a richer, more versatile content format for your workflow, templates are the perfect choice.
+ ///
+ /// **Guide**: [https://docs.heygen.com/docs/generate-video-from-template-v2](https://docs.heygen.com/docs/generate-video-from-template-v2)
+ /// **Reference**: [https://docs.heygen.com/reference/generate-from-template-v2](https://docs.heygen.com/reference/generate-from-template-v2)[](https://docs.heygen.com/reference/create-an-avatar-video-v2)
+ /// 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 TemplateAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the TemplateAPIClient. + /// 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 TemplateAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs new file mode 100644 index 0000000000..4bca21ecde --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.UserClient.V2UserRemainingQuota.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.UserClient.V2UserRemainingQuota.g.cs + +#nullable enable + +namespace G +{ + public partial class UserClient + { + partial void PrepareV2UserRemainingQuotaArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2UserRemainingQuotaRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2UserRemainingQuotaResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/user/remaining_quota
+ /// v2/user/remaining_quota + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2UserRemainingQuotaAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2UserRemainingQuotaArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/user/remaining_quota", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2UserRemainingQuotaRequest( + 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); + ProcessV2UserRemainingQuotaResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.UserClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.UserClient.g.verified.cs new file mode 100644 index 0000000000..ef28f36244 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.UserClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.UserClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Obtain information about your account.
+ /// **Reference**: [https://docs.heygen.com/reference/get-remaining-quota-v2](https://docs.heygen.com/reference/get-remaining-quota-v2)
+ /// 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 UserClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the UserClient. + /// 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 UserClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs new file mode 100644 index 0000000000..a0d8823583 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslate.g.verified.cs @@ -0,0 +1,114 @@ +//HintName: G.VideoTranslateAPIClient.V2VideoTranslate.g.cs + +#nullable enable + +namespace G +{ + public partial class VideoTranslateAPIClient + { + partial void PrepareV2VideoTranslateArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V2VideoTranslateRequest request); + partial void PrepareV2VideoTranslateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V2VideoTranslateRequest request); + partial void ProcessV2VideoTranslateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video_translate
+ /// Generated Video: [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateAsync( + global::G.V2VideoTranslateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV2VideoTranslateArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video_translate", 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); + PrepareV2VideoTranslateRequest( + 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); + ProcessV2VideoTranslateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v2/video_translate
+ /// Generated Video: [https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9](https://app.heygen.com/video-translation/share/dab5a987e6154b0cb7e606c858043fa9) + ///
+ /// + /// Example: English - American Accent + /// + /// + /// Example: 1 + /// + /// + /// Example: My Title + /// + /// + /// Example: false + /// + /// + /// Example: https://static.heygen.ai/heygen/asset/originalnew.mp4 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateAsync( + string? outputLanguage = default, + double speakerNum = default, + string? title = default, + bool translateAudioOnly = default, + string? videoUrl = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V2VideoTranslateRequest + { + OutputLanguage = outputLanguage, + SpeakerNum = speakerNum, + Title = title, + TranslateAudioOnly = translateAudioOnly, + VideoUrl = videoUrl, + }; + + await V2VideoTranslateAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs new file mode 100644 index 0000000000..4b052aec87 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.VideoTranslateAPIClient.V2VideoTranslateIdStatus.g.cs + +#nullable enable + +namespace G +{ + public partial class VideoTranslateAPIClient + { + partial void PrepareV2VideoTranslateIdStatusArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2VideoTranslateIdStatusRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2VideoTranslateIdStatusResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video_translate/<id> (status)
+ /// v2/video_translate/<id> (status) + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateIdStatusAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2VideoTranslateIdStatusArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video_translate/", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2VideoTranslateIdStatusRequest( + 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); + ProcessV2VideoTranslateIdStatusResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs new file mode 100644 index 0000000000..7ba4a89258 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.VideoTranslateAPIClient.V2VideoTranslateTargetLanguages.g.cs + +#nullable enable + +namespace G +{ + public partial class VideoTranslateAPIClient + { + partial void PrepareV2VideoTranslateTargetLanguagesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV2VideoTranslateTargetLanguagesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV2VideoTranslateTargetLanguagesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v2/video_translate/target_languages
+ /// v2/video_translate/target_languages + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V2VideoTranslateTargetLanguagesAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV2VideoTranslateTargetLanguagesArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/video_translate/target_languages", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV2VideoTranslateTargetLanguagesRequest( + 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); + ProcessV2VideoTranslateTargetLanguagesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.g.verified.cs new file mode 100644 index 0000000000..8c311dc2cb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.VideoTranslateAPIClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.VideoTranslateAPIClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// The [Video Translate](https://labs.heygen.com/video-translate) by HeyGen provides a powerful solution for effortlessly translating videos, integrating natural voice cloning and authentic speaking styles seamlessly. Now, you can harness its capabilities programmatically through the **Video Translate API**!
+ /// **Guide**: [https://docs.heygen.com/docs/video-translate-api<br>](https://docs.heygen.com/docs/video-translate-api)**Reference**: [https://docs.heygen.com/reference/video-translate](https://docs.heygen.com/reference/video-translate)
+ /// 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 VideoTranslateAPIClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the VideoTranslateAPIClient. + /// 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 VideoTranslateAPIClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs new file mode 100644 index 0000000000..7b9c770c48 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointAdd.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.WebhooksClient.V1WebhookEndpointAdd.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookEndpointAddArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.V1WebhookEndpointAddRequest request); + partial void PrepareV1WebhookEndpointAddRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.V1WebhookEndpointAddRequest request); + partial void ProcessV1WebhookEndpointAddResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/endpoint.add
+ /// v1/webhook/endpoint.add + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointAddAsync( + global::G.V1WebhookEndpointAddRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1WebhookEndpointAddArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/webhook/endpoint.add", 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); + PrepareV1WebhookEndpointAddRequest( + 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); + ProcessV1WebhookEndpointAddResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + + /// + /// v1/webhook/endpoint.add
+ /// v1/webhook/endpoint.add + ///
+ /// + /// Example: [] + /// + /// + /// Example: <url> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointAddAsync( + global::System.Collections.Generic.IList? events = default, + string? url = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.V1WebhookEndpointAddRequest + { + Events = events, + Url = url, + }; + + await V1WebhookEndpointAddAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs new file mode 100644 index 0000000000..8558e24203 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointDelete.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.WebhooksClient.V1WebhookEndpointDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookEndpointDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? endpointId); + partial void PrepareV1WebhookEndpointDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? endpointId); + partial void ProcessV1WebhookEndpointDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/endpoint.delete
+ /// v1/webhook/endpoint.delete + ///
+ /// + /// Example: <endpoint_id> + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointDeleteAsync( + string? endpointId = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1WebhookEndpointDeleteArguments( + httpClient: _httpClient, + endpointId: ref endpointId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/webhook/endpoint.delete?endpoint_id={endpointId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1WebhookEndpointDeleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + endpointId: endpointId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1WebhookEndpointDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs new file mode 100644 index 0000000000..5f2e3241eb --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookEndpointList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.WebhooksClient.V1WebhookEndpointList.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookEndpointListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1WebhookEndpointListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1WebhookEndpointListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/endpoint.list
+ /// v1/webhook/endpoint.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookEndpointListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1WebhookEndpointListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/webhook/endpoint.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1WebhookEndpointListRequest( + 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); + ProcessV1WebhookEndpointListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs new file mode 100644 index 0000000000..6dc4502f0c --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.V1WebhookWebhookList.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.WebhooksClient.V1WebhookWebhookList.g.cs + +#nullable enable + +namespace G +{ + public partial class WebhooksClient + { + partial void PrepareV1WebhookWebhookListArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1WebhookWebhookListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1WebhookWebhookListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// v1/webhook/webhook.list
+ /// v1/webhook/webhook.list + ///
+ /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1WebhookWebhookListAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1WebhookWebhookListArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/webhook/webhook.list", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1WebhookWebhookListRequest( + 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); + ProcessV1WebhookWebhookListResponse( + httpClient: _httpClient, + httpResponseMessage: response); + response.EnsureSuccessStatusCode(); + } + } +} \ No newline at end of file diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.g.verified.cs new file mode 100644 index 0000000000..360d55d62e --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#G.WebhooksClient.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.WebhooksClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Webhook events are how the **HeyGen** notifies your _endpoints_ when a variety of interactions or events happen, including when avatar video processing _succeeds_ or _fails_. Webhook events are sent by HeyGen as POST requests to your webhook endpoint.
+ /// **Guide**: [https://docs.heygen.com/docs/using-heygens-webhook-events<br>](https://docs.heygen.com/docs/using-heygens-webhook-events)**Reference**: [https://docs.heygen.com/reference/add-a-webhook-endpoint](https://docs.heygen.com/reference/add-a-webhook-endpoint)
+ /// 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 WebhooksClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.heygen.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the WebhooksClient. + /// 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 WebhooksClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + + 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/heygen/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs new file mode 100644 index 0000000000..2046c784c3 --- /dev/null +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/heygen/SystemTextJson/_#JsonConverters.UnixTimestamp.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: JsonConverters.UnixTimestamp.g.cs +#nullable enable + +namespace AutoSDK.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/Tests.cs b/src/tests/AutoSDK.SnapshotTests/Tests.cs index 5f1be2a05f..c657085454 100644 --- a/src/tests/AutoSDK.SnapshotTests/Tests.cs +++ b/src/tests/AutoSDK.SnapshotTests/Tests.cs @@ -46,12 +46,18 @@ public partial class Tests [DataRow("Twitch", "twitch.json", JsonSerializerType.SystemTextJson)] [DataRow("Filtering", "github.yaml", JsonSerializerType.NewtonsoftJson)] [DataRow("Filtering", "github.yaml", JsonSerializerType.SystemTextJson)] + [DataRow("", "heygen.yaml", JsonSerializerType.NewtonsoftJson)] + [DataRow("", "heygen.yaml", JsonSerializerType.SystemTextJson)] public Task SdkGenerator(string callerName, string fileName, JsonSerializerType jsonSerializerType) { if (callerName == "Empty") { return CheckSourceAsync(jsonSerializerType, [], callerName); } + if (string.IsNullOrWhiteSpace(callerName)) + { + callerName = Path.GetFileNameWithoutExtension(fileName); + } var resource = new H.Resource(fileName); diff --git a/src/tests/AutoSDK.UnitTests/DataTests.cs b/src/tests/AutoSDK.UnitTests/DataTests.cs index 304c850fe7..0ea5db6703 100644 --- a/src/tests/AutoSDK.UnitTests/DataTests.cs +++ b/src/tests/AutoSDK.UnitTests/DataTests.cs @@ -24,6 +24,7 @@ public partial class DataTests [DataRow("together.yaml")] [DataRow("mystic.yaml")] [DataRow("twitch.json")] + [DataRow("heygen.yaml")] public Task PrepareData(string resourceName) { return VerifyAsync(Data.Prepare(( diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/heygen/ResolvedSchemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/heygen/ResolvedSchemas/_.verified.txt new file mode 100644 index 0000000000..d23d495143 --- /dev/null +++ b/src/tests/AutoSDK.UnitTests/Snapshots/heygen/ResolvedSchemas/_.verified.txt @@ -0,0 +1,76 @@ +[ + V2VideoGenerateRequest(class)[Create Video API], + V2VideoGenerateRequestAspectRatio(class)[Create Video API], + V2VideoGenerateRequestCallbackId(class)[Create Video API], + V2VideoGenerateRequestDimension(class)[Create Video API], + Height(double)[Create Video API], + Width(double)[Create Video API], + Test(bool)[Create Video API], + Title(string)[Create Video API], + VideoInputs(array)[Create Video API], + V2VideoGenerateRequestVideoInput(class)[Create Video API], + V2VideoGenerateRequestVideoInputCharacter(class)[Create Video API], + AvatarId(string)[Create Video API], + AvatarStyle(string)[Create Video API], + Type(string)[Create Video API], + V2VideoGenerateRequestVideoInputVoice(class)[Create Video API], + InputText(string)[Create Video API], + Type(string)[Create Video API], + VoiceId(string)[Create Video API], + V2TemplateGenerateRequest(class)[Template API], + Caption(bool)[Template API], + V2TemplateGenerateRequestDimension(class)[Template API], + Height(double)[Template API], + Width(double)[Template API], + Test(bool)[Template API], + Title(string)[Template API], + V2TemplateGenerateRequestVariables(class)[Template API], + V2TemplateGenerateRequestVariablesFirstName(class)[Template API], + Name(string)[Template API], + V2TemplateGenerateRequestVariablesFirstNameProperties(class)[Template API], + Content(string)[Template API], + Type(string)[Template API], + V2VideoTranslateRequest(class)[Video Translate API], + OutputLanguage(string)[Video Translate API], + SpeakerNum(double)[Video Translate API], + Title(string)[Video Translate API], + TranslateAudioOnly(bool)[Video Translate API], + VideoUrl(string)[Video Translate API], + StreamingNewRequest(class)[Streaming API], + Quality(string)[Streaming API], + StreamingStartRequest(class)[Streaming API], + StreamingStartRequestSdp(class)[Streaming API], + Sdp1(string)[Streaming API], + Type(string)[Streaming API], + SessionId(string)[Streaming API], + StreamingIceRequest(class)[Streaming API], + StreamingIceRequestCandidate(class)[Streaming API], + Candidate1(string)[Streaming API], + SdpMLineIndex(string)[Streaming API], + SdpMid(string)[Streaming API], + UsernameFragment(string)[Streaming API], + SessionId(string)[Streaming API], + StreamingTaskRequest(class)[Streaming API], + SessionId(string)[Streaming API], + Text(string)[Streaming API], + StreamingStopRequest(class)[Streaming API], + SessionId(string)[Streaming API], + StreamingInterruptRequest(class)[Streaming API], + SessionId(string)[Streaming API], + StreamingCreateTokenRequest(class)[Streaming API], + V1WebhookEndpointAddRequest(class)[Webhooks], + Events(array)[Webhooks], + V1WebhookEndpointAddRequestEvent(class)[Webhooks], + Url(string)[Webhooks], + PersonalizedVideoAddContactRequest(class)[Personalized Video], + ProjectId(string)[Personalized Video], + VariablesList(array)[Personalized Video], + PersonalizedVideoAddContactRequestVariablesListItem(class)[Personalized Video], + Email(string)[Personalized Video], + FirstName(string)[Personalized Video], + V1VideoDeleteVideoId(string)[Create Video API], + V1WebhookEndpointDeleteEndpointId(string)[Webhooks], + PersonalizedVideoAudienceDetailId(string)[Personalized Video], + PersonalizedVideoProjectDetailId(string)[Personalized Video], + V1VideoStatusGetVideoId(string)[] +] \ No newline at end of file diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/heygen/Schemas/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/heygen/Schemas/_.verified.txt new file mode 100644 index 0000000000..65699b11f1 --- /dev/null +++ b/src/tests/AutoSDK.UnitTests/Snapshots/heygen/Schemas/_.verified.txt @@ -0,0 +1,76 @@ +[ + V2VideoGenerateRequest(class), + V2VideoGenerateRequestAspectRatio(class), + V2VideoGenerateRequestCallbackId(class), + V2VideoGenerateRequestDimension(class), + Height(double), + Width(double), + Test(bool), + Title(string), + VideoInputs(array), + V2VideoGenerateRequestVideoInput(class), + V2VideoGenerateRequestVideoInputCharacter(class), + AvatarId(string), + AvatarStyle(string), + Type(string), + V2VideoGenerateRequestVideoInputVoice(class), + InputText(string), + Type(string), + VoiceId(string), + V2TemplateGenerateRequest(class), + Caption(bool), + V2TemplateGenerateRequestDimension(class), + Height(double), + Width(double), + Test(bool), + Title(string), + V2TemplateGenerateRequestVariables(class), + V2TemplateGenerateRequestVariablesFirstName(class), + Name(string), + V2TemplateGenerateRequestVariablesFirstNameProperties(class), + Content(string), + Type(string), + V2VideoTranslateRequest(class), + OutputLanguage(string), + SpeakerNum(double), + Title(string), + TranslateAudioOnly(bool), + VideoUrl(string), + StreamingNewRequest(class), + Quality(string), + StreamingStartRequest(class), + StreamingStartRequestSdp(class), + Sdp1(string), + Type(string), + SessionId(string), + StreamingIceRequest(class), + StreamingIceRequestCandidate(class), + Candidate1(string), + SdpMLineIndex(string), + SdpMid(string), + UsernameFragment(string), + SessionId(string), + StreamingTaskRequest(class), + SessionId(string), + Text(string), + StreamingStopRequest(class), + SessionId(string), + StreamingInterruptRequest(class), + SessionId(string), + StreamingCreateTokenRequest(class), + V1WebhookEndpointAddRequest(class), + Events(array), + V1WebhookEndpointAddRequestEvent(class), + Url(string), + PersonalizedVideoAddContactRequest(class), + ProjectId(string), + VariablesList(array), + PersonalizedVideoAddContactRequestVariablesListItem(class), + Email(string), + FirstName(string), + V1VideoDeleteVideoId(string), + V1WebhookEndpointDeleteEndpointId(string), + PersonalizedVideoAudienceDetailId(string), + PersonalizedVideoProjectDetailId(string), + V1VideoStatusGetVideoId(string) +] \ No newline at end of file