diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..1ee53850 --- /dev/null +++ b/.gitignore @@ -0,0 +1,362 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 00000000..59b8db52 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,688 @@ +.gitignore +.openapi-generator-ignore +README.md +appveyor.yml +docs/AbstractWebhookPayload.md +docs/AliasControllerApi.md +docs/AliasDto.md +docs/AliasProjection.md +docs/ApiUserControllerApi.md +docs/AttachmentControllerApi.md +docs/AttachmentEntity.md +docs/AttachmentMetaData.md +docs/AttachmentProjection.md +docs/BasicAuthOptions.md +docs/BounceControllerApi.md +docs/BounceProjection.md +docs/BounceRecipientProjection.md +docs/BouncedEmailDto.md +docs/BouncedRecipientDto.md +docs/BulkActionsControllerApi.md +docs/BulkSendEmailOptions.md +docs/CommonActionsControllerApi.md +docs/Complaint.md +docs/ConditionOption.md +docs/ContactControllerApi.md +docs/ContactDto.md +docs/ContactProjection.md +docs/ContentMatchOptions.md +docs/CountDto.md +docs/CreateAliasOptions.md +docs/CreateContactOptions.md +docs/CreateDomainOptions.md +docs/CreateEmergencyAddressOptions.md +docs/CreateGroupOptions.md +docs/CreateInboxDto.md +docs/CreateInboxForwarderOptions.md +docs/CreateInboxRulesetOptions.md +docs/CreateTemplateOptions.md +docs/CreateTrackingPixelOptions.md +docs/CreateWebhookOptions.md +docs/DNSLookupOptions.md +docs/DNSLookupResult.md +docs/DNSLookupResults.md +docs/DeliveryStatusDto.md +docs/DescribeDomainOptions.md +docs/DescribeMailServerDomainResult.md +docs/DomainControllerApi.md +docs/DomainDto.md +docs/DomainNameRecord.md +docs/DomainPreview.md +docs/DownloadAttachmentDto.md +docs/Email.md +docs/EmailAnalysis.md +docs/EmailContentMatchResult.md +docs/EmailControllerApi.md +docs/EmailHtmlDto.md +docs/EmailLinksResult.md +docs/EmailPreview.md +docs/EmailPreviewUrls.md +docs/EmailProjection.md +docs/EmailRecipients.md +docs/EmailTextLinesResult.md +docs/EmailValidationRequestDto.md +docs/EmailVerificationControllerApi.md +docs/EmailVerificationResult.md +docs/EmergencyAddress.md +docs/EmergencyAddressDto.md +docs/EmptyResponseDto.md +docs/ExpirationDefaults.md +docs/ExpiredControllerApi.md +docs/ExpiredInboxDto.md +docs/ExpiredInboxRecordProjection.md +docs/ExportControllerApi.md +docs/ExportLink.md +docs/ExportOptions.md +docs/FilterBouncedRecipientsOptions.md +docs/FilterBouncedRecipientsResult.md +docs/FlushExpiredInboxesResult.md +docs/FormControllerApi.md +docs/ForwardEmailOptions.md +docs/GravatarUrl.md +docs/GroupContactsDto.md +docs/GroupControllerApi.md +docs/GroupDto.md +docs/GroupProjection.md +docs/HTMLValidationResult.md +docs/IPAddressResult.md +docs/ImapFlagOperationOptions.md +docs/ImapSmtpAccessDetails.md +docs/InboxByEmailAddressResult.md +docs/InboxByNameResult.md +docs/InboxControllerApi.md +docs/InboxDto.md +docs/InboxExistsDto.md +docs/InboxForwarderControllerApi.md +docs/InboxForwarderDto.md +docs/InboxForwarderEventProjection.md +docs/InboxForwarderTestOptions.md +docs/InboxForwarderTestResult.md +docs/InboxIdItem.md +docs/InboxIdsResult.md +docs/InboxPreview.md +docs/InboxRulesetControllerApi.md +docs/InboxRulesetDto.md +docs/InboxRulesetTestOptions.md +docs/InboxRulesetTestResult.md +docs/JSONSchemaDto.md +docs/ListUnsubscribeRecipientProjection.md +docs/MailServerControllerApi.md +docs/MatchOption.md +docs/MatchOptions.md +docs/MissedEmailControllerApi.md +docs/MissedEmailDto.md +docs/MissedEmailProjection.md +docs/NameServerRecord.md +docs/OrganizationInboxProjection.md +docs/PageAlias.md +docs/PageAttachmentEntity.md +docs/PageBouncedEmail.md +docs/PageBouncedRecipients.md +docs/PageComplaint.md +docs/PageContactProjection.md +docs/PageDeliveryStatus.md +docs/PageEmailPreview.md +docs/PageEmailProjection.md +docs/PageEmailValidationRequest.md +docs/PageExpiredInboxRecordProjection.md +docs/PageGroupProjection.md +docs/PageInboxForwarderDto.md +docs/PageInboxForwarderEvents.md +docs/PageInboxProjection.md +docs/PageInboxRulesetDto.md +docs/PageListUnsubscribeRecipients.md +docs/PageMissedEmailProjection.md +docs/PageOrganizationInboxProjection.md +docs/PagePhoneNumberProjection.md +docs/PageScheduledJobs.md +docs/PageSentEmailProjection.md +docs/PageSentEmailWithQueueProjection.md +docs/PageSmsProjection.md +docs/PageTemplateProjection.md +docs/PageThreadProjection.md +docs/PageTrackingPixelProjection.md +docs/PageUnknownMissedEmailProjection.md +docs/PageWebhookProjection.md +docs/PageWebhookResult.md +docs/PageableObject.md +docs/PhoneControllerApi.md +docs/PhoneNumberDto.md +docs/PhoneNumberProjection.md +docs/PhonePlanDto.md +docs/RawEmailJson.md +docs/Recipient.md +docs/ReplyToAliasEmailOptions.md +docs/ReplyToEmailOptions.md +docs/ScheduledJob.md +docs/ScheduledJobDto.md +docs/SendEmailOptions.md +docs/SendSMTPEnvelopeOptions.md +docs/SendWithQueueResult.md +docs/Sender.md +docs/SentEmailDto.md +docs/SentEmailProjection.md +docs/SentEmailsControllerApi.md +docs/SetInboxFavouritedOptions.md +docs/SimpleSendEmailOptions.md +docs/SmsControllerApi.md +docs/SmsDto.md +docs/SmsMatchOption.md +docs/SmsPreview.md +docs/SmsProjection.md +docs/Sort.md +docs/TemplateControllerApi.md +docs/TemplateDto.md +docs/TemplatePreview.md +docs/TemplateProjection.md +docs/TemplateVariable.md +docs/TestNewInboxForwarderOptions.md +docs/TestNewInboxRulesetOptions.md +docs/TestPhoneNumberOptions.md +docs/ThreadProjection.md +docs/TrackingControllerApi.md +docs/TrackingPixelDto.md +docs/TrackingPixelProjection.md +docs/UnknownMissedEmailProjection.md +docs/UnreadCount.md +docs/UnseenErrorCountDto.md +docs/UpdateAliasOptions.md +docs/UpdateDomainOptions.md +docs/UpdateGroupContacts.md +docs/UpdateInboxOptions.md +docs/UploadAttachmentBytesRequest.md +docs/UploadAttachmentOptions.md +docs/UploadMultipartFormRequest.md +docs/UserInfoDto.md +docs/ValidateEmailAddressListOptions.md +docs/ValidateEmailAddressListResult.md +docs/ValidationDto.md +docs/ValidationMessage.md +docs/VerifyEmailAddressOptions.md +docs/VerifyWebhookSignatureOptions.md +docs/VerifyWebhookSignatureResults.md +docs/WaitForConditions.md +docs/WaitForControllerApi.md +docs/WaitForSingleSmsOptions.md +docs/WaitForSmsConditions.md +docs/WebhookBouncePayload.md +docs/WebhookBounceRecipientPayload.md +docs/WebhookControllerApi.md +docs/WebhookDeliveryStatusPayload.md +docs/WebhookDto.md +docs/WebhookEmailOpenedPayload.md +docs/WebhookEmailReadPayload.md +docs/WebhookHeaderNameValue.md +docs/WebhookHeaders.md +docs/WebhookNewAttachmentPayload.md +docs/WebhookNewContactPayload.md +docs/WebhookNewEmailPayload.md +docs/WebhookNewSmsPayload.md +docs/WebhookProjection.md +docs/WebhookRedriveResult.md +docs/WebhookResultDto.md +docs/WebhookTestRequest.md +docs/WebhookTestResponse.md +docs/WebhookTestResult.md +git_push.sh +mailslurp.sln +src/mailslurp.Test/Api/AliasControllerApiTests.cs +src/mailslurp.Test/Api/ApiUserControllerApiTests.cs +src/mailslurp.Test/Api/AttachmentControllerApiTests.cs +src/mailslurp.Test/Api/BounceControllerApiTests.cs +src/mailslurp.Test/Api/BulkActionsControllerApiTests.cs +src/mailslurp.Test/Api/CommonActionsControllerApiTests.cs +src/mailslurp.Test/Api/ContactControllerApiTests.cs +src/mailslurp.Test/Api/DomainControllerApiTests.cs +src/mailslurp.Test/Api/EmailControllerApiTests.cs +src/mailslurp.Test/Api/EmailVerificationControllerApiTests.cs +src/mailslurp.Test/Api/ExpiredControllerApiTests.cs +src/mailslurp.Test/Api/ExportControllerApiTests.cs +src/mailslurp.Test/Api/FormControllerApiTests.cs +src/mailslurp.Test/Api/GroupControllerApiTests.cs +src/mailslurp.Test/Api/InboxControllerApiTests.cs +src/mailslurp.Test/Api/InboxForwarderControllerApiTests.cs +src/mailslurp.Test/Api/InboxRulesetControllerApiTests.cs +src/mailslurp.Test/Api/MailServerControllerApiTests.cs +src/mailslurp.Test/Api/MissedEmailControllerApiTests.cs +src/mailslurp.Test/Api/PhoneControllerApiTests.cs +src/mailslurp.Test/Api/SentEmailsControllerApiTests.cs +src/mailslurp.Test/Api/SmsControllerApiTests.cs +src/mailslurp.Test/Api/TemplateControllerApiTests.cs +src/mailslurp.Test/Api/TrackingControllerApiTests.cs +src/mailslurp.Test/Api/WaitForControllerApiTests.cs +src/mailslurp.Test/Api/WebhookControllerApiTests.cs +src/mailslurp.Test/Model/AbstractWebhookPayloadTests.cs +src/mailslurp.Test/Model/AliasDtoTests.cs +src/mailslurp.Test/Model/AliasProjectionTests.cs +src/mailslurp.Test/Model/AttachmentEntityTests.cs +src/mailslurp.Test/Model/AttachmentMetaDataTests.cs +src/mailslurp.Test/Model/AttachmentProjectionTests.cs +src/mailslurp.Test/Model/BasicAuthOptionsTests.cs +src/mailslurp.Test/Model/BounceProjectionTests.cs +src/mailslurp.Test/Model/BounceRecipientProjectionTests.cs +src/mailslurp.Test/Model/BouncedEmailDtoTests.cs +src/mailslurp.Test/Model/BouncedRecipientDtoTests.cs +src/mailslurp.Test/Model/BulkSendEmailOptionsTests.cs +src/mailslurp.Test/Model/ComplaintTests.cs +src/mailslurp.Test/Model/ConditionOptionTests.cs +src/mailslurp.Test/Model/ContactDtoTests.cs +src/mailslurp.Test/Model/ContactProjectionTests.cs +src/mailslurp.Test/Model/ContentMatchOptionsTests.cs +src/mailslurp.Test/Model/CountDtoTests.cs +src/mailslurp.Test/Model/CreateAliasOptionsTests.cs +src/mailslurp.Test/Model/CreateContactOptionsTests.cs +src/mailslurp.Test/Model/CreateDomainOptionsTests.cs +src/mailslurp.Test/Model/CreateEmergencyAddressOptionsTests.cs +src/mailslurp.Test/Model/CreateGroupOptionsTests.cs +src/mailslurp.Test/Model/CreateInboxDtoTests.cs +src/mailslurp.Test/Model/CreateInboxForwarderOptionsTests.cs +src/mailslurp.Test/Model/CreateInboxRulesetOptionsTests.cs +src/mailslurp.Test/Model/CreateTemplateOptionsTests.cs +src/mailslurp.Test/Model/CreateTrackingPixelOptionsTests.cs +src/mailslurp.Test/Model/CreateWebhookOptionsTests.cs +src/mailslurp.Test/Model/DNSLookupOptionsTests.cs +src/mailslurp.Test/Model/DNSLookupResultTests.cs +src/mailslurp.Test/Model/DNSLookupResultsTests.cs +src/mailslurp.Test/Model/DeliveryStatusDtoTests.cs +src/mailslurp.Test/Model/DescribeDomainOptionsTests.cs +src/mailslurp.Test/Model/DescribeMailServerDomainResultTests.cs +src/mailslurp.Test/Model/DomainDtoTests.cs +src/mailslurp.Test/Model/DomainNameRecordTests.cs +src/mailslurp.Test/Model/DomainPreviewTests.cs +src/mailslurp.Test/Model/DownloadAttachmentDtoTests.cs +src/mailslurp.Test/Model/EmailAnalysisTests.cs +src/mailslurp.Test/Model/EmailContentMatchResultTests.cs +src/mailslurp.Test/Model/EmailHtmlDtoTests.cs +src/mailslurp.Test/Model/EmailLinksResultTests.cs +src/mailslurp.Test/Model/EmailPreviewTests.cs +src/mailslurp.Test/Model/EmailPreviewUrlsTests.cs +src/mailslurp.Test/Model/EmailProjectionTests.cs +src/mailslurp.Test/Model/EmailRecipientsTests.cs +src/mailslurp.Test/Model/EmailTests.cs +src/mailslurp.Test/Model/EmailTextLinesResultTests.cs +src/mailslurp.Test/Model/EmailValidationRequestDtoTests.cs +src/mailslurp.Test/Model/EmailVerificationResultTests.cs +src/mailslurp.Test/Model/EmergencyAddressDtoTests.cs +src/mailslurp.Test/Model/EmergencyAddressTests.cs +src/mailslurp.Test/Model/EmptyResponseDtoTests.cs +src/mailslurp.Test/Model/ExpirationDefaultsTests.cs +src/mailslurp.Test/Model/ExpiredInboxDtoTests.cs +src/mailslurp.Test/Model/ExpiredInboxRecordProjectionTests.cs +src/mailslurp.Test/Model/ExportLinkTests.cs +src/mailslurp.Test/Model/ExportOptionsTests.cs +src/mailslurp.Test/Model/FilterBouncedRecipientsOptionsTests.cs +src/mailslurp.Test/Model/FilterBouncedRecipientsResultTests.cs +src/mailslurp.Test/Model/FlushExpiredInboxesResultTests.cs +src/mailslurp.Test/Model/ForwardEmailOptionsTests.cs +src/mailslurp.Test/Model/GravatarUrlTests.cs +src/mailslurp.Test/Model/GroupContactsDtoTests.cs +src/mailslurp.Test/Model/GroupDtoTests.cs +src/mailslurp.Test/Model/GroupProjectionTests.cs +src/mailslurp.Test/Model/HTMLValidationResultTests.cs +src/mailslurp.Test/Model/IPAddressResultTests.cs +src/mailslurp.Test/Model/ImapFlagOperationOptionsTests.cs +src/mailslurp.Test/Model/ImapSmtpAccessDetailsTests.cs +src/mailslurp.Test/Model/InboxByEmailAddressResultTests.cs +src/mailslurp.Test/Model/InboxByNameResultTests.cs +src/mailslurp.Test/Model/InboxDtoTests.cs +src/mailslurp.Test/Model/InboxExistsDtoTests.cs +src/mailslurp.Test/Model/InboxForwarderDtoTests.cs +src/mailslurp.Test/Model/InboxForwarderEventProjectionTests.cs +src/mailslurp.Test/Model/InboxForwarderTestOptionsTests.cs +src/mailslurp.Test/Model/InboxForwarderTestResultTests.cs +src/mailslurp.Test/Model/InboxIdItemTests.cs +src/mailslurp.Test/Model/InboxIdsResultTests.cs +src/mailslurp.Test/Model/InboxPreviewTests.cs +src/mailslurp.Test/Model/InboxRulesetDtoTests.cs +src/mailslurp.Test/Model/InboxRulesetTestOptionsTests.cs +src/mailslurp.Test/Model/InboxRulesetTestResultTests.cs +src/mailslurp.Test/Model/JSONSchemaDtoTests.cs +src/mailslurp.Test/Model/ListUnsubscribeRecipientProjectionTests.cs +src/mailslurp.Test/Model/MatchOptionTests.cs +src/mailslurp.Test/Model/MatchOptionsTests.cs +src/mailslurp.Test/Model/MissedEmailDtoTests.cs +src/mailslurp.Test/Model/MissedEmailProjectionTests.cs +src/mailslurp.Test/Model/NameServerRecordTests.cs +src/mailslurp.Test/Model/OrganizationInboxProjectionTests.cs +src/mailslurp.Test/Model/PageAliasTests.cs +src/mailslurp.Test/Model/PageAttachmentEntityTests.cs +src/mailslurp.Test/Model/PageBouncedEmailTests.cs +src/mailslurp.Test/Model/PageBouncedRecipientsTests.cs +src/mailslurp.Test/Model/PageComplaintTests.cs +src/mailslurp.Test/Model/PageContactProjectionTests.cs +src/mailslurp.Test/Model/PageDeliveryStatusTests.cs +src/mailslurp.Test/Model/PageEmailPreviewTests.cs +src/mailslurp.Test/Model/PageEmailProjectionTests.cs +src/mailslurp.Test/Model/PageEmailValidationRequestTests.cs +src/mailslurp.Test/Model/PageExpiredInboxRecordProjectionTests.cs +src/mailslurp.Test/Model/PageGroupProjectionTests.cs +src/mailslurp.Test/Model/PageInboxForwarderDtoTests.cs +src/mailslurp.Test/Model/PageInboxForwarderEventsTests.cs +src/mailslurp.Test/Model/PageInboxProjectionTests.cs +src/mailslurp.Test/Model/PageInboxRulesetDtoTests.cs +src/mailslurp.Test/Model/PageListUnsubscribeRecipientsTests.cs +src/mailslurp.Test/Model/PageMissedEmailProjectionTests.cs +src/mailslurp.Test/Model/PageOrganizationInboxProjectionTests.cs +src/mailslurp.Test/Model/PagePhoneNumberProjectionTests.cs +src/mailslurp.Test/Model/PageScheduledJobsTests.cs +src/mailslurp.Test/Model/PageSentEmailProjectionTests.cs +src/mailslurp.Test/Model/PageSentEmailWithQueueProjectionTests.cs +src/mailslurp.Test/Model/PageSmsProjectionTests.cs +src/mailslurp.Test/Model/PageTemplateProjectionTests.cs +src/mailslurp.Test/Model/PageThreadProjectionTests.cs +src/mailslurp.Test/Model/PageTrackingPixelProjectionTests.cs +src/mailslurp.Test/Model/PageUnknownMissedEmailProjectionTests.cs +src/mailslurp.Test/Model/PageWebhookProjectionTests.cs +src/mailslurp.Test/Model/PageWebhookResultTests.cs +src/mailslurp.Test/Model/PageableObjectTests.cs +src/mailslurp.Test/Model/PhoneNumberDtoTests.cs +src/mailslurp.Test/Model/PhoneNumberProjectionTests.cs +src/mailslurp.Test/Model/PhonePlanDtoTests.cs +src/mailslurp.Test/Model/RawEmailJsonTests.cs +src/mailslurp.Test/Model/RecipientTests.cs +src/mailslurp.Test/Model/ReplyToAliasEmailOptionsTests.cs +src/mailslurp.Test/Model/ReplyToEmailOptionsTests.cs +src/mailslurp.Test/Model/ScheduledJobDtoTests.cs +src/mailslurp.Test/Model/ScheduledJobTests.cs +src/mailslurp.Test/Model/SendEmailOptionsTests.cs +src/mailslurp.Test/Model/SendSMTPEnvelopeOptionsTests.cs +src/mailslurp.Test/Model/SendWithQueueResultTests.cs +src/mailslurp.Test/Model/SenderTests.cs +src/mailslurp.Test/Model/SentEmailDtoTests.cs +src/mailslurp.Test/Model/SentEmailProjectionTests.cs +src/mailslurp.Test/Model/SetInboxFavouritedOptionsTests.cs +src/mailslurp.Test/Model/SimpleSendEmailOptionsTests.cs +src/mailslurp.Test/Model/SmsDtoTests.cs +src/mailslurp.Test/Model/SmsMatchOptionTests.cs +src/mailslurp.Test/Model/SmsPreviewTests.cs +src/mailslurp.Test/Model/SmsProjectionTests.cs +src/mailslurp.Test/Model/SortTests.cs +src/mailslurp.Test/Model/TemplateDtoTests.cs +src/mailslurp.Test/Model/TemplatePreviewTests.cs +src/mailslurp.Test/Model/TemplateProjectionTests.cs +src/mailslurp.Test/Model/TemplateVariableTests.cs +src/mailslurp.Test/Model/TestNewInboxForwarderOptionsTests.cs +src/mailslurp.Test/Model/TestNewInboxRulesetOptionsTests.cs +src/mailslurp.Test/Model/TestPhoneNumberOptionsTests.cs +src/mailslurp.Test/Model/ThreadProjectionTests.cs +src/mailslurp.Test/Model/TrackingPixelDtoTests.cs +src/mailslurp.Test/Model/TrackingPixelProjectionTests.cs +src/mailslurp.Test/Model/UnknownMissedEmailProjectionTests.cs +src/mailslurp.Test/Model/UnreadCountTests.cs +src/mailslurp.Test/Model/UnseenErrorCountDtoTests.cs +src/mailslurp.Test/Model/UpdateAliasOptionsTests.cs +src/mailslurp.Test/Model/UpdateDomainOptionsTests.cs +src/mailslurp.Test/Model/UpdateGroupContactsTests.cs +src/mailslurp.Test/Model/UpdateInboxOptionsTests.cs +src/mailslurp.Test/Model/UploadAttachmentBytesRequestTests.cs +src/mailslurp.Test/Model/UploadAttachmentOptionsTests.cs +src/mailslurp.Test/Model/UploadMultipartFormRequestTests.cs +src/mailslurp.Test/Model/UserInfoDtoTests.cs +src/mailslurp.Test/Model/ValidateEmailAddressListOptionsTests.cs +src/mailslurp.Test/Model/ValidateEmailAddressListResultTests.cs +src/mailslurp.Test/Model/ValidationDtoTests.cs +src/mailslurp.Test/Model/ValidationMessageTests.cs +src/mailslurp.Test/Model/VerifyEmailAddressOptionsTests.cs +src/mailslurp.Test/Model/VerifyWebhookSignatureOptionsTests.cs +src/mailslurp.Test/Model/VerifyWebhookSignatureResultsTests.cs +src/mailslurp.Test/Model/WaitForConditionsTests.cs +src/mailslurp.Test/Model/WaitForSingleSmsOptionsTests.cs +src/mailslurp.Test/Model/WaitForSmsConditionsTests.cs +src/mailslurp.Test/Model/WebhookBouncePayloadTests.cs +src/mailslurp.Test/Model/WebhookBounceRecipientPayloadTests.cs +src/mailslurp.Test/Model/WebhookDeliveryStatusPayloadTests.cs +src/mailslurp.Test/Model/WebhookDtoTests.cs +src/mailslurp.Test/Model/WebhookEmailOpenedPayloadTests.cs +src/mailslurp.Test/Model/WebhookEmailReadPayloadTests.cs +src/mailslurp.Test/Model/WebhookHeaderNameValueTests.cs +src/mailslurp.Test/Model/WebhookHeadersTests.cs +src/mailslurp.Test/Model/WebhookNewAttachmentPayloadTests.cs +src/mailslurp.Test/Model/WebhookNewContactPayloadTests.cs +src/mailslurp.Test/Model/WebhookNewEmailPayloadTests.cs +src/mailslurp.Test/Model/WebhookNewSmsPayloadTests.cs +src/mailslurp.Test/Model/WebhookProjectionTests.cs +src/mailslurp.Test/Model/WebhookRedriveResultTests.cs +src/mailslurp.Test/Model/WebhookResultDtoTests.cs +src/mailslurp.Test/Model/WebhookTestRequestTests.cs +src/mailslurp.Test/Model/WebhookTestResponseTests.cs +src/mailslurp.Test/Model/WebhookTestResultTests.cs +src/mailslurp.Test/mailslurp.Test.csproj +src/mailslurp/Api/AliasControllerApi.cs +src/mailslurp/Api/ApiUserControllerApi.cs +src/mailslurp/Api/AttachmentControllerApi.cs +src/mailslurp/Api/BounceControllerApi.cs +src/mailslurp/Api/BulkActionsControllerApi.cs +src/mailslurp/Api/CommonActionsControllerApi.cs +src/mailslurp/Api/ContactControllerApi.cs +src/mailslurp/Api/DomainControllerApi.cs +src/mailslurp/Api/EmailControllerApi.cs +src/mailslurp/Api/EmailVerificationControllerApi.cs +src/mailslurp/Api/ExpiredControllerApi.cs +src/mailslurp/Api/ExportControllerApi.cs +src/mailslurp/Api/FormControllerApi.cs +src/mailslurp/Api/GroupControllerApi.cs +src/mailslurp/Api/InboxControllerApi.cs +src/mailslurp/Api/InboxForwarderControllerApi.cs +src/mailslurp/Api/InboxRulesetControllerApi.cs +src/mailslurp/Api/MailServerControllerApi.cs +src/mailslurp/Api/MissedEmailControllerApi.cs +src/mailslurp/Api/PhoneControllerApi.cs +src/mailslurp/Api/SentEmailsControllerApi.cs +src/mailslurp/Api/SmsControllerApi.cs +src/mailslurp/Api/TemplateControllerApi.cs +src/mailslurp/Api/TrackingControllerApi.cs +src/mailslurp/Api/WaitForControllerApi.cs +src/mailslurp/Api/WebhookControllerApi.cs +src/mailslurp/Client/ApiClient.cs +src/mailslurp/Client/ApiException.cs +src/mailslurp/Client/ApiResponse.cs +src/mailslurp/Client/ClientUtils.cs +src/mailslurp/Client/Configuration.cs +src/mailslurp/Client/ExceptionFactory.cs +src/mailslurp/Client/GlobalConfiguration.cs +src/mailslurp/Client/HttpMethod.cs +src/mailslurp/Client/IApiAccessor.cs +src/mailslurp/Client/IAsynchronousClient.cs +src/mailslurp/Client/IReadableConfiguration.cs +src/mailslurp/Client/ISynchronousClient.cs +src/mailslurp/Client/Multimap.cs +src/mailslurp/Client/OpenAPIDateConverter.cs +src/mailslurp/Client/RequestOptions.cs +src/mailslurp/Client/RetryConfiguration.cs +src/mailslurp/Model/AbstractOpenAPISchema.cs +src/mailslurp/Model/AbstractWebhookPayload.cs +src/mailslurp/Model/AliasDto.cs +src/mailslurp/Model/AliasProjection.cs +src/mailslurp/Model/AttachmentEntity.cs +src/mailslurp/Model/AttachmentMetaData.cs +src/mailslurp/Model/AttachmentProjection.cs +src/mailslurp/Model/BasicAuthOptions.cs +src/mailslurp/Model/BounceProjection.cs +src/mailslurp/Model/BounceRecipientProjection.cs +src/mailslurp/Model/BouncedEmailDto.cs +src/mailslurp/Model/BouncedRecipientDto.cs +src/mailslurp/Model/BulkSendEmailOptions.cs +src/mailslurp/Model/Complaint.cs +src/mailslurp/Model/ConditionOption.cs +src/mailslurp/Model/ContactDto.cs +src/mailslurp/Model/ContactProjection.cs +src/mailslurp/Model/ContentMatchOptions.cs +src/mailslurp/Model/CountDto.cs +src/mailslurp/Model/CreateAliasOptions.cs +src/mailslurp/Model/CreateContactOptions.cs +src/mailslurp/Model/CreateDomainOptions.cs +src/mailslurp/Model/CreateEmergencyAddressOptions.cs +src/mailslurp/Model/CreateGroupOptions.cs +src/mailslurp/Model/CreateInboxDto.cs +src/mailslurp/Model/CreateInboxForwarderOptions.cs +src/mailslurp/Model/CreateInboxRulesetOptions.cs +src/mailslurp/Model/CreateTemplateOptions.cs +src/mailslurp/Model/CreateTrackingPixelOptions.cs +src/mailslurp/Model/CreateWebhookOptions.cs +src/mailslurp/Model/DNSLookupOptions.cs +src/mailslurp/Model/DNSLookupResult.cs +src/mailslurp/Model/DNSLookupResults.cs +src/mailslurp/Model/DeliveryStatusDto.cs +src/mailslurp/Model/DescribeDomainOptions.cs +src/mailslurp/Model/DescribeMailServerDomainResult.cs +src/mailslurp/Model/DomainDto.cs +src/mailslurp/Model/DomainNameRecord.cs +src/mailslurp/Model/DomainPreview.cs +src/mailslurp/Model/DownloadAttachmentDto.cs +src/mailslurp/Model/Email.cs +src/mailslurp/Model/EmailAnalysis.cs +src/mailslurp/Model/EmailContentMatchResult.cs +src/mailslurp/Model/EmailHtmlDto.cs +src/mailslurp/Model/EmailLinksResult.cs +src/mailslurp/Model/EmailPreview.cs +src/mailslurp/Model/EmailPreviewUrls.cs +src/mailslurp/Model/EmailProjection.cs +src/mailslurp/Model/EmailRecipients.cs +src/mailslurp/Model/EmailTextLinesResult.cs +src/mailslurp/Model/EmailValidationRequestDto.cs +src/mailslurp/Model/EmailVerificationResult.cs +src/mailslurp/Model/EmergencyAddress.cs +src/mailslurp/Model/EmergencyAddressDto.cs +src/mailslurp/Model/EmptyResponseDto.cs +src/mailslurp/Model/ExpirationDefaults.cs +src/mailslurp/Model/ExpiredInboxDto.cs +src/mailslurp/Model/ExpiredInboxRecordProjection.cs +src/mailslurp/Model/ExportLink.cs +src/mailslurp/Model/ExportOptions.cs +src/mailslurp/Model/FilterBouncedRecipientsOptions.cs +src/mailslurp/Model/FilterBouncedRecipientsResult.cs +src/mailslurp/Model/FlushExpiredInboxesResult.cs +src/mailslurp/Model/ForwardEmailOptions.cs +src/mailslurp/Model/GravatarUrl.cs +src/mailslurp/Model/GroupContactsDto.cs +src/mailslurp/Model/GroupDto.cs +src/mailslurp/Model/GroupProjection.cs +src/mailslurp/Model/HTMLValidationResult.cs +src/mailslurp/Model/IPAddressResult.cs +src/mailslurp/Model/ImapFlagOperationOptions.cs +src/mailslurp/Model/ImapSmtpAccessDetails.cs +src/mailslurp/Model/InboxByEmailAddressResult.cs +src/mailslurp/Model/InboxByNameResult.cs +src/mailslurp/Model/InboxDto.cs +src/mailslurp/Model/InboxExistsDto.cs +src/mailslurp/Model/InboxForwarderDto.cs +src/mailslurp/Model/InboxForwarderEventProjection.cs +src/mailslurp/Model/InboxForwarderTestOptions.cs +src/mailslurp/Model/InboxForwarderTestResult.cs +src/mailslurp/Model/InboxIdItem.cs +src/mailslurp/Model/InboxIdsResult.cs +src/mailslurp/Model/InboxPreview.cs +src/mailslurp/Model/InboxRulesetDto.cs +src/mailslurp/Model/InboxRulesetTestOptions.cs +src/mailslurp/Model/InboxRulesetTestResult.cs +src/mailslurp/Model/JSONSchemaDto.cs +src/mailslurp/Model/ListUnsubscribeRecipientProjection.cs +src/mailslurp/Model/MatchOption.cs +src/mailslurp/Model/MatchOptions.cs +src/mailslurp/Model/MissedEmailDto.cs +src/mailslurp/Model/MissedEmailProjection.cs +src/mailslurp/Model/NameServerRecord.cs +src/mailslurp/Model/OrganizationInboxProjection.cs +src/mailslurp/Model/PageAlias.cs +src/mailslurp/Model/PageAttachmentEntity.cs +src/mailslurp/Model/PageBouncedEmail.cs +src/mailslurp/Model/PageBouncedRecipients.cs +src/mailslurp/Model/PageComplaint.cs +src/mailslurp/Model/PageContactProjection.cs +src/mailslurp/Model/PageDeliveryStatus.cs +src/mailslurp/Model/PageEmailPreview.cs +src/mailslurp/Model/PageEmailProjection.cs +src/mailslurp/Model/PageEmailValidationRequest.cs +src/mailslurp/Model/PageExpiredInboxRecordProjection.cs +src/mailslurp/Model/PageGroupProjection.cs +src/mailslurp/Model/PageInboxForwarderDto.cs +src/mailslurp/Model/PageInboxForwarderEvents.cs +src/mailslurp/Model/PageInboxProjection.cs +src/mailslurp/Model/PageInboxRulesetDto.cs +src/mailslurp/Model/PageListUnsubscribeRecipients.cs +src/mailslurp/Model/PageMissedEmailProjection.cs +src/mailslurp/Model/PageOrganizationInboxProjection.cs +src/mailslurp/Model/PagePhoneNumberProjection.cs +src/mailslurp/Model/PageScheduledJobs.cs +src/mailslurp/Model/PageSentEmailProjection.cs +src/mailslurp/Model/PageSentEmailWithQueueProjection.cs +src/mailslurp/Model/PageSmsProjection.cs +src/mailslurp/Model/PageTemplateProjection.cs +src/mailslurp/Model/PageThreadProjection.cs +src/mailslurp/Model/PageTrackingPixelProjection.cs +src/mailslurp/Model/PageUnknownMissedEmailProjection.cs +src/mailslurp/Model/PageWebhookProjection.cs +src/mailslurp/Model/PageWebhookResult.cs +src/mailslurp/Model/PageableObject.cs +src/mailslurp/Model/PhoneNumberDto.cs +src/mailslurp/Model/PhoneNumberProjection.cs +src/mailslurp/Model/PhonePlanDto.cs +src/mailslurp/Model/RawEmailJson.cs +src/mailslurp/Model/Recipient.cs +src/mailslurp/Model/ReplyToAliasEmailOptions.cs +src/mailslurp/Model/ReplyToEmailOptions.cs +src/mailslurp/Model/ScheduledJob.cs +src/mailslurp/Model/ScheduledJobDto.cs +src/mailslurp/Model/SendEmailOptions.cs +src/mailslurp/Model/SendSMTPEnvelopeOptions.cs +src/mailslurp/Model/SendWithQueueResult.cs +src/mailslurp/Model/Sender.cs +src/mailslurp/Model/SentEmailDto.cs +src/mailslurp/Model/SentEmailProjection.cs +src/mailslurp/Model/SetInboxFavouritedOptions.cs +src/mailslurp/Model/SimpleSendEmailOptions.cs +src/mailslurp/Model/SmsDto.cs +src/mailslurp/Model/SmsMatchOption.cs +src/mailslurp/Model/SmsPreview.cs +src/mailslurp/Model/SmsProjection.cs +src/mailslurp/Model/Sort.cs +src/mailslurp/Model/TemplateDto.cs +src/mailslurp/Model/TemplatePreview.cs +src/mailslurp/Model/TemplateProjection.cs +src/mailslurp/Model/TemplateVariable.cs +src/mailslurp/Model/TestNewInboxForwarderOptions.cs +src/mailslurp/Model/TestNewInboxRulesetOptions.cs +src/mailslurp/Model/TestPhoneNumberOptions.cs +src/mailslurp/Model/ThreadProjection.cs +src/mailslurp/Model/TrackingPixelDto.cs +src/mailslurp/Model/TrackingPixelProjection.cs +src/mailslurp/Model/UnknownMissedEmailProjection.cs +src/mailslurp/Model/UnreadCount.cs +src/mailslurp/Model/UnseenErrorCountDto.cs +src/mailslurp/Model/UpdateAliasOptions.cs +src/mailslurp/Model/UpdateDomainOptions.cs +src/mailslurp/Model/UpdateGroupContacts.cs +src/mailslurp/Model/UpdateInboxOptions.cs +src/mailslurp/Model/UploadAttachmentBytesRequest.cs +src/mailslurp/Model/UploadAttachmentOptions.cs +src/mailslurp/Model/UploadMultipartFormRequest.cs +src/mailslurp/Model/UserInfoDto.cs +src/mailslurp/Model/ValidateEmailAddressListOptions.cs +src/mailslurp/Model/ValidateEmailAddressListResult.cs +src/mailslurp/Model/ValidationDto.cs +src/mailslurp/Model/ValidationMessage.cs +src/mailslurp/Model/VerifyEmailAddressOptions.cs +src/mailslurp/Model/VerifyWebhookSignatureOptions.cs +src/mailslurp/Model/VerifyWebhookSignatureResults.cs +src/mailslurp/Model/WaitForConditions.cs +src/mailslurp/Model/WaitForSingleSmsOptions.cs +src/mailslurp/Model/WaitForSmsConditions.cs +src/mailslurp/Model/WebhookBouncePayload.cs +src/mailslurp/Model/WebhookBounceRecipientPayload.cs +src/mailslurp/Model/WebhookDeliveryStatusPayload.cs +src/mailslurp/Model/WebhookDto.cs +src/mailslurp/Model/WebhookEmailOpenedPayload.cs +src/mailslurp/Model/WebhookEmailReadPayload.cs +src/mailslurp/Model/WebhookHeaderNameValue.cs +src/mailslurp/Model/WebhookHeaders.cs +src/mailslurp/Model/WebhookNewAttachmentPayload.cs +src/mailslurp/Model/WebhookNewContactPayload.cs +src/mailslurp/Model/WebhookNewEmailPayload.cs +src/mailslurp/Model/WebhookNewSmsPayload.cs +src/mailslurp/Model/WebhookProjection.cs +src/mailslurp/Model/WebhookRedriveResult.cs +src/mailslurp/Model/WebhookResultDto.cs +src/mailslurp/Model/WebhookTestRequest.cs +src/mailslurp/Model/WebhookTestResponse.cs +src/mailslurp/Model/WebhookTestResult.cs +src/mailslurp/mailslurp.csproj diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 00000000..0df17dd0 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.2.1 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..b1578dad --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2023 MailSlurp Email API (Provided by Pettman OÜ, Estonia) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..0eb1489f --- /dev/null +++ b/README.md @@ -0,0 +1,395 @@ +# MailSlurp C\# Client + +> Create real email addresses on demand. Send and receive emails and attachments from code and tests using CSharp (C# DotNet Core). + +MailSlurp is an email API service that lets you create real email addresses in code. You can then send and receive emails and attachments in C# applications and tests. + +```csharp +// create client +var config = new Configuration(); +config.ApiKey.Add("x-api-key", ApiKey); + +// create inboxes +var inboxControllerApi = new InboxControllerApi(config); +var inbox1 = inboxControllerApi.CreateInbox(); +var inbox2 = inboxControllerApi.CreateInbox(); + +// send email +inboxControllerApi.SendEmail(inbox1.Id, new SendEmailOptions( + to: new List {inbox2.EmailAddress}, + subject: "Test", + body: "Hello", + isHTML: true +)); + +// receive email with wait controller +var email = new WaitForControllerApi(config).WaitForLatestEmail(inbox2.Id, 60000, true); +StringAssert.Contains(email.Body, "Hello"); + +// list emails in inbox +var emails = inboxControllerApi.GetInboxEmailsPaginated(inbox2.Id); +Assert.AreEqual(emails.TotalElements, 1); +``` + +## Quick links + +- [Method Documentation](https://docs.mailslurp.com/csharp/docs/) +- [NuGet Package](https://www.nuget.org/packages/mailslurp/) +- [Code Examples](https://github.com/mailslurp/examples) +- [Github Source](https://github.com/mailslurp/mailslurp-client-csharp) +- [CSharp SMTP access](https://www.mailslurp.com/smtp/csharp-send-email-smtp/) + +### Tutorials + +- [SpecFlow email integration test](https://www.mailslurp.com/examples/specflow-test-email-accounts/) +- [Selenium DotNet email tutorial](https://www.mailslurp.com/examples/test-emails-selenium-dotnet-csharp/) + +## Get started + +This section describes how to get up and running with the CSharp client. The client targets `DotNet-Core 2.1` and greater. If you need a different target see the .NET Standard targets below or consider calling the [REST API](https://docs.mailslurp.com/api/). + +- [.NET Core 2.1](https://github.com/mailslurp/mailslurp-client-csharp) +- [.NET Standard 2.1](https://github.com/mailslurp/mailslurp-client-csharp-netstandard-2x) + +See the method documentation for a [list of all functions](https://github.com/mailslurp/mailslurp-client-csharp) + +### Create API Key + +First you'll need an API Key. [Create a free account](https://app.mailslurp.com) and copy the key from your dashboard. + +### Install NuGet Package + +MailSlurp's CSharp library is [hosted on NuGet](https://www.nuget.org/packages/mailslurp/). + +![dotnet add mailslurp](https://www.mailslurp.com/assets/dotnet-add-mailslurp.png) + +#### With .NET CLI + +```bash +dotnet add package mailslurp +dotnet restore +``` + +### Package Manager + +```bash +Install-Package mailslurp +``` + +## Configure client + +Once your MailSlurp package is installed you can configure a client with your API Key. + +```csharp +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +var config = new Configuration(); +config.ApiKey.Add("x-api-key", "your_api_key_here"); +``` + +### Create controllers + +You can call API controllers using the corresponding ControllerApi classes. + +```csharp +// create an inbox controller to control inboxes +var apiInstance = new InboxControllerApi(config); +``` + +### Common controllers + +- [EmailController](https://docs.mailslurp.com/csharp/docs/EmailControllerApi/) read and send emails +- [InboxController](https://docs.mailslurp.com/csharp/docs/InboxControllerApi/) create email addresses +- [WaitForController](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) wait for emails to arrive +- [WebhookController](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) manage http server webhooks + +## Common uses + +MailSlurp has many functions. Here are some common uses: + +### Create an inbox + +Inboxes have an ID and a real email address. You can create them using the [InboxController](https://docs.mailslurp.com/csharp/docs/InboxControllerApi/). For more information see the [creating inboxes guide](https://www.mailslurp.com/guides/creating-inboxes/). + +```csharp +var apiInstance = new InboxControllerApi(config); +var inbox = apiInstance.CreateInbox(); + +Assert.NotNull(inbox); +Assert.Contains("@mailslurp.com", inbox.EmailAddress); +``` + +#### Inbox types + +Inboxes can be either `SMTP` or `HTTP` type. Set the inbox type using the `inboxType` property. SMTP inboxes are handled by a custom mailserver and support a wide range of clients while HTTP inboxes use Amazon SES and don't support some older clients like Outlook. SMTP inboxes are recommended for public facing email addresses while HTTP inboxes are best for application testing. Please see the guide on [types of inboxes](https://www.mailslurp.com/guides/smtp-vs-http-email-inboxes/) for more information. + +### Send and receive using SMTP Client +MailSlurp provides SMTP and IMAP servers for all SMTP inboxes. Each account has unique username and password for IMAP and SMTP. + +| Protocol | Host | Port | TLS | Description | +|----------|------------------|------|-------|-------------| +| SMTP | mx.mailslurp.com | 2525 | false | SMTP server | +| IMAP | mailslurp.click | 1143 | false | IMAP server | + +If you wish to send or receive using SMTP in CSharp simply create an SMTP type inbox and use the `GetImapSmtpAccess` method on the inbox controller to obtain SMTP host, port, username and password for your client. Set SSL to false: + +```csharp +using System; +using System.Net; +using System.Net.Mail; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; +using Xunit; + +namespace SmtpService.Tests +{ + public class UnitTest1 + { + [Fact] + public void CanSendEmailWithMailSlurpSmtp() + { + var apiKey = Environment.GetEnvironmentVariable("API_KEY") + ?? throw new ArgumentNullException("Missing API_KEY environment variable containing MailSlurp key"); + + // configure client + var config = new Configuration(); + config.ApiKey.Add("x-api-key", apiKey); + var inboxController = new InboxControllerApi(config); + + // create an smtp inbox + var inbox = inboxController.CreateInboxWithOptions(new CreateInboxDto( + inboxType: CreateInboxDto.InboxTypeEnum.SMTPINBOX + )); + Assert.Contains("@mailslurp.mx", inbox.EmailAddress); + + // get smtp host, port, password, username etc + var imapSmtpAccessDetails = inboxController.GetImapSmtpAccess(); + var smtpClient = new SmtpClient(imapSmtpAccessDetails.SmtpServerHost) + { + Port = imapSmtpAccessDetails.SmtpServerPort, + Credentials = new NetworkCredential(userName: imapSmtpAccessDetails.SmtpUsername, password: imapSmtpAccessDetails.SmtpPassword), + // disable ssl recommended + EnableSsl = false + }; + + // send email to inbox + smtpClient.Send(from: "test@external.com", recipients: inbox.EmailAddress, subject: "This inbound", body: "Hello"); + + // wait for email to arrive + var waitController = new WaitForControllerApi(config); + waitController.WaitForLatestEmail(inboxId: inbox.Id, timeout: 30_000); + } + } +} +``` + +### Can list inboxes + +Inboxes are listed in paginated format: + +```csharp +[TestMethod] +public void Can_List_Inboxes() +{ + + // create an inbox controller + var inboxControllerApi = new InboxControllerApi(_config); + var pageInboxes = inboxControllerApi.GetAllInboxes(page:0, size:20); + + // result pagination options + Assert.IsTrue(pageInboxes.Number == 0); + + // contents contains the results + foreach (var inboxProjection in pageInboxes.Content) + { + Assert.IsNotNull(inboxProjection.Id); + } +} +``` + +See the [InboxController docs](https://docs.mailslurp.com/csharp/docs/InboxControllerApi/) for help. + +### Verify email address +Validate email recipients to maintain a good sender reputation and reduce bounces. + +```csharp +Log("Can validate email address"); +var emails = new List +{ + "contact@mailslurp.dev", + "bad@mailslurp.dev" +}; +var emailVerificationControllerApi = new EmailVerificationControllerApi(config); +var validateEmailAddressListResult = emailVerificationControllerApi.ValidateEmailAddressList(new ValidateEmailAddressListOptions(emails)); +Assert(validateEmailAddressListResult.InvalidEmailAddresses.Contains("bad@mailslurp.dev"), "Has invalid"); +Assert(validateEmailAddressListResult.ValidEmailAddresses.Contains("contact@mailslurp.dev"), "Has valid"); +``` + +### Send emails + +You can send an email by first creating an inbox. Then use the inbox ID to send an email from it. + +```csharp +var sendEmailOptions = new SendEmailOptions() +{ + To = new List‹string›() {"test@example.com"}, + Subject = "Hello", + Body = "

MailSlurp supports HTML

", +}; +apiInstance.SendEmail(inbox.Id, sendEmailOptions); +``` + +See the [SendEmailOptions](https://docs.mailslurp.com/csharp/docs/SendEmailOptions/) for sending options. + +### Receive emails + +You can fetch and read emails that already exist using the [EmailControllerApi](https://docs.mailslurp.com/csharp/docs/EmailControllerApi/). To wait for expected emails to arrive use the [WaitForControllerApi](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) to wait for conditions to be met. + +You can receive emails using `waitFor` methods on the [WaitForControllerApi](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) class. + +```csharp +var Timeout = 30000L; // max milliseconds to wait +var UnreadOnly = true; // only count unread emails + +var waitForInstance = new WaitForControllerApi(config); +var email = waitForInstance.WaitForLatestEmail(inbox.Id, Timeout, UnreadOnly); + +Assert.NotNull(email); +Assert.Equal("Hello", email.Subject); +Assert.Contains("Your code is: ", email.Body); +``` + +You can extract content from email bodies using RegExps: + +```csharp +// imagine that email body is `Your code is: 123` and you want to get the number +var rx = new Regex(@"Your code is: ([0-9]{3})", RegexOptions.Compiled); +var match = rx.Match(email.Body); +var code = match.Groups[1].Value; + +Assert.Equal("123", code); +``` + +If you are having trouble receiving emails please see the [email receiving guide](https://www.mailslurp.com/guides/receiving-emails/) or the [inbox not receiving support page](https://www.mailslurp.com/support/inbox-not-receiving-emails/). + +### Attachments + +To send attachments first upload them using the [AttachmentControllerApi](https://docs.mailslurp.com/csharp/docs/AttachmentControllerApi/). + +```csharp +private List _uploadAttachment() +{ + var attachmentControllerApi = new AttachmentControllerApi(_config); + // read a file in byte array + byte[] bytesOfAttachment = {0}; + // encode the bytes as base64 encoded string + string base64EncodedFile = Convert.ToBase64String(bytesOfAttachment, 0, bytesOfAttachment.Length); + // specify file name and content-type + var uploadOptions = new UploadAttachmentOptions(filename:"test.txt", contentType:"text/plain", base64Contents: base64EncodedFile); + // use the returned list of ids for subsequent sending (can return multiple ids depending on size of files). + return attachmentControllerApi.UploadAttachment(uploadOptions); +} +``` + +Then use the returned attachment IDs in the [SendEmailOptions](https://docs.mailslurp.com/csharp/docs/SendEmailOptions/) of your email send call. + +```csharp +[TestMethod] +public void Can_Receive_Email_Contents_And_Attachments() +{ + + // create two inboxes and send an email between them + var inboxControllerApi = new InboxControllerApi(_config); + var inbox1 = inboxControllerApi.CreateInbox(); + var inbox2 = inboxControllerApi.CreateInbox(); + + // send email with attachment from inbox 1 to inbox 2 + var sendEmailOptions = new SendEmailOptions( + // send to inbox 2 + to: new List {inbox2.EmailAddress}, + subject: "Hello inbox 2", + body: "Here is your attachment", + isHTML: true, + attachments: _uploadAttachment() + ); + inboxControllerApi.SendEmail(inbox1.Id, sendEmailOptions); + + // now wait for email to arrive in inbox 2 + var waitForControllerApi = new WaitForControllerApi(_config); + var email = waitForControllerApi.WaitForLatestEmail(inboxId: inbox2.Id, timeout: 30000, unreadOnly: true); + + // validate received email + StringAssert.Contains(email.Body, "Here is your attachment"); + StringAssert.Contains(email.Subject, "Hello inbox 2"); + Assert.IsTrue(email.Attachments.Count > 0); + + // fetch attachment + var emailControllerApi = new EmailControllerApi(_config); + var downloadAttachmentDto = emailControllerApi.DownloadAttachmentBase64(attachmentId: email.Attachments.First(), emailId: email.Id); + + StringAssert.Contains(downloadAttachmentDto.ContentType, "text/plain"); + Assert.IsNotNull(downloadAttachmentDto.SizeBytes); + Assert.IsNotNull(downloadAttachmentDto.Base64FileContents); // convert to bytes if you wish to parse or save file +} +``` + +### Get sent emails + +```csharp +[TestMethod] +public void Can_Get_Sent_Emails() +{ + + var sentEmailsControllerApi = new SentEmailsControllerApi(_config); + var inboxControllerApi = new InboxControllerApi(_config); + + var inbox = inboxControllerApi.CreateInbox(); + var sentEmails = sentEmailsControllerApi.GetSentEmails(inboxId:inbox.Id, page:0, size: 20); + + Assert.IsNotNull(sentEmails.Content); + Assert.IsNotNull(sentEmails.TotalPages); + Assert.AreEqual(sentEmails.Pageable.PageNumber, 0); + Assert.AreEqual(sentEmails.Pageable.PageSize, 20); +} +``` + +### Extract email content + +You can extract content using pattern matching with the [WaitForController](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) + +```csharp +[TestMethod] +public void Can_Extract_Codes() +{ + + // create an inbox + var inboxControllerApi = new InboxControllerApi(_config); + var inbox = inboxControllerApi.CreateInbox(); + + // send a code to the inbox + var sendEmailOptions = new SendEmailOptions( + to: new List() {inbox.EmailAddress}, + subject: "Welcome email", + body: "Hello. Your code is X-456" + ); + inboxControllerApi.SendEmail(inbox.Id, sendEmailOptions); + + // wait for the email to arrive + var waitForController = new WaitForControllerApi(_config); + var emailController = new EmailControllerApi(_config); + var email = waitForController.WaitForLatestEmail(inboxId:inbox.Id, timeout: 30000, unreadOnly: true); + StringAssert.Contains(email.Body, "Hello"); + + // extract the code + var matchOptions = new ContentMatchOptions(pattern:"Your code is ([A-Z]-[0-9]{3})"); + var matchResults = emailController.GetEmailContentMatch(email.Id, matchOptions); + Assert.AreEqual(matchResults.Matches[1], "X-456"); +} +``` + +## SDK Documentation + +See the GitHub source code for more [Method Documentation](https://docs.mailslurp.com/csharp/docs/). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..dc36834d --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,4 @@ +# Security + +This client calls the MailSlurp API endpoints. Connections should be made over secure HTTPS using your secure API Token. Do not share or commit the token if you can avoid doing so. +To report security issues or talk with MailSlurp support please email [support@mailslurp.zendesk.com](mailto:support@mailslurp.zendesk.com). diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 00000000..96f6bd0f --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,4 @@ +# Support + +To report issues or talk with MailSlurp support please email [support@mailslurp.zendesk.com](mailto:support@mailslurp.zendesk.com). +Alternatively you can visit our [support portal](https://mailslurp.zendesk.com) or open a ticket in the corresponding [Github repository](https://www.github.com/mailslurp). diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..ef3c5d66 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,9 @@ +# auto-generated by OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator) +# +image: Visual Studio 2019 +clone_depth: 1 +build_script: +- dotnet build -c Release +- dotnet test -c Release +after_build: +- dotnet pack .\src\mailslurp\mailslurp.csproj -o ../../output -c Release --no-build diff --git a/docs/AbstractWebhookPayload.md b/docs/AbstractWebhookPayload.md new file mode 100644 index 00000000..2f2182d2 --- /dev/null +++ b/docs/AbstractWebhookPayload.md @@ -0,0 +1,14 @@ +# mailslurp.Model.AbstractWebhookPayload +Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the `NEW_EMAIL`,`NEW_CONTACT`, `NEW_ATTACHMENT` and `EMAIL_OPENED` payloads for the properties available for those events. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventName** | **string** | | +**MessageId** | **string** | | +**WebhookId** | **Guid** | | +**WebhookName** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/AliasControllerApi.md b/docs/AliasControllerApi.md new file mode 100644 index 00000000..06752ecc --- /dev/null +++ b/docs/AliasControllerApi.md @@ -0,0 +1,908 @@ +# mailslurp.Api.AliasControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateAlias**](AliasControllerApi#createalias) | **POST** /aliases | Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. | +| [**DeleteAlias**](AliasControllerApi#deletealias) | **DELETE** /aliases/{aliasId} | Delete an email alias | +| [**GetAlias**](AliasControllerApi#getalias) | **GET** /aliases/{aliasId} | Get an email alias | +| [**GetAliasEmails**](AliasControllerApi#getaliasemails) | **GET** /aliases/{aliasId}/emails | Get emails for an alias | +| [**GetAliasThreads**](AliasControllerApi#getaliasthreads) | **GET** /aliases/{aliasId}/threads | Get threads created for an alias | +| [**GetAliases**](AliasControllerApi#getaliases) | **GET** /aliases | Get all email aliases you have created | +| [**ReplyToAliasEmail**](AliasControllerApi#replytoaliasemail) | **PUT** /aliases/{aliasId}/emails/{emailId} | Reply to an email | +| [**SendAliasEmail**](AliasControllerApi#sendaliasemail) | **POST** /aliases/{aliasId}/emails | Send an email from an alias inbox | +| [**UpdateAlias**](AliasControllerApi#updatealias) | **PUT** /aliases/{aliasId} | Update an email alias | + + +# **CreateAlias** +> AliasDto CreateAlias (CreateAliasOptions createAliasOptions) + +Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + +Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateAliasExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var createAliasOptions = new CreateAliasOptions(); // CreateAliasOptions | + + try + { + // Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + AliasDto result = apiInstance.CreateAlias(createAliasOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.CreateAlias: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateAliasWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + ApiResponse response = apiInstance.CreateAliasWithHttpInfo(createAliasOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.CreateAliasWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createAliasOptions** | [**CreateAliasOptions**](CreateAliasOptions) | | | + +### Return type + +[**AliasDto**](AliasDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteAlias** +> void DeleteAlias (Guid aliasId) + +Delete an email alias + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAliasExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var aliasId = "aliasId_example"; // Guid | + + try + { + // Delete an email alias + apiInstance.DeleteAlias(aliasId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.DeleteAlias: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAliasWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete an email alias + apiInstance.DeleteAliasWithHttpInfo(aliasId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.DeleteAliasWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **aliasId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAlias** +> AliasDto GetAlias (Guid aliasId) + +Get an email alias + +Get an email alias by ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAliasExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var aliasId = "aliasId_example"; // Guid | + + try + { + // Get an email alias + AliasDto result = apiInstance.GetAlias(aliasId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.GetAlias: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAliasWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an email alias + ApiResponse response = apiInstance.GetAliasWithHttpInfo(aliasId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.GetAliasWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **aliasId** | **Guid** | | | + +### Return type + +[**AliasDto**](AliasDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAliasEmails** +> PageEmailProjection GetAliasEmails (Guid aliasId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get emails for an alias + +Get paginated emails for an alias by ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAliasEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var aliasId = "aliasId_example"; // Guid | + var page = 0; // int? | Optional page index alias email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size alias email list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by sent after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by sent before given date time (optional) + + try + { + // Get emails for an alias + PageEmailProjection result = apiInstance.GetAliasEmails(aliasId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.GetAliasEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAliasEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get emails for an alias + ApiResponse response = apiInstance.GetAliasEmailsWithHttpInfo(aliasId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.GetAliasEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **aliasId** | **Guid** | | | +| **page** | **int?** | Optional page index alias email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size alias email list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Optional filter by sent after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by sent before given date time | [optional] | + +### Return type + +[**PageEmailProjection**](PageEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAliasThreads** +> PageThreadProjection GetAliasThreads (Guid aliasId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get threads created for an alias + +Returns threads created for an email alias in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAliasThreadsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var aliasId = "aliasId_example"; // Guid | + var page = 0; // int? | Optional page index in thread list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in thread list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by sent after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by sent before given date time (optional) + + try + { + // Get threads created for an alias + PageThreadProjection result = apiInstance.GetAliasThreads(aliasId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.GetAliasThreads: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAliasThreadsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get threads created for an alias + ApiResponse response = apiInstance.GetAliasThreadsWithHttpInfo(aliasId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.GetAliasThreadsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **aliasId** | **Guid** | | | +| **page** | **int?** | Optional page index in thread list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in thread list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Optional filter by sent after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by sent before given date time | [optional] | + +### Return type + +[**PageThreadProjection**](PageThreadProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAliases** +> PageAlias GetAliases (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get all email aliases you have created + +Get all email aliases in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAliasesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var page = 0; // int? | Optional page index in alias list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in alias list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get all email aliases you have created + PageAlias result = apiInstance.GetAliases(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.GetAliases: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAliasesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all email aliases you have created + ApiResponse response = apiInstance.GetAliasesWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.GetAliasesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in alias list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in alias list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageAlias**](PageAlias) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **ReplyToAliasEmail** +> SentEmailDto ReplyToAliasEmail (Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions) + +Reply to an email + +Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ReplyToAliasEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var aliasId = "aliasId_example"; // Guid | ID of the alias that email belongs to + var emailId = "emailId_example"; // Guid | ID of the email that should be replied to + var replyToAliasEmailOptions = new ReplyToAliasEmailOptions(); // ReplyToAliasEmailOptions | + + try + { + // Reply to an email + SentEmailDto result = apiInstance.ReplyToAliasEmail(aliasId, emailId, replyToAliasEmailOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.ReplyToAliasEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ReplyToAliasEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Reply to an email + ApiResponse response = apiInstance.ReplyToAliasEmailWithHttpInfo(aliasId, emailId, replyToAliasEmailOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.ReplyToAliasEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **aliasId** | **Guid** | ID of the alias that email belongs to | | +| **emailId** | **Guid** | ID of the email that should be replied to | | +| **replyToAliasEmailOptions** | [**ReplyToAliasEmailOptions**](ReplyToAliasEmailOptions) | | | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendAliasEmail** +> SentEmailDto SendAliasEmail (Guid aliasId, SendEmailOptions sendEmailOptions) + +Send an email from an alias inbox + +Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendAliasEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var aliasId = "aliasId_example"; // Guid | + var sendEmailOptions = new SendEmailOptions(); // SendEmailOptions | + + try + { + // Send an email from an alias inbox + SentEmailDto result = apiInstance.SendAliasEmail(aliasId, sendEmailOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.SendAliasEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendAliasEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send an email from an alias inbox + ApiResponse response = apiInstance.SendAliasEmailWithHttpInfo(aliasId, sendEmailOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.SendAliasEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **aliasId** | **Guid** | | | +| **sendEmailOptions** | [**SendEmailOptions**](SendEmailOptions) | | | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UpdateAlias** +> AliasDto UpdateAlias (Guid aliasId, UpdateAliasOptions updateAliasOptions) + +Update an email alias + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UpdateAliasExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AliasControllerApi(config); + var aliasId = "aliasId_example"; // Guid | + var updateAliasOptions = new UpdateAliasOptions(); // UpdateAliasOptions | + + try + { + // Update an email alias + AliasDto result = apiInstance.UpdateAlias(aliasId, updateAliasOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AliasControllerApi.UpdateAlias: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateAliasWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update an email alias + ApiResponse response = apiInstance.UpdateAliasWithHttpInfo(aliasId, updateAliasOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AliasControllerApi.UpdateAliasWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **aliasId** | **Guid** | | | +| **updateAliasOptions** | [**UpdateAliasOptions**](UpdateAliasOptions) | | | + +### Return type + +[**AliasDto**](AliasDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/AliasDto.md b/docs/AliasDto.md new file mode 100644 index 00000000..ba924434 --- /dev/null +++ b/docs/AliasDto.md @@ -0,0 +1,20 @@ +# mailslurp.Model.AliasDto +Email alias representation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**EmailAddress** | **string** | The alias's email address for receiving email | +**MaskedEmailAddress** | **string** | The underlying email address that is hidden and will received forwarded email | [optional] +**UserId** | **Guid** | | +**InboxId** | **Guid** | Inbox that is associated with the alias | +**Name** | **string** | | [optional] +**UseThreads** | **bool?** | If alias will generate response threads or not when email are received by it | [optional] +**IsVerified** | **bool** | Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account | +**CreatedAt** | **DateTime?** | | [optional] +**UpdatedAt** | **DateTime?** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/AliasProjection.md b/docs/AliasProjection.md new file mode 100644 index 00000000..26d890c5 --- /dev/null +++ b/docs/AliasProjection.md @@ -0,0 +1,18 @@ +# mailslurp.Model.AliasProjection +Representation of a alias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**Id** | **Guid** | | +**UserId** | **Guid** | | +**EmailAddress** | **string** | | +**InboxId** | **Guid** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**UseThreads** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ApiUserControllerApi.md b/docs/ApiUserControllerApi.md new file mode 100644 index 00000000..be5d2a5b --- /dev/null +++ b/docs/ApiUserControllerApi.md @@ -0,0 +1,192 @@ +# mailslurp.Api.ApiUserControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**GetJsonPropertyAsString**](ApiUserControllerApi#getjsonpropertyasstring) | **POST** /user/json/pluck | | +| [**GetUserInfo**](ApiUserControllerApi#getuserinfo) | **GET** /user/info | | + + +# **GetJsonPropertyAsString** +> string GetJsonPropertyAsString (string property, Object body) + + + +Utility function to extract properties from JSON objects in language where this is cumbersome. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetJsonPropertyAsStringExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ApiUserControllerApi(config); + var property = "property_example"; // string | JSON property name or dot separated path selector such as `a.b.c` + var body = null; // Object | + + try + { + string result = apiInstance.GetJsonPropertyAsString(property, body); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ApiUserControllerApi.GetJsonPropertyAsString: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetJsonPropertyAsStringWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetJsonPropertyAsStringWithHttpInfo(property, body); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ApiUserControllerApi.GetJsonPropertyAsStringWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **property** | **string** | JSON property name or dot separated path selector such as `a.b.c` | | +| **body** | **Object** | | | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetUserInfo** +> UserInfoDto GetUserInfo () + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetUserInfoExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ApiUserControllerApi(config); + + try + { + UserInfoDto result = apiInstance.GetUserInfo(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ApiUserControllerApi.GetUserInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetUserInfoWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetUserInfoWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ApiUserControllerApi.GetUserInfoWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**UserInfoDto**](UserInfoDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/AttachmentControllerApi.md b/docs/AttachmentControllerApi.md new file mode 100644 index 00000000..73e42a6d --- /dev/null +++ b/docs/AttachmentControllerApi.md @@ -0,0 +1,972 @@ +# mailslurp.Api.AttachmentControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**DeleteAllAttachments**](AttachmentControllerApi#deleteallattachments) | **DELETE** /attachments | Delete all attachments | +| [**DeleteAttachment**](AttachmentControllerApi#deleteattachment) | **DELETE** /attachments/{attachmentId} | Delete an attachment | +| [**DownloadAttachmentAsBase64Encoded**](AttachmentControllerApi#downloadattachmentasbase64encoded) | **GET** /attachments/{attachmentId}/base64 | Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. | +| [**DownloadAttachmentAsBytes**](AttachmentControllerApi#downloadattachmentasbytes) | **GET** /attachments/{attachmentId}/bytes | Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. | +| [**GetAttachment**](AttachmentControllerApi#getattachment) | **GET** /attachments/{attachmentId} | Get an attachment entity | +| [**GetAttachmentInfo**](AttachmentControllerApi#getattachmentinfo) | **GET** /attachments/{attachmentId}/metadata | Get email attachment metadata information | +| [**GetAttachments**](AttachmentControllerApi#getattachments) | **GET** /attachments | Get email attachments | +| [**UploadAttachment**](AttachmentControllerApi#uploadattachment) | **POST** /attachments | Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. | +| [**UploadAttachmentBytes**](AttachmentControllerApi#uploadattachmentbytes) | **POST** /attachments/bytes | Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. | +| [**UploadMultipartForm**](AttachmentControllerApi#uploadmultipartform) | **POST** /attachments/multipart | Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. | + + +# **DeleteAllAttachments** +> void DeleteAllAttachments () + +Delete all attachments + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAllAttachmentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + + try + { + // Delete all attachments + apiInstance.DeleteAllAttachments(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.DeleteAllAttachments: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAllAttachmentsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all attachments + apiInstance.DeleteAllAttachmentsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.DeleteAllAttachmentsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteAttachment** +> void DeleteAttachment (string attachmentId) + +Delete an attachment + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAttachmentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var attachmentId = "attachmentId_example"; // string | ID of attachment + + try + { + // Delete an attachment + apiInstance.DeleteAttachment(attachmentId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.DeleteAttachment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAttachmentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete an attachment + apiInstance.DeleteAttachmentWithHttpInfo(attachmentId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.DeleteAttachmentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **attachmentId** | **string** | ID of attachment | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DownloadAttachmentAsBase64Encoded** +> DownloadAttachmentDto DownloadAttachmentAsBase64Encoded (string attachmentId) + +Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + +Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DownloadAttachmentAsBase64EncodedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var attachmentId = "attachmentId_example"; // string | ID of attachment + + try + { + // Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + DownloadAttachmentDto result = apiInstance.DownloadAttachmentAsBase64Encoded(attachmentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.DownloadAttachmentAsBase64Encoded: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DownloadAttachmentAsBase64EncodedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + ApiResponse response = apiInstance.DownloadAttachmentAsBase64EncodedWithHttpInfo(attachmentId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.DownloadAttachmentAsBase64EncodedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **attachmentId** | **string** | ID of attachment | | + +### Return type + +[**DownloadAttachmentDto**](DownloadAttachmentDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DownloadAttachmentAsBytes** +> byte[] DownloadAttachmentAsBytes (string attachmentId) + +Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + +Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DownloadAttachmentAsBytesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var attachmentId = "attachmentId_example"; // string | ID of attachment + + try + { + // Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + byte[] result = apiInstance.DownloadAttachmentAsBytes(attachmentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.DownloadAttachmentAsBytes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DownloadAttachmentAsBytesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + ApiResponse response = apiInstance.DownloadAttachmentAsBytesWithHttpInfo(attachmentId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.DownloadAttachmentAsBytesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **attachmentId** | **string** | ID of attachment | | + +### Return type + +**byte[]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | default response | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAttachment** +> AttachmentEntity GetAttachment (string attachmentId) + +Get an attachment entity + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAttachmentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var attachmentId = "attachmentId_example"; // string | ID of attachment + + try + { + // Get an attachment entity + AttachmentEntity result = apiInstance.GetAttachment(attachmentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.GetAttachment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAttachmentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an attachment entity + ApiResponse response = apiInstance.GetAttachmentWithHttpInfo(attachmentId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.GetAttachmentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **attachmentId** | **string** | ID of attachment | | + +### Return type + +[**AttachmentEntity**](AttachmentEntity) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAttachmentInfo** +> AttachmentMetaData GetAttachmentInfo (string attachmentId) + +Get email attachment metadata information + +Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAttachmentInfoExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var attachmentId = "attachmentId_example"; // string | ID of attachment + + try + { + // Get email attachment metadata information + AttachmentMetaData result = apiInstance.GetAttachmentInfo(attachmentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.GetAttachmentInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAttachmentInfoWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email attachment metadata information + ApiResponse response = apiInstance.GetAttachmentInfoWithHttpInfo(attachmentId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.GetAttachmentInfoWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **attachmentId** | **string** | ID of attachment | | + +### Return type + +[**AttachmentMetaData**](AttachmentMetaData) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAttachments** +> PageAttachmentEntity GetAttachments (int? page = null, int? size = null, string sort = null, string fileNameFilter = null, DateTime? since = null, DateTime? before = null) + +Get email attachments + +Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAttachmentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var page = 0; // int? | Optional page index for list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size for list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var fileNameFilter = "fileNameFilter_example"; // string | Optional file name and content type search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get email attachments + PageAttachmentEntity result = apiInstance.GetAttachments(page, size, sort, fileNameFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.GetAttachments: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAttachmentsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email attachments + ApiResponse response = apiInstance.GetAttachmentsWithHttpInfo(page, size, sort, fileNameFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.GetAttachmentsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index for list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size for list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **fileNameFilter** | **string** | Optional file name and content type search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageAttachmentEntity**](PageAttachmentEntity) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UploadAttachment** +> List<string> UploadAttachment (UploadAttachmentOptions uploadAttachmentOptions) + +Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UploadAttachmentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var uploadAttachmentOptions = new UploadAttachmentOptions(); // UploadAttachmentOptions | + + try + { + // Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + List result = apiInstance.UploadAttachment(uploadAttachmentOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.UploadAttachment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UploadAttachmentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + ApiResponse> response = apiInstance.UploadAttachmentWithHttpInfo(uploadAttachmentOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.UploadAttachmentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **uploadAttachmentOptions** | [**UploadAttachmentOptions**](UploadAttachmentOptions) | | | + +### Return type + +**List** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UploadAttachmentBytes** +> List<string> UploadAttachmentBytes (UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = null, string filename = null) + +Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UploadAttachmentBytesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var uploadAttachmentBytesRequest = new UploadAttachmentBytesRequest(); // UploadAttachmentBytesRequest | + var contentType = "contentType_example"; // string | Optional contentType for file. For instance `application/pdf` (optional) + var filename = "filename_example"; // string | Optional filename to save upload with (optional) + + try + { + // Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + List result = apiInstance.UploadAttachmentBytes(uploadAttachmentBytesRequest, contentType, filename); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.UploadAttachmentBytes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UploadAttachmentBytesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + ApiResponse> response = apiInstance.UploadAttachmentBytesWithHttpInfo(uploadAttachmentBytesRequest, contentType, filename); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.UploadAttachmentBytesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **uploadAttachmentBytesRequest** | [**UploadAttachmentBytesRequest**](UploadAttachmentBytesRequest) | | | +| **contentType** | **string** | Optional contentType for file. For instance `application/pdf` | [optional] | +| **filename** | **string** | Optional filename to save upload with | [optional] | + +### Return type + +**List** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UploadMultipartForm** +> List<string> UploadMultipartForm (string contentType = null, string filename = null, string xFilename = null, UploadMultipartFormRequest uploadMultipartFormRequest = null) + +Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UploadMultipartFormExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new AttachmentControllerApi(config); + var contentType = "contentType_example"; // string | Optional content type of attachment (optional) + var filename = "filename_example"; // string | Optional name of file (optional) + var xFilename = "xFilename_example"; // string | Optional content type header of attachment (optional) + var uploadMultipartFormRequest = new UploadMultipartFormRequest(); // UploadMultipartFormRequest | (optional) + + try + { + // Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + List result = apiInstance.UploadMultipartForm(contentType, filename, xFilename, uploadMultipartFormRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AttachmentControllerApi.UploadMultipartForm: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UploadMultipartFormWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + ApiResponse> response = apiInstance.UploadMultipartFormWithHttpInfo(contentType, filename, xFilename, uploadMultipartFormRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AttachmentControllerApi.UploadMultipartFormWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **contentType** | **string** | Optional content type of attachment | [optional] | +| **filename** | **string** | Optional name of file | [optional] | +| **xFilename** | **string** | Optional content type header of attachment | [optional] | +| **uploadMultipartFormRequest** | [**UploadMultipartFormRequest**](UploadMultipartFormRequest) | | [optional] | + +### Return type + +**List** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/AttachmentEntity.md b/docs/AttachmentEntity.md new file mode 100644 index 00000000..123b5fe8 --- /dev/null +++ b/docs/AttachmentEntity.md @@ -0,0 +1,18 @@ +# mailslurp.Model.AttachmentEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | [optional] +**AttachmentId** | **string** | | +**Bucket** | **string** | | [optional] +**UserId** | **Guid** | | +**ContentType** | **string** | | [optional] +**ContentLength** | **long** | | [optional] +**Name** | **string** | | [optional] +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/AttachmentMetaData.md b/docs/AttachmentMetaData.md new file mode 100644 index 00000000..d2ad3716 --- /dev/null +++ b/docs/AttachmentMetaData.md @@ -0,0 +1,14 @@ +# mailslurp.Model.AttachmentMetaData +Meta data associated with an attachment. Attachments are stored as byte blobs so the meta data is stored separately. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of attachment if given | +**ContentType** | **string** | Content type of attachment such as `image/png` | +**ContentLength** | **long** | Size of attachment in bytes | +**Id** | **string** | ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/AttachmentProjection.md b/docs/AttachmentProjection.md new file mode 100644 index 00000000..dee48a33 --- /dev/null +++ b/docs/AttachmentProjection.md @@ -0,0 +1,17 @@ +# mailslurp.Model.AttachmentProjection +Email attachment data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**ContentLength** | **long?** | Content length of attachment in bytes | [optional] +**ContentType** | **string** | Content type of attachment. | [optional] +**UserId** | **Guid** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**AttachmentId** | **string** | Attachment ID | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/BasicAuthOptions.md b/docs/BasicAuthOptions.md new file mode 100644 index 00000000..7066e1c6 --- /dev/null +++ b/docs/BasicAuthOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.BasicAuthOptions +Basic Authentication options for webhooks. Will be used is present when calling webhook endpoints. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | +**Password** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/BounceControllerApi.md b/docs/BounceControllerApi.md new file mode 100644 index 00000000..af7bc0be --- /dev/null +++ b/docs/BounceControllerApi.md @@ -0,0 +1,716 @@ +# mailslurp.Api.BounceControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**FilterBouncedRecipient**](BounceControllerApi#filterbouncedrecipient) | **POST** /bounce/filter-recipients | Filter a list of email recipients and remove those who have bounced | +| [**GetBouncedEmail**](BounceControllerApi#getbouncedemail) | **GET** /bounce/emails/{id} | Get a bounced email. | +| [**GetBouncedEmails**](BounceControllerApi#getbouncedemails) | **GET** /bounce/emails | Get paginated list of bounced emails. | +| [**GetBouncedRecipient**](BounceControllerApi#getbouncedrecipient) | **GET** /bounce/recipients/{id} | Get a bounced email. | +| [**GetBouncedRecipients**](BounceControllerApi#getbouncedrecipients) | **GET** /bounce/recipients | Get paginated list of bounced recipients. | +| [**GetComplaints**](BounceControllerApi#getcomplaints) | **GET** /bounce/complaints | Get paginated list of complaints. | +| [**GetListUnsubscribeRecipients**](BounceControllerApi#getlistunsubscriberecipients) | **GET** /bounce/list-unsubscribe-recipients | Get paginated list of unsubscribed recipients. | + + +# **FilterBouncedRecipient** +> FilterBouncedRecipientsResult FilterBouncedRecipient (FilterBouncedRecipientsOptions filterBouncedRecipientsOptions) + +Filter a list of email recipients and remove those who have bounced + +Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class FilterBouncedRecipientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BounceControllerApi(config); + var filterBouncedRecipientsOptions = new FilterBouncedRecipientsOptions(); // FilterBouncedRecipientsOptions | + + try + { + // Filter a list of email recipients and remove those who have bounced + FilterBouncedRecipientsResult result = apiInstance.FilterBouncedRecipient(filterBouncedRecipientsOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BounceControllerApi.FilterBouncedRecipient: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the FilterBouncedRecipientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Filter a list of email recipients and remove those who have bounced + ApiResponse response = apiInstance.FilterBouncedRecipientWithHttpInfo(filterBouncedRecipientsOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BounceControllerApi.FilterBouncedRecipientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **filterBouncedRecipientsOptions** | [**FilterBouncedRecipientsOptions**](FilterBouncedRecipientsOptions) | | | + +### Return type + +[**FilterBouncedRecipientsResult**](FilterBouncedRecipientsResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetBouncedEmail** +> BouncedEmailDto GetBouncedEmail (Guid id) + +Get a bounced email. + +Bounced emails are email you have sent that were rejected by a recipient + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetBouncedEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BounceControllerApi(config); + var id = "id_example"; // Guid | ID of the bounced email to fetch + + try + { + // Get a bounced email. + BouncedEmailDto result = apiInstance.GetBouncedEmail(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BounceControllerApi.GetBouncedEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetBouncedEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a bounced email. + ApiResponse response = apiInstance.GetBouncedEmailWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BounceControllerApi.GetBouncedEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of the bounced email to fetch | | + +### Return type + +[**BouncedEmailDto**](BouncedEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetBouncedEmails** +> PageBouncedEmail GetBouncedEmails (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get paginated list of bounced emails. + +Bounced emails are email you have sent that were rejected by a recipient + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetBouncedEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BounceControllerApi(config); + var page = 0; // int? | Optional page index (optional) (default to 0) + var size = 20; // int? | Optional page size (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get paginated list of bounced emails. + PageBouncedEmail result = apiInstance.GetBouncedEmails(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BounceControllerApi.GetBouncedEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetBouncedEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get paginated list of bounced emails. + ApiResponse response = apiInstance.GetBouncedEmailsWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BounceControllerApi.GetBouncedEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index | [optional] [default to 0] | +| **size** | **int?** | Optional page size | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageBouncedEmail**](PageBouncedEmail) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetBouncedRecipient** +> BouncedRecipientDto GetBouncedRecipient (Guid id) + +Get a bounced email. + +Bounced emails are email you have sent that were rejected by a recipient + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetBouncedRecipientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BounceControllerApi(config); + var id = "id_example"; // Guid | ID of the bounced recipient + + try + { + // Get a bounced email. + BouncedRecipientDto result = apiInstance.GetBouncedRecipient(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BounceControllerApi.GetBouncedRecipient: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetBouncedRecipientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a bounced email. + ApiResponse response = apiInstance.GetBouncedRecipientWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BounceControllerApi.GetBouncedRecipientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of the bounced recipient | | + +### Return type + +[**BouncedRecipientDto**](BouncedRecipientDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetBouncedRecipients** +> PageBouncedRecipients GetBouncedRecipients (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get paginated list of bounced recipients. + +Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetBouncedRecipientsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BounceControllerApi(config); + var page = 0; // int? | Optional page index (optional) (default to 0) + var size = 20; // int? | Optional page size (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get paginated list of bounced recipients. + PageBouncedRecipients result = apiInstance.GetBouncedRecipients(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BounceControllerApi.GetBouncedRecipients: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetBouncedRecipientsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get paginated list of bounced recipients. + ApiResponse response = apiInstance.GetBouncedRecipientsWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BounceControllerApi.GetBouncedRecipientsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index | [optional] [default to 0] | +| **size** | **int?** | Optional page size | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageBouncedRecipients**](PageBouncedRecipients) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetComplaints** +> PageComplaint GetComplaints (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get paginated list of complaints. + +SMTP complaints made against your account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetComplaintsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BounceControllerApi(config); + var page = 0; // int? | Optional page index (optional) (default to 0) + var size = 20; // int? | Optional page size (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get paginated list of complaints. + PageComplaint result = apiInstance.GetComplaints(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BounceControllerApi.GetComplaints: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetComplaintsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get paginated list of complaints. + ApiResponse response = apiInstance.GetComplaintsWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BounceControllerApi.GetComplaintsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index | [optional] [default to 0] | +| **size** | **int?** | Optional page size | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageComplaint**](PageComplaint) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetListUnsubscribeRecipients** +> PageListUnsubscribeRecipients GetListUnsubscribeRecipients (int? page = null, int? size = null, string sort = null, Guid? domainId = null) + +Get paginated list of unsubscribed recipients. + +Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetListUnsubscribeRecipientsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BounceControllerApi(config); + var page = 0; // int? | Optional page index (optional) (default to 0) + var size = 20; // int? | Optional page size (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var domainId = "domainId_example"; // Guid? | Filter by domainId (optional) + + try + { + // Get paginated list of unsubscribed recipients. + PageListUnsubscribeRecipients result = apiInstance.GetListUnsubscribeRecipients(page, size, sort, domainId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BounceControllerApi.GetListUnsubscribeRecipients: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetListUnsubscribeRecipientsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get paginated list of unsubscribed recipients. + ApiResponse response = apiInstance.GetListUnsubscribeRecipientsWithHttpInfo(page, size, sort, domainId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BounceControllerApi.GetListUnsubscribeRecipientsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index | [optional] [default to 0] | +| **size** | **int?** | Optional page size | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **domainId** | **Guid?** | Filter by domainId | [optional] | + +### Return type + +[**PageListUnsubscribeRecipients**](PageListUnsubscribeRecipients) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/BounceProjection.md b/docs/BounceProjection.md new file mode 100644 index 00000000..6212e7f5 --- /dev/null +++ b/docs/BounceProjection.md @@ -0,0 +1,16 @@ +# mailslurp.Model.BounceProjection +Bounced email event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | [optional] +**Sender** | **string** | | +**Subject** | **string** | | [optional] +**CreatedAt** | **DateTime** | | +**BounceType** | **string** | | [optional] +**BounceMta** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/BounceRecipientProjection.md b/docs/BounceRecipientProjection.md new file mode 100644 index 00000000..33cae9d5 --- /dev/null +++ b/docs/BounceRecipientProjection.md @@ -0,0 +1,16 @@ +# mailslurp.Model.BounceRecipientProjection +Bounced recipient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | [optional] +**Status** | **string** | | [optional] +**SentEmailId** | **Guid?** | | [optional] +**CreatedAt** | **DateTime** | | +**Recipient** | **string** | | +**Action** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/BouncedEmailDto.md b/docs/BouncedEmailDto.md new file mode 100644 index 00000000..cb1c7580 --- /dev/null +++ b/docs/BouncedEmailDto.md @@ -0,0 +1,22 @@ +# mailslurp.Model.BouncedEmailDto +Bounced email + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**NotificationType** | **string** | | +**SentToRecipients** | **List<string>** | | [optional] +**Sender** | **string** | | +**BounceMta** | **string** | | [optional] +**BounceType** | **string** | | [optional] +**BounceRecipients** | **List<string>** | | [optional] +**BounceSubType** | **string** | | [optional] +**SentEmailId** | **Guid?** | | [optional] +**Subject** | **string** | | [optional] +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/BouncedRecipientDto.md b/docs/BouncedRecipientDto.md new file mode 100644 index 00000000..3e0e0822 --- /dev/null +++ b/docs/BouncedRecipientDto.md @@ -0,0 +1,18 @@ +# mailslurp.Model.BouncedRecipientDto +Bounced recipient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid?** | | [optional] +**SentEmailId** | **Guid?** | | [optional] +**Recipient** | **string** | | +**DiagnosticCode** | **string** | | [optional] +**Action** | **string** | | [optional] +**Status** | **string** | | [optional] +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/BulkActionsControllerApi.md b/docs/BulkActionsControllerApi.md new file mode 100644 index 00000000..4a2d7d72 --- /dev/null +++ b/docs/BulkActionsControllerApi.md @@ -0,0 +1,284 @@ +# mailslurp.Api.BulkActionsControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**BulkCreateInboxes**](BulkActionsControllerApi#bulkcreateinboxes) | **POST** /bulk/inboxes | Bulk create Inboxes (email addresses) | +| [**BulkDeleteInboxes**](BulkActionsControllerApi#bulkdeleteinboxes) | **DELETE** /bulk/inboxes | Bulk Delete Inboxes | +| [**BulkSendEmails**](BulkActionsControllerApi#bulksendemails) | **POST** /bulk/send | Bulk Send Emails | + + +# **BulkCreateInboxes** +> List<InboxDto> BulkCreateInboxes (int count) + +Bulk create Inboxes (email addresses) + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class BulkCreateInboxesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BulkActionsControllerApi(config); + var count = 56; // int | Number of inboxes to be created in bulk + + try + { + // Bulk create Inboxes (email addresses) + List result = apiInstance.BulkCreateInboxes(count); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BulkActionsControllerApi.BulkCreateInboxes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the BulkCreateInboxesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Bulk create Inboxes (email addresses) + ApiResponse> response = apiInstance.BulkCreateInboxesWithHttpInfo(count); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BulkActionsControllerApi.BulkCreateInboxesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **count** | **int** | Number of inboxes to be created in bulk | | + +### Return type + +[**List<InboxDto>**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **BulkDeleteInboxes** +> void BulkDeleteInboxes (List requestBody) + +Bulk Delete Inboxes + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class BulkDeleteInboxesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BulkActionsControllerApi(config); + var requestBody = new List(); // List | + + try + { + // Bulk Delete Inboxes + apiInstance.BulkDeleteInboxes(requestBody); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BulkActionsControllerApi.BulkDeleteInboxes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the BulkDeleteInboxesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Bulk Delete Inboxes + apiInstance.BulkDeleteInboxesWithHttpInfo(requestBody); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BulkActionsControllerApi.BulkDeleteInboxesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **requestBody** | [**List<Guid>**](Guid) | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **BulkSendEmails** +> void BulkSendEmails (BulkSendEmailOptions bulkSendEmailOptions) + +Bulk Send Emails + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class BulkSendEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new BulkActionsControllerApi(config); + var bulkSendEmailOptions = new BulkSendEmailOptions(); // BulkSendEmailOptions | + + try + { + // Bulk Send Emails + apiInstance.BulkSendEmails(bulkSendEmailOptions); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BulkActionsControllerApi.BulkSendEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the BulkSendEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Bulk Send Emails + apiInstance.BulkSendEmailsWithHttpInfo(bulkSendEmailOptions); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BulkActionsControllerApi.BulkSendEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **bulkSendEmailOptions** | [**BulkSendEmailOptions**](BulkSendEmailOptions) | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/BulkSendEmailOptions.md b/docs/BulkSendEmailOptions.md new file mode 100644 index 00000000..3cc16b70 --- /dev/null +++ b/docs/BulkSendEmailOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.BulkSendEmailOptions +Options for bulk sending an email from multiple addresses. See regular `sendEmail` methods for more information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxIds** | **List<Guid>** | Inboxes to send the email from | +**SendEmailOptions** | [**SendEmailOptions**](SendEmailOptions) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CommonActionsControllerApi.md b/docs/CommonActionsControllerApi.md new file mode 100644 index 00000000..82eb5315 --- /dev/null +++ b/docs/CommonActionsControllerApi.md @@ -0,0 +1,524 @@ +# mailslurp.Api.CommonActionsControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateNewEmailAddress**](CommonActionsControllerApi#createnewemailaddress) | **POST** /newEmailAddress | Create new random inbox | +| [**CreateRandomInbox**](CommonActionsControllerApi#createrandominbox) | **POST** /createInbox | Create new random inbox | +| [**DeleteEmailAddress**](CommonActionsControllerApi#deleteemailaddress) | **DELETE** /deleteEmailAddress | Delete inbox email address by inbox id | +| [**EmptyInbox**](CommonActionsControllerApi#emptyinbox) | **DELETE** /emptyInbox | Delete all emails in an inbox | +| [**SendEmailSimple**](CommonActionsControllerApi#sendemailsimple) | **POST** /sendEmail | Send an email | + + +# **CreateNewEmailAddress** +> InboxDto CreateNewEmailAddress (bool? allowTeamAccess = null, bool? useDomainPool = null, DateTime? expiresAt = null, long? expiresIn = null, string emailAddress = null, string inboxType = null, string description = null, string name = null, List tags = null, bool? favourite = null, bool? virtualInbox = null, bool? useShortAddress = null) + +Create new random inbox + +Returns an Inbox with an `id` and an `emailAddress` + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateNewEmailAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new CommonActionsControllerApi(config); + var allowTeamAccess = true; // bool? | (optional) + var useDomainPool = true; // bool? | (optional) + var expiresAt = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | (optional) + var expiresIn = 789L; // long? | (optional) + var emailAddress = "emailAddress_example"; // string | (optional) + var inboxType = "HTTP_INBOX"; // string | (optional) + var description = "description_example"; // string | (optional) + var name = "name_example"; // string | (optional) + var tags = new List(); // List | (optional) + var favourite = true; // bool? | (optional) + var virtualInbox = true; // bool? | (optional) + var useShortAddress = true; // bool? | (optional) + + try + { + // Create new random inbox + InboxDto result = apiInstance.CreateNewEmailAddress(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling CommonActionsControllerApi.CreateNewEmailAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateNewEmailAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create new random inbox + ApiResponse response = apiInstance.CreateNewEmailAddressWithHttpInfo(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling CommonActionsControllerApi.CreateNewEmailAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **allowTeamAccess** | **bool?** | | [optional] | +| **useDomainPool** | **bool?** | | [optional] | +| **expiresAt** | **DateTime?** | | [optional] | +| **expiresIn** | **long?** | | [optional] | +| **emailAddress** | **string** | | [optional] | +| **inboxType** | **string** | | [optional] | +| **description** | **string** | | [optional] | +| **name** | **string** | | [optional] | +| **tags** | [**List<string>**](string) | | [optional] | +| **favourite** | **bool?** | | [optional] | +| **virtualInbox** | **bool?** | | [optional] | +| **useShortAddress** | **bool?** | | [optional] | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateRandomInbox** +> InboxDto CreateRandomInbox (bool? allowTeamAccess = null, bool? useDomainPool = null, DateTime? expiresAt = null, long? expiresIn = null, string emailAddress = null, string inboxType = null, string description = null, string name = null, List tags = null, bool? favourite = null, bool? virtualInbox = null, bool? useShortAddress = null) + +Create new random inbox + +Returns an Inbox with an `id` and an `emailAddress` + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateRandomInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new CommonActionsControllerApi(config); + var allowTeamAccess = true; // bool? | (optional) + var useDomainPool = true; // bool? | (optional) + var expiresAt = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | (optional) + var expiresIn = 789L; // long? | (optional) + var emailAddress = "emailAddress_example"; // string | (optional) + var inboxType = "HTTP_INBOX"; // string | (optional) + var description = "description_example"; // string | (optional) + var name = "name_example"; // string | (optional) + var tags = new List(); // List | (optional) + var favourite = true; // bool? | (optional) + var virtualInbox = true; // bool? | (optional) + var useShortAddress = true; // bool? | (optional) + + try + { + // Create new random inbox + InboxDto result = apiInstance.CreateRandomInbox(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling CommonActionsControllerApi.CreateRandomInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateRandomInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create new random inbox + ApiResponse response = apiInstance.CreateRandomInboxWithHttpInfo(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling CommonActionsControllerApi.CreateRandomInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **allowTeamAccess** | **bool?** | | [optional] | +| **useDomainPool** | **bool?** | | [optional] | +| **expiresAt** | **DateTime?** | | [optional] | +| **expiresIn** | **long?** | | [optional] | +| **emailAddress** | **string** | | [optional] | +| **inboxType** | **string** | | [optional] | +| **description** | **string** | | [optional] | +| **name** | **string** | | [optional] | +| **tags** | [**List<string>**](string) | | [optional] | +| **favourite** | **bool?** | | [optional] | +| **virtualInbox** | **bool?** | | [optional] | +| **useShortAddress** | **bool?** | | [optional] | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteEmailAddress** +> void DeleteEmailAddress (Guid inboxId) + +Delete inbox email address by inbox id + +Deletes inbox email address + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteEmailAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new CommonActionsControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + + try + { + // Delete inbox email address by inbox id + apiInstance.DeleteEmailAddress(inboxId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling CommonActionsControllerApi.DeleteEmailAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteEmailAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete inbox email address by inbox id + apiInstance.DeleteEmailAddressWithHttpInfo(inboxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling CommonActionsControllerApi.DeleteEmailAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **EmptyInbox** +> void EmptyInbox (Guid inboxId) + +Delete all emails in an inbox + +Deletes all emails + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class EmptyInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new CommonActionsControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + + try + { + // Delete all emails in an inbox + apiInstance.EmptyInbox(inboxId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling CommonActionsControllerApi.EmptyInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the EmptyInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all emails in an inbox + apiInstance.EmptyInboxWithHttpInfo(inboxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling CommonActionsControllerApi.EmptyInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendEmailSimple** +> void SendEmailSimple (SimpleSendEmailOptions simpleSendEmailOptions) + +Send an email + +If no senderId or inboxId provided a random email address will be used to send from. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendEmailSimpleExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new CommonActionsControllerApi(config); + var simpleSendEmailOptions = new SimpleSendEmailOptions(); // SimpleSendEmailOptions | + + try + { + // Send an email + apiInstance.SendEmailSimple(simpleSendEmailOptions); + } + catch (ApiException e) + { + Debug.Print("Exception when calling CommonActionsControllerApi.SendEmailSimple: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendEmailSimpleWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send an email + apiInstance.SendEmailSimpleWithHttpInfo(simpleSendEmailOptions); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling CommonActionsControllerApi.SendEmailSimpleWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **simpleSendEmailOptions** | [**SimpleSendEmailOptions**](SimpleSendEmailOptions) | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/Complaint.md b/docs/Complaint.md new file mode 100644 index 00000000..121049ee --- /dev/null +++ b/docs/Complaint.md @@ -0,0 +1,17 @@ +# mailslurp.Model.Complaint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | [optional] +**EventType** | **string** | | [optional] +**MailSource** | **string** | | [optional] +**MailMessageId** | **string** | | [optional] +**ComplaintRecipient** | **string** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ConditionOption.md b/docs/ConditionOption.md new file mode 100644 index 00000000..059ac527 --- /dev/null +++ b/docs/ConditionOption.md @@ -0,0 +1,12 @@ +# mailslurp.Model.ConditionOption +Options for matching emails in an inbox based on a condition such as `HAS_ATTACHMENTS=TRUE` + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Condition** | **string** | Condition of an email object that can be used to filter results | +**Value** | **string** | Expected condition value | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ContactControllerApi.md b/docs/ContactControllerApi.md new file mode 100644 index 00000000..71f54210 --- /dev/null +++ b/docs/ContactControllerApi.md @@ -0,0 +1,576 @@ +# mailslurp.Api.ContactControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateContact**](ContactControllerApi#createcontact) | **POST** /contacts | Create a contact | +| [**DeleteContact**](ContactControllerApi#deletecontact) | **DELETE** /contacts/{contactId} | Delete contact | +| [**GetAllContacts**](ContactControllerApi#getallcontacts) | **GET** /contacts/paginated | Get all contacts | +| [**GetContact**](ContactControllerApi#getcontact) | **GET** /contacts/{contactId} | Get contact | +| [**GetContactVCard**](ContactControllerApi#getcontactvcard) | **GET** /contacts/{contactId}/download | Get contact vCard vcf file | +| [**GetContacts**](ContactControllerApi#getcontacts) | **GET** /contacts | Get all contacts | + + +# **CreateContact** +> ContactDto CreateContact (CreateContactOptions createContactOptions) + +Create a contact + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateContactExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ContactControllerApi(config); + var createContactOptions = new CreateContactOptions(); // CreateContactOptions | + + try + { + // Create a contact + ContactDto result = apiInstance.CreateContact(createContactOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ContactControllerApi.CreateContact: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateContactWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create a contact + ApiResponse response = apiInstance.CreateContactWithHttpInfo(createContactOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ContactControllerApi.CreateContactWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createContactOptions** | [**CreateContactOptions**](CreateContactOptions) | | | + +### Return type + +[**ContactDto**](ContactDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteContact** +> void DeleteContact (Guid contactId) + +Delete contact + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteContactExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ContactControllerApi(config); + var contactId = "contactId_example"; // Guid | + + try + { + // Delete contact + apiInstance.DeleteContact(contactId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ContactControllerApi.DeleteContact: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteContactWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete contact + apiInstance.DeleteContactWithHttpInfo(contactId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ContactControllerApi.DeleteContactWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **contactId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllContacts** +> PageContactProjection GetAllContacts (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get all contacts + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllContactsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ContactControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get all contacts + PageContactProjection result = apiInstance.GetAllContacts(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ContactControllerApi.GetAllContacts: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllContactsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all contacts + ApiResponse response = apiInstance.GetAllContactsWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ContactControllerApi.GetAllContactsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageContactProjection**](PageContactProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetContact** +> ContactDto GetContact (Guid contactId) + +Get contact + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetContactExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ContactControllerApi(config); + var contactId = "contactId_example"; // Guid | + + try + { + // Get contact + ContactDto result = apiInstance.GetContact(contactId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ContactControllerApi.GetContact: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetContactWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get contact + ApiResponse response = apiInstance.GetContactWithHttpInfo(contactId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ContactControllerApi.GetContactWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **contactId** | **Guid** | | | + +### Return type + +[**ContactDto**](ContactDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetContactVCard** +> List<byte[]> GetContactVCard (Guid contactId) + +Get contact vCard vcf file + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetContactVCardExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ContactControllerApi(config); + var contactId = "contactId_example"; // Guid | + + try + { + // Get contact vCard vcf file + List result = apiInstance.GetContactVCard(contactId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ContactControllerApi.GetContactVCard: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetContactVCardWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get contact vCard vcf file + ApiResponse> response = apiInstance.GetContactVCardWithHttpInfo(contactId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ContactControllerApi.GetContactVCardWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **contactId** | **Guid** | | | + +### Return type + +**List** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetContacts** +> List<ContactProjection> GetContacts () + +Get all contacts + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetContactsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ContactControllerApi(config); + + try + { + // Get all contacts + List result = apiInstance.GetContacts(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ContactControllerApi.GetContacts: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetContactsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all contacts + ApiResponse> response = apiInstance.GetContactsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ContactControllerApi.GetContactsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**List<ContactProjection>**](ContactProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ContactDto.md b/docs/ContactDto.md new file mode 100644 index 00000000..e1b115c2 --- /dev/null +++ b/docs/ContactDto.md @@ -0,0 +1,21 @@ +# mailslurp.Model.ContactDto +Contact object. For saving a user in contact book. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**GroupId** | **Guid?** | | [optional] +**FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Company** | **string** | | [optional] +**EmailAddresses** | **List<string>** | | +**PrimaryEmailAddress** | **string** | | [optional] +**Tags** | **List<string>** | | +**MetaData** | **Object** | | [optional] +**OptOut** | **bool?** | | [optional] +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ContactProjection.md b/docs/ContactProjection.md new file mode 100644 index 00000000..b9dd37be --- /dev/null +++ b/docs/ContactProjection.md @@ -0,0 +1,18 @@ +# mailslurp.Model.ContactProjection +Email contact for address book + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**GroupId** | **Guid?** | | [optional] +**CreatedAt** | **DateTime** | | +**FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Company** | **string** | | [optional] +**EmailAddresses** | **List<string>** | | [optional] +**OptOut** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ContentMatchOptions.md b/docs/ContentMatchOptions.md new file mode 100644 index 00000000..56387fa2 --- /dev/null +++ b/docs/ContentMatchOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.ContentMatchOptions +Options for matching content using regex patterns based on Java Pattern syntax + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Pattern** | **string** | Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CountDto.md b/docs/CountDto.md new file mode 100644 index 00000000..9b736baf --- /dev/null +++ b/docs/CountDto.md @@ -0,0 +1,11 @@ +# mailslurp.Model.CountDto +Number of elements + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TotalElements** | **long** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateAliasOptions.md b/docs/CreateAliasOptions.md new file mode 100644 index 00000000..dc6648e0 --- /dev/null +++ b/docs/CreateAliasOptions.md @@ -0,0 +1,14 @@ +# mailslurp.Model.CreateAliasOptions +Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailAddress** | **string** | Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. | +**InboxId** | **Guid?** | Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address | [optional] +**Name** | **string** | Optional name for alias | [optional] +**UseThreads** | **bool** | Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateContactOptions.md b/docs/CreateContactOptions.md new file mode 100644 index 00000000..35c0c97c --- /dev/null +++ b/docs/CreateContactOptions.md @@ -0,0 +1,18 @@ +# mailslurp.Model.CreateContactOptions +Options for creating an email contact in address book + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Company** | **string** | | [optional] +**EmailAddresses** | **List<string>** | Set of email addresses belonging to the contact | [optional] +**Tags** | **List<string>** | Tags that can be used to search and group contacts | [optional] +**MetaData** | **Object** | | [optional] +**OptOut** | **bool?** | Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. | [optional] +**GroupId** | **Guid?** | Group IDs that contact belongs to | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateDomainOptions.md b/docs/CreateDomainOptions.md new file mode 100644 index 00000000..257ca25f --- /dev/null +++ b/docs/CreateDomainOptions.md @@ -0,0 +1,14 @@ +# mailslurp.Model.CreateDomainOptions +Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not function correctly until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. Domains can be either `HTTP` or `SMTP` type. The type of domain determines which inboxes can be used with it. `SMTP` inboxes use a mail server running `mx.mailslurp.com` while `HTTP` inboxes are handled by AWS SES. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. | +**Description** | **string** | Optional description of the domain. | [optional] +**CreatedCatchAllInbox** | **bool?** | Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID. | [optional] +**DomainType** | **string** | Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateEmergencyAddressOptions.md b/docs/CreateEmergencyAddressOptions.md new file mode 100644 index 00000000..4925d3ba --- /dev/null +++ b/docs/CreateEmergencyAddressOptions.md @@ -0,0 +1,16 @@ +# mailslurp.Model.CreateEmergencyAddressOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerName** | **string** | | +**Address1** | **string** | | +**City** | **string** | | +**Region** | **string** | | +**PostalCode** | **string** | | +**IsoCountryCode** | **string** | | +**DisplayName** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateGroupOptions.md b/docs/CreateGroupOptions.md new file mode 100644 index 00000000..5b7da4b2 --- /dev/null +++ b/docs/CreateGroupOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.CreateGroupOptions +Create contact group options + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateInboxDto.md b/docs/CreateInboxDto.md new file mode 100644 index 00000000..abd14d23 --- /dev/null +++ b/docs/CreateInboxDto.md @@ -0,0 +1,22 @@ +# mailslurp.Model.CreateInboxDto +Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. `SMTP` inboxes are processed by a mail server running at `mx.mailslurp.com` while `HTTP` inboxes are processed by AWS SES. Inboxes can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailAddress** | **string** | A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] +**Name** | **string** | Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. | [optional] +**Description** | **string** | Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with | [optional] +**UseDomainPool** | **bool?** | Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. | [optional] +**Tags** | **List<string>** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**ExpiresAt** | **DateTime?** | Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. | [optional] +**Favourite** | **bool?** | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering | [optional] +**ExpiresIn** | **long?** | Number of milliseconds that inbox should exist for | [optional] +**AllowTeamAccess** | **bool?** | DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. | [optional] +**InboxType** | **string** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**VirtualInbox** | **bool?** | Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. | [optional] +**UseShortAddress** | **bool?** | Use a shorter email address under 31 characters | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateInboxForwarderOptions.md b/docs/CreateInboxForwarderOptions.md new file mode 100644 index 00000000..14b50fc8 --- /dev/null +++ b/docs/CreateInboxForwarderOptions.md @@ -0,0 +1,13 @@ +# mailslurp.Model.CreateInboxForwarderOptions +Options for creating an inbox forwarder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | Field to match against to trigger inbox forwarding for inbound email | +**Match** | **string** | String or wildcard style match for field specified when evaluating forwarding rules | +**ForwardToRecipients** | **List<string>** | Email addresses to forward an email to if it matches the field and match criteria of the forwarder | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateInboxRulesetOptions.md b/docs/CreateInboxRulesetOptions.md new file mode 100644 index 00000000..3ad9d29e --- /dev/null +++ b/docs/CreateInboxRulesetOptions.md @@ -0,0 +1,13 @@ +# mailslurp.Model.CreateInboxRulesetOptions +Options for creating inbox rulesets. Inbox rulesets can be used to block, allow, filter, or forward emails when sending or receiving using the inbox. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scope** | **string** | What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. | +**Action** | **string** | Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. | +**Target** | **string** | Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateTemplateOptions.md b/docs/CreateTemplateOptions.md new file mode 100644 index 00000000..d5f51f83 --- /dev/null +++ b/docs/CreateTemplateOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.CreateTemplateOptions +Create template options + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of template | +**Content** | **string** | Template content. Can include moustache style variables such as {{var_name}} | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateTrackingPixelOptions.md b/docs/CreateTrackingPixelOptions.md new file mode 100644 index 00000000..80e1bbfe --- /dev/null +++ b/docs/CreateTrackingPixelOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.CreateTrackingPixelOptions +Options for creating a tracking pixel for email open tracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**Recipient** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/CreateWebhookOptions.md b/docs/CreateWebhookOptions.md new file mode 100644 index 00000000..772a2602 --- /dev/null +++ b/docs/CreateWebhookOptions.md @@ -0,0 +1,16 @@ +# mailslurp.Model.CreateWebhookOptions +Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale. Customize the payload sent to your endpoint by setting the `requestBodyTemplate` property to a string with moustache style variables. Property names from the standard payload model for the given event are available as variables. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. | +**BasicAuth** | [**BasicAuthOptions**](BasicAuthOptions) | | [optional] +**Name** | **string** | Optional name for the webhook | [optional] +**EventName** | **string** | Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. | [optional] +**IncludeHeaders** | [**WebhookHeaders**](WebhookHeaders) | | [optional] +**RequestBodyTemplate** | **string** | Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style `{{variableName}}` templating to use parts of the standard webhook payload for the given event. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DNSLookupOptions.md b/docs/DNSLookupOptions.md new file mode 100644 index 00000000..5e83807a --- /dev/null +++ b/docs/DNSLookupOptions.md @@ -0,0 +1,13 @@ +# mailslurp.Model.DNSLookupOptions +Options for DNS query. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hostname** | **string** | List of record types you wish to query such as MX, DNS, TXT, NS, A etc. | +**RecordTypes** | **List<DNSLookupOptions.RecordTypesEnum>** | List of record types you wish to query such as MX, DNS, TXT, NS, A etc. | +**OmitFinalDNSDot** | **bool** | Optionally control whether to omit the final dot in full DNS name values. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DNSLookupResult.md b/docs/DNSLookupResult.md new file mode 100644 index 00000000..8bbd263d --- /dev/null +++ b/docs/DNSLookupResult.md @@ -0,0 +1,14 @@ +# mailslurp.Model.DNSLookupResult +DNS lookup result. Includes record type, time to live, raw response, and name value for the name server response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecordType** | **string** | Domain Name Server Record Types | +**Ttl** | **long** | | +**RecordEntries** | **List<string>** | | +**Name** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DNSLookupResults.md b/docs/DNSLookupResults.md new file mode 100644 index 00000000..5e0cdc9a --- /dev/null +++ b/docs/DNSLookupResults.md @@ -0,0 +1,11 @@ +# mailslurp.Model.DNSLookupResults +Results of query on domain name servers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**List<DNSLookupResult>**](DNSLookupResult) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DeliveryStatusDto.md b/docs/DeliveryStatusDto.md new file mode 100644 index 00000000..36ef85f3 --- /dev/null +++ b/docs/DeliveryStatusDto.md @@ -0,0 +1,23 @@ +# mailslurp.Model.DeliveryStatusDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**SentId** | **Guid** | | [optional] +**RemoteMtaIp** | **string** | | [optional] +**InboxId** | **Guid** | | [optional] +**ReportingMta** | **string** | | [optional] +**Recipients** | **List<string>** | | [optional] +**SmtpResponse** | **string** | | [optional] +**SmtpStatusCode** | **int** | | [optional] +**ProcessingTimeMillis** | **long** | | [optional] +**Received** | **DateTime** | | [optional] +**Subject** | **string** | | [optional] +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DescribeDomainOptions.md b/docs/DescribeDomainOptions.md new file mode 100644 index 00000000..d00a8187 --- /dev/null +++ b/docs/DescribeDomainOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.DescribeDomainOptions +Domain record description + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DescribeMailServerDomainResult.md b/docs/DescribeMailServerDomainResult.md new file mode 100644 index 00000000..927664b7 --- /dev/null +++ b/docs/DescribeMailServerDomainResult.md @@ -0,0 +1,13 @@ +# mailslurp.Model.DescribeMailServerDomainResult +Name Server lookup result + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MxRecords** | [**List<NameServerRecord>**](NameServerRecord) | | +**Domain** | **string** | | +**Message** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DomainControllerApi.md b/docs/DomainControllerApi.md new file mode 100644 index 00000000..03e501a7 --- /dev/null +++ b/docs/DomainControllerApi.md @@ -0,0 +1,683 @@ +# mailslurp.Api.DomainControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**AddDomainWildcardCatchAll**](DomainControllerApi#adddomainwildcardcatchall) | **POST** /domains/{id}/wildcard | Add catch all wild card inbox to domain | +| [**CreateDomain**](DomainControllerApi#createdomain) | **POST** /domains | Create Domain | +| [**DeleteDomain**](DomainControllerApi#deletedomain) | **DELETE** /domains/{id} | Delete a domain | +| [**GetDomain**](DomainControllerApi#getdomain) | **GET** /domains/{id} | Get a domain | +| [**GetDomainWildcardCatchAllInbox**](DomainControllerApi#getdomainwildcardcatchallinbox) | **GET** /domains/{id}/wildcard | Get catch all wild card inbox for domain | +| [**GetDomains**](DomainControllerApi#getdomains) | **GET** /domains | Get domains | +| [**UpdateDomain**](DomainControllerApi#updatedomain) | **PUT** /domains/{id} | Update a domain | + + +# **AddDomainWildcardCatchAll** +> DomainDto AddDomainWildcardCatchAll (Guid id) + +Add catch all wild card inbox to domain + +Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class AddDomainWildcardCatchAllExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new DomainControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Add catch all wild card inbox to domain + DomainDto result = apiInstance.AddDomainWildcardCatchAll(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DomainControllerApi.AddDomainWildcardCatchAll: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the AddDomainWildcardCatchAllWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Add catch all wild card inbox to domain + ApiResponse response = apiInstance.AddDomainWildcardCatchAllWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DomainControllerApi.AddDomainWildcardCatchAllWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateDomain** +> DomainDto CreateDomain (CreateDomainOptions createDomainOptions) + +Create Domain + +Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateDomainExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new DomainControllerApi(config); + var createDomainOptions = new CreateDomainOptions(); // CreateDomainOptions | + + try + { + // Create Domain + DomainDto result = apiInstance.CreateDomain(createDomainOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DomainControllerApi.CreateDomain: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateDomainWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create Domain + ApiResponse response = apiInstance.CreateDomainWithHttpInfo(createDomainOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DomainControllerApi.CreateDomainWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createDomainOptions** | [**CreateDomainOptions**](CreateDomainOptions) | | | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteDomain** +> List<string> DeleteDomain (Guid id) + +Delete a domain + +Delete a domain. This will disable any existing inboxes that use this domain. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteDomainExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new DomainControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Delete a domain + List result = apiInstance.DeleteDomain(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DomainControllerApi.DeleteDomain: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteDomainWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete a domain + ApiResponse> response = apiInstance.DeleteDomainWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DomainControllerApi.DeleteDomainWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +**List** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetDomain** +> DomainDto GetDomain (Guid id) + +Get a domain + +Returns domain verification status and tokens for a given domain + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetDomainExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new DomainControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Get a domain + DomainDto result = apiInstance.GetDomain(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DomainControllerApi.GetDomain: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDomainWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a domain + ApiResponse response = apiInstance.GetDomainWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DomainControllerApi.GetDomainWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetDomainWildcardCatchAllInbox** +> InboxDto GetDomainWildcardCatchAllInbox (Guid id) + +Get catch all wild card inbox for domain + +Get the catch all inbox for a domain for missed emails + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetDomainWildcardCatchAllInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new DomainControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Get catch all wild card inbox for domain + InboxDto result = apiInstance.GetDomainWildcardCatchAllInbox(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DomainControllerApi.GetDomainWildcardCatchAllInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDomainWildcardCatchAllInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get catch all wild card inbox for domain + ApiResponse response = apiInstance.GetDomainWildcardCatchAllInboxWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DomainControllerApi.GetDomainWildcardCatchAllInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetDomains** +> List<DomainPreview> GetDomains () + +Get domains + +List all custom domains you have created + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetDomainsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new DomainControllerApi(config); + + try + { + // Get domains + List result = apiInstance.GetDomains(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DomainControllerApi.GetDomains: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDomainsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get domains + ApiResponse> response = apiInstance.GetDomainsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DomainControllerApi.GetDomainsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**List<DomainPreview>**](DomainPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UpdateDomain** +> DomainDto UpdateDomain (Guid id, UpdateDomainOptions updateDomainOptions) + +Update a domain + +Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UpdateDomainExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new DomainControllerApi(config); + var id = "id_example"; // Guid | + var updateDomainOptions = new UpdateDomainOptions(); // UpdateDomainOptions | + + try + { + // Update a domain + DomainDto result = apiInstance.UpdateDomain(id, updateDomainOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DomainControllerApi.UpdateDomain: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateDomainWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update a domain + ApiResponse response = apiInstance.UpdateDomainWithHttpInfo(id, updateDomainOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DomainControllerApi.UpdateDomainWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | +| **updateDomainOptions** | [**UpdateDomainOptions**](UpdateDomainOptions) | | | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/DomainDto.md b/docs/DomainDto.md new file mode 100644 index 00000000..e1dd94ea --- /dev/null +++ b/docs/DomainDto.md @@ -0,0 +1,21 @@ +# mailslurp.Model.DomainDto +Domain plus verification records and status + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**Domain** | **string** | Custom domain name | +**VerificationToken** | **string** | Verification tokens | +**DkimTokens** | **List<string>** | Unique token DKIM tokens | +**IsVerified** | **bool** | Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. | +**DomainNameRecords** | [**List<DomainNameRecord>**](DomainNameRecord) | List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. | +**CatchAllInboxId** | **Guid?** | The optional catch all inbox that will receive emails sent to the domain that cannot be matched. | [optional] +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**DomainType** | **string** | Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DomainNameRecord.md b/docs/DomainNameRecord.md new file mode 100644 index 00000000..96b639ef --- /dev/null +++ b/docs/DomainNameRecord.md @@ -0,0 +1,14 @@ +# mailslurp.Model.DomainNameRecord +DNS Record required for verification of a domain. Record vary depending on domain type. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecordType** | **string** | Domain Name Server Record Types | +**Name** | **string** | | +**RecordEntries** | **List<string>** | | +**Ttl** | **long** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DomainPreview.md b/docs/DomainPreview.md new file mode 100644 index 00000000..7a66a714 --- /dev/null +++ b/docs/DomainPreview.md @@ -0,0 +1,16 @@ +# mailslurp.Model.DomainPreview +Preview object for domain entity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**Domain** | **string** | | +**CatchAllInboxId** | **Guid?** | | [optional] +**CreatedAt** | **DateTime** | | +**DomainType** | **string** | Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. | +**IsVerified** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/DownloadAttachmentDto.md b/docs/DownloadAttachmentDto.md new file mode 100644 index 00000000..552187d2 --- /dev/null +++ b/docs/DownloadAttachmentDto.md @@ -0,0 +1,13 @@ +# mailslurp.Model.DownloadAttachmentDto +Content of attachment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Base64FileContents** | **string** | Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. | +**ContentType** | **string** | Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. | +**SizeBytes** | **long** | Size in bytes of attachment content | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/Email.md b/docs/Email.md new file mode 100644 index 00000000..8796e6ab --- /dev/null +++ b/docs/Email.md @@ -0,0 +1,35 @@ +# mailslurp.Model.Email +Email entity (also known as EmailDto). When an SMTP email message is received by MailSlurp it is parsed. The body and attachments are written to disk and the fields such as to, from, subject etc are stored in a database. The `body` contains the email content. If you want the original SMTP message see the `getRawEmail` endpoints. The attachments can be fetched using the AttachmentController + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of the email entity | +**UserId** | **Guid** | ID of user that email belongs to | +**InboxId** | **Guid** | ID of the inbox that received the email | +**DomainId** | **Guid?** | ID of the domain that received the email | [optional] +**To** | **List<string>** | List of `To` recipient email addresses that the email was addressed to. See recipients object for names. | +**From** | **string** | Who the email was sent from. An email address - see fromName for the sender name. | [optional] +**Sender** | [**Sender**](Sender) | | [optional] +**Recipients** | [**EmailRecipients**](EmailRecipients) | | [optional] +**ReplyTo** | **string** | The `replyTo` field on the received email message | [optional] +**Cc** | **List<string>** | List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**Bcc** | **List<string>** | List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**Headers** | **Dictionary<string, string>** | Collection of SMTP headers attached to email | [optional] +**Attachments** | **List<string>** | List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. | [optional] +**Subject** | **string** | The subject line of the email message as specified by SMTP subject header | [optional] +**Body** | **string** | The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests. | [optional] +**BodyExcerpt** | **string** | An excerpt of the body of the email message for quick preview . | [optional] +**BodyMD5Hash** | **string** | A hash signature of the email message using MD5. Useful for comparing emails without fetching full body. | [optional] +**IsHTML** | **bool?** | Is the email body content type HTML? | [optional] +**Charset** | **string** | Detected character set of the email body such as UTF-8 | [optional] +**Analysis** | [**EmailAnalysis**](EmailAnalysis) | | [optional] +**CreatedAt** | **DateTime** | When was the email received by MailSlurp | +**UpdatedAt** | **DateTime** | When was the email last updated | +**Read** | **bool** | Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. | +**TeamAccess** | **bool** | Can the email be accessed by organization team members | +**Html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailAnalysis.md b/docs/EmailAnalysis.md new file mode 100644 index 00000000..b8503c09 --- /dev/null +++ b/docs/EmailAnalysis.md @@ -0,0 +1,15 @@ +# mailslurp.Model.EmailAnalysis +Analysis result for email. Each verdict property is a string PASS|FAIL|GRAY or dynamic error message + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SpamVerdict** | **string** | Verdict of spam ranking analysis | [optional] +**VirusVerdict** | **string** | Verdict of virus scan analysis | [optional] +**SpfVerdict** | **string** | Verdict of Send Policy Framework record spoofing analysis | [optional] +**DkimVerdict** | **string** | Verdict of DomainKeys Identified Mail analysis | [optional] +**DmarcVerdict** | **string** | Verdict of Domain-based Message Authentication Reporting and Conformance analysis | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailContentMatchResult.md b/docs/EmailContentMatchResult.md new file mode 100644 index 00000000..7c2d63c4 --- /dev/null +++ b/docs/EmailContentMatchResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.EmailContentMatchResult +Matches for the given pattern + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Pattern** | **string** | | +**Matches** | **List<string>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailControllerApi.md b/docs/EmailControllerApi.md new file mode 100644 index 00000000..5f10f976 --- /dev/null +++ b/docs/EmailControllerApi.md @@ -0,0 +1,3049 @@ +# mailslurp.Api.EmailControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApplyImapFlagOperation**](EmailControllerApi#applyimapflagoperation) | **POST** /emails/{emailId}/imap-flag-operation | Set IMAP flags associated with a message. Only supports '\\Seen' flag. | +| [**DeleteAllEmails**](EmailControllerApi#deleteallemails) | **DELETE** /emails | Delete all emails in all inboxes. | +| [**DeleteEmail**](EmailControllerApi#deleteemail) | **DELETE** /emails/{emailId} | Delete an email | +| [**DownloadAttachment**](EmailControllerApi#downloadattachment) | **GET** /emails/{emailId}/attachments/{attachmentId} | Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. | +| [**DownloadAttachmentBase64**](EmailControllerApi#downloadattachmentbase64) | **GET** /emails/{emailId}/attachments/{attachmentId}/base64 | Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. | +| [**DownloadBody**](EmailControllerApi#downloadbody) | **GET** /emails/{emailId}/body | Get email body as string. Returned as `plain/text` with content type header. | +| [**DownloadBodyBytes**](EmailControllerApi#downloadbodybytes) | **GET** /emails/{emailId}/body-bytes | Get email body in bytes. Returned as `octet-stream` with content type header. | +| [**ForwardEmail**](EmailControllerApi#forwardemail) | **POST** /emails/{emailId}/forward | Forward email to recipients | +| [**GetAttachmentMetaData**](EmailControllerApi#getattachmentmetadata) | **GET** /emails/{emailId}/attachments/{attachmentId}/metadata | Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. | +| [**GetEmail**](EmailControllerApi#getemail) | **GET** /emails/{emailId} | Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. | +| [**GetEmailAttachments**](EmailControllerApi#getemailattachments) | **GET** /emails/{emailId}/attachments | Get all email attachment metadata. Metadata includes name and size of attachments. | +| [**GetEmailContentMatch**](EmailControllerApi#getemailcontentmatch) | **POST** /emails/{emailId}/contentMatch | Get email content regex pattern match results. Runs regex against email body and returns match groups. | +| [**GetEmailCount**](EmailControllerApi#getemailcount) | **GET** /emails/emails/count | Get email count | +| [**GetEmailHTML**](EmailControllerApi#getemailhtml) | **GET** /emails/{emailId}/html | Get email content as HTML. For displaying emails in browser context. | +| [**GetEmailHTMLJson**](EmailControllerApi#getemailhtmljson) | **GET** /emails/{emailId}/html/json | Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content | +| [**GetEmailHTMLQuery**](EmailControllerApi#getemailhtmlquery) | **GET** /emails/{emailId}/htmlQuery | Parse and return text from an email, stripping HTML and decoding encoded characters | +| [**GetEmailLinks**](EmailControllerApi#getemaillinks) | **GET** /emails/{emailId}/links | Parse and return list of links found in an email (only works for HTML content) | +| [**GetEmailPreviewURLs**](EmailControllerApi#getemailpreviewurls) | **GET** /emails/{emailId}/urls | Get email URLs for viewing in browser or downloading | +| [**GetEmailTextLines**](EmailControllerApi#getemailtextlines) | **GET** /emails/{emailId}/textLines | Parse and return text from an email, stripping HTML and decoding encoded characters | +| [**GetEmailsPaginated**](EmailControllerApi#getemailspaginated) | **GET** /emails | Get all emails in all inboxes in paginated form. Email API list all. | +| [**GetGravatarUrlForEmailAddress**](EmailControllerApi#getgravatarurlforemailaddress) | **GET** /emails/gravatarFor | | +| [**GetLatestEmail**](EmailControllerApi#getlatestemail) | **GET** /emails/latest | Get latest email in all inboxes. Most recently received. | +| [**GetLatestEmailInInbox1**](EmailControllerApi#getlatestemailininbox1) | **GET** /emails/latestIn | Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. | +| [**GetOrganizationEmailsPaginated**](EmailControllerApi#getorganizationemailspaginated) | **GET** /emails/organization | Get all organization emails. List team or shared test email accounts | +| [**GetRawEmailContents**](EmailControllerApi#getrawemailcontents) | **GET** /emails/{emailId}/raw | Get raw email string. Returns unparsed raw SMTP message with headers and body. | +| [**GetRawEmailJson**](EmailControllerApi#getrawemailjson) | **GET** /emails/{emailId}/raw/json | Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. | +| [**GetUnreadEmailCount**](EmailControllerApi#getunreademailcount) | **GET** /emails/unreadCount | Get unread email count | +| [**MarkAsRead**](EmailControllerApi#markasread) | **PATCH** /emails/{emailId}/read | Mark an email as read on unread | +| [**ReplyToEmail**](EmailControllerApi#replytoemail) | **PUT** /emails/{emailId} | Reply to an email | +| [**SendEmailSourceOptional**](EmailControllerApi#sendemailsourceoptional) | **POST** /emails | Send email | +| [**ValidateEmail**](EmailControllerApi#validateemail) | **POST** /emails/{emailId}/validate | Validate email HTML contents | + + +# **ApplyImapFlagOperation** +> EmailPreview ApplyImapFlagOperation (Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions) + +Set IMAP flags associated with a message. Only supports '\\Seen' flag. + +Apply RFC3501 section-2.3.2 IMAP flag operations on an email + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ApplyImapFlagOperationExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | + var imapFlagOperationOptions = new ImapFlagOperationOptions(); // ImapFlagOperationOptions | + + try + { + // Set IMAP flags associated with a message. Only supports '\\Seen' flag. + EmailPreview result = apiInstance.ApplyImapFlagOperation(emailId, imapFlagOperationOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.ApplyImapFlagOperation: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApplyImapFlagOperationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Set IMAP flags associated with a message. Only supports '\\Seen' flag. + ApiResponse response = apiInstance.ApplyImapFlagOperationWithHttpInfo(emailId, imapFlagOperationOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.ApplyImapFlagOperationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | | | +| **imapFlagOperationOptions** | [**ImapFlagOperationOptions**](ImapFlagOperationOptions) | | | + +### Return type + +[**EmailPreview**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteAllEmails** +> void DeleteAllEmails () + +Delete all emails in all inboxes. + +Deletes all emails in your account. Be careful as emails cannot be recovered + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAllEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + + try + { + // Delete all emails in all inboxes. + apiInstance.DeleteAllEmails(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.DeleteAllEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAllEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all emails in all inboxes. + apiInstance.DeleteAllEmailsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.DeleteAllEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteEmail** +> void DeleteEmail (Guid emailId) + +Delete an email + +Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email to delete + + try + { + // Delete an email + apiInstance.DeleteEmail(emailId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.DeleteEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete an email + apiInstance.DeleteEmailWithHttpInfo(emailId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.DeleteEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email to delete | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DownloadAttachment** +> byte[] DownloadAttachment (Guid emailId, string attachmentId, string apiKey = null) + +Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + +Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DownloadAttachmentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + var attachmentId = "attachmentId_example"; // string | ID of attachment + var apiKey = "apiKey_example"; // string | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + + try + { + // Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + byte[] result = apiInstance.DownloadAttachment(emailId, attachmentId, apiKey); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.DownloadAttachment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DownloadAttachmentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + ApiResponse response = apiInstance.DownloadAttachmentWithHttpInfo(emailId, attachmentId, apiKey); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.DownloadAttachmentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | +| **attachmentId** | **string** | ID of attachment | | +| **apiKey** | **string** | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. | [optional] | + +### Return type + +**byte[]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | default response | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DownloadAttachmentBase64** +> DownloadAttachmentDto DownloadAttachmentBase64 (Guid emailId, string attachmentId) + +Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + +Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DownloadAttachmentBase64Example + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + var attachmentId = "attachmentId_example"; // string | ID of attachment + + try + { + // Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + DownloadAttachmentDto result = apiInstance.DownloadAttachmentBase64(emailId, attachmentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.DownloadAttachmentBase64: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DownloadAttachmentBase64WithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + ApiResponse response = apiInstance.DownloadAttachmentBase64WithHttpInfo(emailId, attachmentId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.DownloadAttachmentBase64WithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | +| **attachmentId** | **string** | ID of attachment | | + +### Return type + +[**DownloadAttachmentDto**](DownloadAttachmentDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DownloadBody** +> string DownloadBody (Guid emailId) + +Get email body as string. Returned as `plain/text` with content type header. + +Returns the specified email body for a given email as a string + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DownloadBodyExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Get email body as string. Returned as `plain/text` with content type header. + string result = apiInstance.DownloadBody(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.DownloadBody: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DownloadBodyWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email body as string. Returned as `plain/text` with content type header. + ApiResponse response = apiInstance.DownloadBodyWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.DownloadBodyWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, text/html + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DownloadBodyBytes** +> byte[] DownloadBodyBytes (Guid emailId) + +Get email body in bytes. Returned as `octet-stream` with content type header. + +Returns the specified email body for a given email as a stream / array of bytes. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DownloadBodyBytesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Get email body in bytes. Returned as `octet-stream` with content type header. + byte[] result = apiInstance.DownloadBodyBytes(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.DownloadBodyBytes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DownloadBodyBytesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email body in bytes. Returned as `octet-stream` with content type header. + ApiResponse response = apiInstance.DownloadBodyBytesWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.DownloadBodyBytesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +**byte[]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | default response | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **ForwardEmail** +> SentEmailDto ForwardEmail (Guid emailId, ForwardEmailOptions forwardEmailOptions) + +Forward email to recipients + +Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ForwardEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + var forwardEmailOptions = new ForwardEmailOptions(); // ForwardEmailOptions | + + try + { + // Forward email to recipients + SentEmailDto result = apiInstance.ForwardEmail(emailId, forwardEmailOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.ForwardEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ForwardEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Forward email to recipients + ApiResponse response = apiInstance.ForwardEmailWithHttpInfo(emailId, forwardEmailOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.ForwardEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | +| **forwardEmailOptions** | [**ForwardEmailOptions**](ForwardEmailOptions) | | | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAttachmentMetaData** +> AttachmentMetaData GetAttachmentMetaData (Guid emailId, string attachmentId) + +Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + +Returns the metadata such as name and content-type for a given attachment and email. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAttachmentMetaDataExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + var attachmentId = "attachmentId_example"; // string | ID of attachment + + try + { + // Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + AttachmentMetaData result = apiInstance.GetAttachmentMetaData(emailId, attachmentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetAttachmentMetaData: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAttachmentMetaDataWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + ApiResponse response = apiInstance.GetAttachmentMetaDataWithHttpInfo(emailId, attachmentId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetAttachmentMetaDataWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | +| **attachmentId** | **string** | ID of attachment | | + +### Return type + +[**AttachmentMetaData**](AttachmentMetaData) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmail** +> Email GetEmail (Guid emailId, bool? decode = null) + +Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + +Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | + var decode = false; // bool? | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional) (default to false) + + try + { + // Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + Email result = apiInstance.GetEmail(emailId, decode); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + ApiResponse response = apiInstance.GetEmailWithHttpInfo(emailId, decode); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | | | +| **decode** | **bool?** | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing | [optional] [default to false] | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailAttachments** +> List<AttachmentMetaData> GetEmailAttachments (Guid emailId) + +Get all email attachment metadata. Metadata includes name and size of attachments. + +Returns an array of attachment metadata such as name and content-type for a given email if present. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailAttachmentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Get all email attachment metadata. Metadata includes name and size of attachments. + List result = apiInstance.GetEmailAttachments(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailAttachments: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailAttachmentsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all email attachment metadata. Metadata includes name and size of attachments. + ApiResponse> response = apiInstance.GetEmailAttachmentsWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailAttachmentsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +[**List<AttachmentMetaData>**](AttachmentMetaData) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailContentMatch** +> EmailContentMatchResult GetEmailContentMatch (Guid emailId, ContentMatchOptions contentMatchOptions) + +Get email content regex pattern match results. Runs regex against email body and returns match groups. + +Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailContentMatchExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email to match against + var contentMatchOptions = new ContentMatchOptions(); // ContentMatchOptions | + + try + { + // Get email content regex pattern match results. Runs regex against email body and returns match groups. + EmailContentMatchResult result = apiInstance.GetEmailContentMatch(emailId, contentMatchOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailContentMatch: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailContentMatchWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email content regex pattern match results. Runs regex against email body and returns match groups. + ApiResponse response = apiInstance.GetEmailContentMatchWithHttpInfo(emailId, contentMatchOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailContentMatchWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email to match against | | +| **contentMatchOptions** | [**ContentMatchOptions**](ContentMatchOptions) | | | + +### Return type + +[**EmailContentMatchResult**](EmailContentMatchResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailCount** +> CountDto GetEmailCount () + +Get email count + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailCountExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + + try + { + // Get email count + CountDto result = apiInstance.GetEmailCount(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailCount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailCountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email count + ApiResponse response = apiInstance.GetEmailCountWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailCountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**CountDto**](CountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailHTML** +> string GetEmailHTML (Guid emailId, bool? decode = null) + +Get email content as HTML. For displaying emails in browser context. + +Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailHTMLExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | + var decode = false; // bool? | (optional) (default to false) + + try + { + // Get email content as HTML. For displaying emails in browser context. + string result = apiInstance.GetEmailHTML(emailId, decode); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailHTML: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailHTMLWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email content as HTML. For displaying emails in browser context. + ApiResponse response = apiInstance.GetEmailHTMLWithHttpInfo(emailId, decode); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailHTMLWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | | | +| **decode** | **bool?** | | [optional] [default to false] | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html;charset=utf-8, text/html + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailHTMLJson** +> EmailHtmlDto GetEmailHTMLJson (Guid emailId, bool? decode = null) + +Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + +Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailHTMLJsonExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | + var decode = false; // bool? | (optional) (default to false) + + try + { + // Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + EmailHtmlDto result = apiInstance.GetEmailHTMLJson(emailId, decode); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailHTMLJson: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailHTMLJsonWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + ApiResponse response = apiInstance.GetEmailHTMLJsonWithHttpInfo(emailId, decode); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailHTMLJsonWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | | | +| **decode** | **bool?** | | [optional] [default to false] | + +### Return type + +[**EmailHtmlDto**](EmailHtmlDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailHTMLQuery** +> EmailTextLinesResult GetEmailHTMLQuery (Guid emailId, string htmlSelector) + +Parse and return text from an email, stripping HTML and decoding encoded characters + +Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailHTMLQueryExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email to perform HTML query on + var htmlSelector = "htmlSelector_example"; // string | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + + try + { + // Parse and return text from an email, stripping HTML and decoding encoded characters + EmailTextLinesResult result = apiInstance.GetEmailHTMLQuery(emailId, htmlSelector); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailHTMLQuery: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailHTMLQueryWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Parse and return text from an email, stripping HTML and decoding encoded characters + ApiResponse response = apiInstance.GetEmailHTMLQueryWithHttpInfo(emailId, htmlSelector); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailHTMLQueryWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email to perform HTML query on | | +| **htmlSelector** | **string** | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. | | + +### Return type + +[**EmailTextLinesResult**](EmailTextLinesResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailLinks** +> EmailLinksResult GetEmailLinks (Guid emailId) + +Parse and return list of links found in an email (only works for HTML content) + +HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailLinksExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email to fetch text for + + try + { + // Parse and return list of links found in an email (only works for HTML content) + EmailLinksResult result = apiInstance.GetEmailLinks(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailLinks: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailLinksWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Parse and return list of links found in an email (only works for HTML content) + ApiResponse response = apiInstance.GetEmailLinksWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailLinksWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email to fetch text for | | + +### Return type + +[**EmailLinksResult**](EmailLinksResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailPreviewURLs** +> EmailPreviewUrls GetEmailPreviewURLs (Guid emailId) + +Get email URLs for viewing in browser or downloading + +Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailPreviewURLsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | + + try + { + // Get email URLs for viewing in browser or downloading + EmailPreviewUrls result = apiInstance.GetEmailPreviewURLs(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailPreviewURLs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailPreviewURLsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email URLs for viewing in browser or downloading + ApiResponse response = apiInstance.GetEmailPreviewURLsWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailPreviewURLsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | | | + +### Return type + +[**EmailPreviewUrls**](EmailPreviewUrls) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailTextLines** +> EmailTextLinesResult GetEmailTextLines (Guid emailId, bool? decodeHtmlEntities = null, string lineSeparator = null) + +Parse and return text from an email, stripping HTML and decoding encoded characters + +Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailTextLinesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email to fetch text for + var decodeHtmlEntities = true; // bool? | Decode HTML entities (optional) + var lineSeparator = "lineSeparator_example"; // string | Line separator character (optional) + + try + { + // Parse and return text from an email, stripping HTML and decoding encoded characters + EmailTextLinesResult result = apiInstance.GetEmailTextLines(emailId, decodeHtmlEntities, lineSeparator); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailTextLines: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailTextLinesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Parse and return text from an email, stripping HTML and decoding encoded characters + ApiResponse response = apiInstance.GetEmailTextLinesWithHttpInfo(emailId, decodeHtmlEntities, lineSeparator); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailTextLinesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email to fetch text for | | +| **decodeHtmlEntities** | **bool?** | Decode HTML entities | [optional] | +| **lineSeparator** | **string** | Line separator character | [optional] | + +### Return type + +[**EmailTextLinesResult**](EmailTextLinesResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmailsPaginated** +> PageEmailProjection GetEmailsPaginated (List inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +Get all emails in all inboxes in paginated form. Email API list all. + +By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailsPaginatedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var inboxId = new List(); // List | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + var page = 0; // int? | Optional page index in email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var unreadOnly = false; // bool? | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional) (default to false) + var searchFilter = "searchFilter_example"; // string | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter emails received after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter emails received before given date time (optional) + + try + { + // Get all emails in all inboxes in paginated form. Email API list all. + PageEmailProjection result = apiInstance.GetEmailsPaginated(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetEmailsPaginated: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailsPaginatedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all emails in all inboxes in paginated form. Email API list all. + ApiResponse response = apiInstance.GetEmailsPaginatedWithHttpInfo(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetEmailsPaginatedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | [**List<Guid>**](Guid) | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | [optional] | +| **page** | **int?** | Optional page index in email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **unreadOnly** | **bool?** | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to false] | +| **searchFilter** | **string** | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body | [optional] | +| **since** | **DateTime?** | Optional filter emails received after given date time | [optional] | +| **before** | **DateTime?** | Optional filter emails received before given date time | [optional] | + +### Return type + +[**PageEmailProjection**](PageEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetGravatarUrlForEmailAddress** +> GravatarUrl GetGravatarUrlForEmailAddress (string emailAddress, string size = null) + + + +Get gravatar url for email address + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetGravatarUrlForEmailAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailAddress = "emailAddress_example"; // string | + var size = "size_example"; // string | (optional) + + try + { + GravatarUrl result = apiInstance.GetGravatarUrlForEmailAddress(emailAddress, size); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetGravatarUrlForEmailAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetGravatarUrlForEmailAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetGravatarUrlForEmailAddressWithHttpInfo(emailAddress, size); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetGravatarUrlForEmailAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailAddress** | **string** | | | +| **size** | **string** | | [optional] | + +### Return type + +[**GravatarUrl**](GravatarUrl) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetLatestEmail** +> Email GetLatestEmail (List inboxIds = null) + +Get latest email in all inboxes. Most recently received. + +Get the newest email in all inboxes or in a passed set of inbox IDs + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetLatestEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var inboxIds = new List(); // List | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + + try + { + // Get latest email in all inboxes. Most recently received. + Email result = apiInstance.GetLatestEmail(inboxIds); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetLatestEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLatestEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get latest email in all inboxes. Most recently received. + ApiResponse response = apiInstance.GetLatestEmailWithHttpInfo(inboxIds); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetLatestEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxIds** | [**List<Guid>**](Guid) | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes | [optional] | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetLatestEmailInInbox1** +> Email GetLatestEmailInInbox1 (Guid inboxId) + +Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + +Get the newest email in all inboxes or in a passed set of inbox IDs + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetLatestEmailInInbox1Example + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of the inbox you want to get the latest email from + + try + { + // Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + Email result = apiInstance.GetLatestEmailInInbox1(inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetLatestEmailInInbox1: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLatestEmailInInbox1WithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + ApiResponse response = apiInstance.GetLatestEmailInInbox1WithHttpInfo(inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetLatestEmailInInbox1WithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of the inbox you want to get the latest email from | | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetOrganizationEmailsPaginated** +> PageEmailProjection GetOrganizationEmailsPaginated (List inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +Get all organization emails. List team or shared test email accounts + +By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetOrganizationEmailsPaginatedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var inboxId = new List(); // List | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + var page = 0; // int? | Optional page index in email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var unreadOnly = false; // bool? | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional) (default to false) + var searchFilter = "searchFilter_example"; // string | Optional search filter search filter for emails. (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter emails received after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter emails received before given date time (optional) + + try + { + // Get all organization emails. List team or shared test email accounts + PageEmailProjection result = apiInstance.GetOrganizationEmailsPaginated(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetOrganizationEmailsPaginated: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetOrganizationEmailsPaginatedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all organization emails. List team or shared test email accounts + ApiResponse response = apiInstance.GetOrganizationEmailsPaginatedWithHttpInfo(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetOrganizationEmailsPaginatedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | [**List<Guid>**](Guid) | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | [optional] | +| **page** | **int?** | Optional page index in email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **unreadOnly** | **bool?** | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to false] | +| **searchFilter** | **string** | Optional search filter search filter for emails. | [optional] | +| **since** | **DateTime?** | Optional filter emails received after given date time | [optional] | +| **before** | **DateTime?** | Optional filter emails received before given date time | [optional] | + +### Return type + +[**PageEmailProjection**](PageEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetRawEmailContents** +> string GetRawEmailContents (Guid emailId) + +Get raw email string. Returns unparsed raw SMTP message with headers and body. + +Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetRawEmailContentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Get raw email string. Returns unparsed raw SMTP message with headers and body. + string result = apiInstance.GetRawEmailContents(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetRawEmailContents: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetRawEmailContentsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get raw email string. Returns unparsed raw SMTP message with headers and body. + ApiResponse response = apiInstance.GetRawEmailContentsWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetRawEmailContentsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetRawEmailJson** +> RawEmailJson GetRawEmailJson (Guid emailId) + +Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + +Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetRawEmailJsonExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + RawEmailJson result = apiInstance.GetRawEmailJson(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetRawEmailJson: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetRawEmailJsonWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + ApiResponse response = apiInstance.GetRawEmailJsonWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetRawEmailJsonWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +[**RawEmailJson**](RawEmailJson) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetUnreadEmailCount** +> UnreadCount GetUnreadEmailCount () + +Get unread email count + +Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetUnreadEmailCountExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + + try + { + // Get unread email count + UnreadCount result = apiInstance.GetUnreadEmailCount(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.GetUnreadEmailCount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetUnreadEmailCountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get unread email count + ApiResponse response = apiInstance.GetUnreadEmailCountWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.GetUnreadEmailCountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**UnreadCount**](UnreadCount) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **MarkAsRead** +> EmailPreview MarkAsRead (Guid emailId, bool? read = null) + +Mark an email as read on unread + +Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class MarkAsReadExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | + var read = true; // bool? | What value to assign to email read property. Default true. (optional) (default to true) + + try + { + // Mark an email as read on unread + EmailPreview result = apiInstance.MarkAsRead(emailId, read); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.MarkAsRead: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the MarkAsReadWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Mark an email as read on unread + ApiResponse response = apiInstance.MarkAsReadWithHttpInfo(emailId, read); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.MarkAsReadWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | | | +| **read** | **bool?** | What value to assign to email read property. Default true. | [optional] [default to true] | + +### Return type + +[**EmailPreview**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **ReplyToEmail** +> SentEmailDto ReplyToEmail (Guid emailId, ReplyToEmailOptions replyToEmailOptions) + +Reply to an email + +Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ReplyToEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of the email that should be replied to + var replyToEmailOptions = new ReplyToEmailOptions(); // ReplyToEmailOptions | + + try + { + // Reply to an email + SentEmailDto result = apiInstance.ReplyToEmail(emailId, replyToEmailOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.ReplyToEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ReplyToEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Reply to an email + ApiResponse response = apiInstance.ReplyToEmailWithHttpInfo(emailId, replyToEmailOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.ReplyToEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of the email that should be replied to | | +| **replyToEmailOptions** | [**ReplyToEmailOptions**](ReplyToEmailOptions) | | | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendEmailSourceOptional** +> void SendEmailSourceOptional (SendEmailOptions sendEmailOptions, Guid? inboxId = null, bool? useDomainPool = null, bool? virtualSend = null) + +Send email + +Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendEmailSourceOptionalExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var sendEmailOptions = new SendEmailOptions(); // SendEmailOptions | + var inboxId = "inboxId_example"; // Guid? | ID of the inbox you want to send the email from (optional) + var useDomainPool = true; // bool? | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + var virtualSend = true; // bool? | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + + try + { + // Send email + apiInstance.SendEmailSourceOptional(sendEmailOptions, inboxId, useDomainPool, virtualSend); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.SendEmailSourceOptional: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendEmailSourceOptionalWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send email + apiInstance.SendEmailSourceOptionalWithHttpInfo(sendEmailOptions, inboxId, useDomainPool, virtualSend); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.SendEmailSourceOptionalWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **sendEmailOptions** | [**SendEmailOptions**](SendEmailOptions) | | | +| **inboxId** | **Guid?** | ID of the inbox you want to send the email from | [optional] | +| **useDomainPool** | **bool?** | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. | [optional] | +| **virtualSend** | **bool?** | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **ValidateEmail** +> ValidationDto ValidateEmail (Guid emailId) + +Validate email HTML contents + +Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ValidateEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Validate email HTML contents + ValidationDto result = apiInstance.ValidateEmail(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailControllerApi.ValidateEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ValidateEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Validate email HTML contents + ApiResponse response = apiInstance.ValidateEmailWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailControllerApi.ValidateEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +[**ValidationDto**](ValidationDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/EmailHtmlDto.md b/docs/EmailHtmlDto.md new file mode 100644 index 00000000..24eb556f --- /dev/null +++ b/docs/EmailHtmlDto.md @@ -0,0 +1,11 @@ +# mailslurp.Model.EmailHtmlDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | | [optional] +**Body** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailLinksResult.md b/docs/EmailLinksResult.md new file mode 100644 index 00000000..6d9c6bef --- /dev/null +++ b/docs/EmailLinksResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.EmailLinksResult +Links found in HTML + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | **List<string>** | | +**Body** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailPreview.md b/docs/EmailPreview.md new file mode 100644 index 00000000..59da562d --- /dev/null +++ b/docs/EmailPreview.md @@ -0,0 +1,20 @@ +# mailslurp.Model.EmailPreview +Preview of an email message. For full message (including body and attachments) call the `getEmail` or other email endpoints with the provided email ID. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of the email entity | +**DomainId** | **Guid?** | ID of the domain that received the email | [optional] +**Subject** | **string** | The subject line of the email message as specified by SMTP subject header | [optional] +**To** | **List<string>** | List of `To` recipient email addresses that the email was addressed to. See recipients object for names. | +**From** | **string** | Who the email was sent from. An email address - see fromName for the sender name. | [optional] +**Bcc** | **List<string>** | List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**Cc** | **List<string>** | List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**CreatedAt** | **DateTime** | When was the email received by MailSlurp | +**Read** | **bool** | Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. | +**Attachments** | **List<string>** | List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailPreviewUrls.md b/docs/EmailPreviewUrls.md new file mode 100644 index 00000000..f3c0c097 --- /dev/null +++ b/docs/EmailPreviewUrls.md @@ -0,0 +1,12 @@ +# mailslurp.Model.EmailPreviewUrls +URLs for email body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RawSmtpMessageUrl** | **string** | | +**PlainHtmlBodyUrl** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailProjection.md b/docs/EmailProjection.md new file mode 100644 index 00000000..953733ad --- /dev/null +++ b/docs/EmailProjection.md @@ -0,0 +1,24 @@ +# mailslurp.Model.EmailProjection +A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**From** | **string** | | [optional] +**Subject** | **string** | | [optional] +**InboxId** | **Guid** | | +**Attachments** | **List<string>** | | [optional] +**CreatedAt** | **DateTime** | | +**To** | **List<string>** | | +**Bcc** | **List<string>** | | [optional] +**Cc** | **List<string>** | | [optional] +**DomainId** | **Guid?** | | [optional] +**Read** | **bool** | | +**BodyExcerpt** | **string** | | [optional] +**TeamAccess** | **bool** | | +**BodyMD5Hash** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailRecipients.md b/docs/EmailRecipients.md new file mode 100644 index 00000000..783e4872 --- /dev/null +++ b/docs/EmailRecipients.md @@ -0,0 +1,13 @@ +# mailslurp.Model.EmailRecipients +The `To`,`CC`,`BCC` recipients stored in object form with email address and name accessible. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | [**List<Recipient>**](Recipient) | | [optional] +**Cc** | [**List<Recipient>**](Recipient) | | [optional] +**Bcc** | [**List<Recipient>**](Recipient) | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailTextLinesResult.md b/docs/EmailTextLinesResult.md new file mode 100644 index 00000000..9d443185 --- /dev/null +++ b/docs/EmailTextLinesResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.EmailTextLinesResult +Parsed text of an email + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lines** | **List<string>** | | +**Body** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailValidationRequestDto.md b/docs/EmailValidationRequestDto.md new file mode 100644 index 00000000..210c0975 --- /dev/null +++ b/docs/EmailValidationRequestDto.md @@ -0,0 +1,16 @@ +# mailslurp.Model.EmailValidationRequestDto +Email validation request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**EmailAddress** | **string** | | +**IsValid** | **bool** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmailVerificationControllerApi.md b/docs/EmailVerificationControllerApi.md new file mode 100644 index 00000000..6bc0474b --- /dev/null +++ b/docs/EmailVerificationControllerApi.md @@ -0,0 +1,209 @@ +# mailslurp.Api.EmailVerificationControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**GetValidationRequests**](EmailVerificationControllerApi#getvalidationrequests) | **GET** /email-verification/validation-requests | Validate a list of email addresses. Per unit billing. See your plan for pricing. | +| [**ValidateEmailAddressList**](EmailVerificationControllerApi#validateemailaddresslist) | **POST** /email-verification/email-address-list | Validate a list of email addresses. Per unit billing. See your plan for pricing. | + + +# **GetValidationRequests** +> PageEmailValidationRequest GetValidationRequests (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, bool? isValid = null) + +Validate a list of email addresses. Per unit billing. See your plan for pricing. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetValidationRequestsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailVerificationControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size for paginated result list. (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to DESC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + var isValid = true; // bool? | Filter where email is valid is true or false (optional) + + try + { + // Validate a list of email addresses. Per unit billing. See your plan for pricing. + PageEmailValidationRequest result = apiInstance.GetValidationRequests(page, size, sort, searchFilter, since, before, isValid); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailVerificationControllerApi.GetValidationRequests: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetValidationRequestsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Validate a list of email addresses. Per unit billing. See your plan for pricing. + ApiResponse response = apiInstance.GetValidationRequestsWithHttpInfo(page, size, sort, searchFilter, since, before, isValid); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailVerificationControllerApi.GetValidationRequestsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size for paginated result list. | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to DESC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | +| **isValid** | **bool?** | Filter where email is valid is true or false | [optional] | + +### Return type + +[**PageEmailValidationRequest**](PageEmailValidationRequest) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **ValidateEmailAddressList** +> ValidateEmailAddressListResult ValidateEmailAddressList (ValidateEmailAddressListOptions validateEmailAddressListOptions) + +Validate a list of email addresses. Per unit billing. See your plan for pricing. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ValidateEmailAddressListExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new EmailVerificationControllerApi(config); + var validateEmailAddressListOptions = new ValidateEmailAddressListOptions(); // ValidateEmailAddressListOptions | + + try + { + // Validate a list of email addresses. Per unit billing. See your plan for pricing. + ValidateEmailAddressListResult result = apiInstance.ValidateEmailAddressList(validateEmailAddressListOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling EmailVerificationControllerApi.ValidateEmailAddressList: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ValidateEmailAddressListWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Validate a list of email addresses. Per unit billing. See your plan for pricing. + ApiResponse response = apiInstance.ValidateEmailAddressListWithHttpInfo(validateEmailAddressListOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling EmailVerificationControllerApi.ValidateEmailAddressListWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **validateEmailAddressListOptions** | [**ValidateEmailAddressListOptions**](ValidateEmailAddressListOptions) | | | + +### Return type + +[**ValidateEmailAddressListResult**](ValidateEmailAddressListResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/EmailVerificationResult.md b/docs/EmailVerificationResult.md new file mode 100644 index 00000000..c36c8ea7 --- /dev/null +++ b/docs/EmailVerificationResult.md @@ -0,0 +1,15 @@ +# mailslurp.Model.EmailVerificationResult +Email verification result. Valid means email address exists according to response from mail server running at the domain and port given. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DomainName** | **string** | | +**Port** | **int** | | +**EmailAddress** | **string** | | +**IsValid** | **bool** | | +**Error** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmergencyAddress.md b/docs/EmergencyAddress.md new file mode 100644 index 00000000..57864424 --- /dev/null +++ b/docs/EmergencyAddress.md @@ -0,0 +1,22 @@ +# mailslurp.Model.EmergencyAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | [optional] +**Sid** | **string** | | +**UserId** | **Guid** | | +**DisplayName** | **string** | | +**CustomerName** | **string** | | +**Address1** | **string** | | +**City** | **string** | | +**Region** | **string** | | +**PostalCode** | **string** | | +**PhoneCountry** | **string** | | +**AccountSid** | **string** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmergencyAddressDto.md b/docs/EmergencyAddressDto.md new file mode 100644 index 00000000..cf418224 --- /dev/null +++ b/docs/EmergencyAddressDto.md @@ -0,0 +1,12 @@ +# mailslurp.Model.EmergencyAddressDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**Address1** | **string** | | +**PhoneCountry** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/EmptyResponseDto.md b/docs/EmptyResponseDto.md new file mode 100644 index 00000000..067ff516 --- /dev/null +++ b/docs/EmptyResponseDto.md @@ -0,0 +1,10 @@ +# mailslurp.Model.EmptyResponseDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ExpirationDefaults.md b/docs/ExpirationDefaults.md new file mode 100644 index 00000000..7cf76486 --- /dev/null +++ b/docs/ExpirationDefaults.md @@ -0,0 +1,15 @@ +# mailslurp.Model.ExpirationDefaults +Expiration defaults for your account + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultExpirationMillis** | **long?** | | [optional] +**MaxExpirationMillis** | **long?** | | [optional] +**DefaultExpiresAt** | **DateTime?** | | [optional] +**CanPermanentInbox** | **bool** | | +**NextInboxAllowsPermanent** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ExpiredControllerApi.md b/docs/ExpiredControllerApi.md new file mode 100644 index 00000000..3470afbc --- /dev/null +++ b/docs/ExpiredControllerApi.md @@ -0,0 +1,398 @@ +# mailslurp.Api.ExpiredControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**GetExpirationDefaults**](ExpiredControllerApi#getexpirationdefaults) | **GET** /expired/defaults | Get default expiration settings | +| [**GetExpiredInboxByInboxId**](ExpiredControllerApi#getexpiredinboxbyinboxid) | **GET** /expired/inbox/{inboxId} | Get expired inbox record for a previously existing inbox | +| [**GetExpiredInboxRecord**](ExpiredControllerApi#getexpiredinboxrecord) | **GET** /expired/{expiredId} | Get an expired inbox record | +| [**GetExpiredInboxes**](ExpiredControllerApi#getexpiredinboxes) | **GET** /expired | List records of expired inboxes | + + +# **GetExpirationDefaults** +> ExpirationDefaults GetExpirationDefaults () + +Get default expiration settings + +Return default times used for inbox expiration + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetExpirationDefaultsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ExpiredControllerApi(config); + + try + { + // Get default expiration settings + ExpirationDefaults result = apiInstance.GetExpirationDefaults(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ExpiredControllerApi.GetExpirationDefaults: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetExpirationDefaultsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get default expiration settings + ApiResponse response = apiInstance.GetExpirationDefaultsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ExpiredControllerApi.GetExpirationDefaultsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**ExpirationDefaults**](ExpirationDefaults) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetExpiredInboxByInboxId** +> ExpiredInboxDto GetExpiredInboxByInboxId (Guid inboxId) + +Get expired inbox record for a previously existing inbox + +Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetExpiredInboxByInboxIdExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ExpiredControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of inbox you want to retrieve (not the inbox ID) + + try + { + // Get expired inbox record for a previously existing inbox + ExpiredInboxDto result = apiInstance.GetExpiredInboxByInboxId(inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxByInboxId: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetExpiredInboxByInboxIdWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get expired inbox record for a previously existing inbox + ApiResponse response = apiInstance.GetExpiredInboxByInboxIdWithHttpInfo(inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxByInboxIdWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of inbox you want to retrieve (not the inbox ID) | | + +### Return type + +[**ExpiredInboxDto**](ExpiredInboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetExpiredInboxRecord** +> ExpiredInboxDto GetExpiredInboxRecord (Guid expiredId) + +Get an expired inbox record + +Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetExpiredInboxRecordExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ExpiredControllerApi(config); + var expiredId = "expiredId_example"; // Guid | ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + + try + { + // Get an expired inbox record + ExpiredInboxDto result = apiInstance.GetExpiredInboxRecord(expiredId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxRecord: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetExpiredInboxRecordWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an expired inbox record + ApiResponse response = apiInstance.GetExpiredInboxRecordWithHttpInfo(expiredId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxRecordWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **expiredId** | **Guid** | ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId | | + +### Return type + +[**ExpiredInboxDto**](ExpiredInboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetExpiredInboxes** +> PageExpiredInboxRecordProjection GetExpiredInboxes (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +List records of expired inboxes + +Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetExpiredInboxesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ExpiredControllerApi(config); + var page = 0; // int? | Optional page index in inbox sent email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // List records of expired inboxes + PageExpiredInboxRecordProjection result = apiInstance.GetExpiredInboxes(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetExpiredInboxesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List records of expired inboxes + ApiResponse response = apiInstance.GetExpiredInboxesWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in inbox sent email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox sent email list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageExpiredInboxRecordProjection**](PageExpiredInboxRecordProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ExpiredInboxDto.md b/docs/ExpiredInboxDto.md new file mode 100644 index 00000000..dea0830c --- /dev/null +++ b/docs/ExpiredInboxDto.md @@ -0,0 +1,13 @@ +# mailslurp.Model.ExpiredInboxDto +Expired inbox + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**InboxId** | **Guid** | | +**EmailAddress** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ExpiredInboxRecordProjection.md b/docs/ExpiredInboxRecordProjection.md new file mode 100644 index 00000000..da0dd137 --- /dev/null +++ b/docs/ExpiredInboxRecordProjection.md @@ -0,0 +1,14 @@ +# mailslurp.Model.ExpiredInboxRecordProjection +Record of inbox expiration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**EmailAddress** | **string** | | +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ExportControllerApi.md b/docs/ExportControllerApi.md new file mode 100644 index 00000000..fbffa2ec --- /dev/null +++ b/docs/ExportControllerApi.md @@ -0,0 +1,215 @@ +# mailslurp.Api.ExportControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ExportEntities**](ExportControllerApi#exportentities) | **GET** /export | Export inboxes link callable via browser | +| [**GetExportLink**](ExportControllerApi#getexportlink) | **POST** /export | Get export link | + + +# **ExportEntities** +> List<byte[]> ExportEntities (string exportType, string apiKey, string outputFormat, string filter = null, string listSeparatorToken = null, bool? excludePreviouslyExported = null, DateTime? createdEarliestTime = null, DateTime? createdOldestTime = null) + +Export inboxes link callable via browser + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ExportEntitiesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ExportControllerApi(config); + var exportType = "INBOXES"; // string | + var apiKey = "apiKey_example"; // string | + var outputFormat = "CSV_DEFAULT"; // string | + var filter = "filter_example"; // string | (optional) + var listSeparatorToken = "listSeparatorToken_example"; // string | (optional) + var excludePreviouslyExported = true; // bool? | (optional) + var createdEarliestTime = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | (optional) + var createdOldestTime = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | (optional) + + try + { + // Export inboxes link callable via browser + List result = apiInstance.ExportEntities(exportType, apiKey, outputFormat, filter, listSeparatorToken, excludePreviouslyExported, createdEarliestTime, createdOldestTime); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ExportControllerApi.ExportEntities: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ExportEntitiesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Export inboxes link callable via browser + ApiResponse> response = apiInstance.ExportEntitiesWithHttpInfo(exportType, apiKey, outputFormat, filter, listSeparatorToken, excludePreviouslyExported, createdEarliestTime, createdOldestTime); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ExportControllerApi.ExportEntitiesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **exportType** | **string** | | | +| **apiKey** | **string** | | | +| **outputFormat** | **string** | | | +| **filter** | **string** | | [optional] | +| **listSeparatorToken** | **string** | | [optional] | +| **excludePreviouslyExported** | **bool?** | | [optional] | +| **createdEarliestTime** | **DateTime?** | | [optional] | +| **createdOldestTime** | **DateTime?** | | [optional] | + +### Return type + +**List** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetExportLink** +> ExportLink GetExportLink (string exportType, ExportOptions exportOptions, string apiKey = null) + +Get export link + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetExportLinkExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new ExportControllerApi(config); + var exportType = "INBOXES"; // string | + var exportOptions = new ExportOptions(); // ExportOptions | + var apiKey = "apiKey_example"; // string | (optional) + + try + { + // Get export link + ExportLink result = apiInstance.GetExportLink(exportType, exportOptions, apiKey); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ExportControllerApi.GetExportLink: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetExportLinkWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get export link + ApiResponse response = apiInstance.GetExportLinkWithHttpInfo(exportType, exportOptions, apiKey); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ExportControllerApi.GetExportLinkWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **exportType** | **string** | | | +| **exportOptions** | [**ExportOptions**](ExportOptions) | | | +| **apiKey** | **string** | | [optional] | + +### Return type + +[**ExportLink**](ExportLink) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ExportLink.md b/docs/ExportLink.md new file mode 100644 index 00000000..9719e76c --- /dev/null +++ b/docs/ExportLink.md @@ -0,0 +1,11 @@ +# mailslurp.Model.ExportLink +Export download link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DownloadLink** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ExportOptions.md b/docs/ExportOptions.md new file mode 100644 index 00000000..7af01a76 --- /dev/null +++ b/docs/ExportOptions.md @@ -0,0 +1,16 @@ +# mailslurp.Model.ExportOptions +Options for exporting user data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OutputFormat** | **string** | | +**ExcludePreviouslyExported** | **bool?** | | [optional] +**CreatedEarliestTime** | **DateTime?** | | [optional] +**CreatedOldestTime** | **DateTime?** | | [optional] +**Filter** | **string** | | [optional] +**ListSeparatorToken** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/FilterBouncedRecipientsOptions.md b/docs/FilterBouncedRecipientsOptions.md new file mode 100644 index 00000000..94e148e7 --- /dev/null +++ b/docs/FilterBouncedRecipientsOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.FilterBouncedRecipientsOptions +Options for filtering bounced email recipients + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailRecipients** | **List<string>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/FilterBouncedRecipientsResult.md b/docs/FilterBouncedRecipientsResult.md new file mode 100644 index 00000000..b49c9002 --- /dev/null +++ b/docs/FilterBouncedRecipientsResult.md @@ -0,0 +1,11 @@ +# mailslurp.Model.FilterBouncedRecipientsResult +Remaining recipients that were filtered to remove bounced recipients + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FilteredRecipients** | **List<string>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/FlushExpiredInboxesResult.md b/docs/FlushExpiredInboxesResult.md new file mode 100644 index 00000000..1502f207 --- /dev/null +++ b/docs/FlushExpiredInboxesResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.FlushExpiredInboxesResult +Result from calling expire on any inboxes that have applicable expiration dates given current time. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxIds** | **List<Guid>** | Inbox IDs affected by expiration | +**ExpireBefore** | **DateTime** | DateTime to filter inboxes so that those expiring before this time are expired | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/FormControllerApi.md b/docs/FormControllerApi.md new file mode 100644 index 00000000..61f7646d --- /dev/null +++ b/docs/FormControllerApi.md @@ -0,0 +1,116 @@ +# mailslurp.Api.FormControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**SubmitForm**](FormControllerApi#submitform) | **POST** /forms | Submit a form to be parsed and sent as an email to an address determined by the form fields | + + +# **SubmitForm** +> string SubmitForm (string to = null, string subject = null, string redirectTo = null, string emailAddress = null, string successMessage = null, string spamCheck = null, string otherParameters = null) + +Submit a form to be parsed and sent as an email to an address determined by the form fields + +This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html
``` #### URL Example ```html
``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `
`. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SubmitFormExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new FormControllerApi(config); + var to = test@example.com; // string | The email address that submitted form should be sent to. (optional) + var subject = My form submission; // string | Optional subject of the email that will be sent. (optional) + var redirectTo = https://mysite.com/form-success; // string | Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + var emailAddress = test@example.com; // string | Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + var successMessage = Thanks for submitting; // string | Optional success message to display if no _redirectTo present. (optional) + var spamCheck = "spamCheck_example"; // string | Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + var otherParameters = "otherParameters_example"; // string | All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + + try + { + // Submit a form to be parsed and sent as an email to an address determined by the form fields + string result = apiInstance.SubmitForm(to, subject, redirectTo, emailAddress, successMessage, spamCheck, otherParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FormControllerApi.SubmitForm: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SubmitFormWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Submit a form to be parsed and sent as an email to an address determined by the form fields + ApiResponse response = apiInstance.SubmitFormWithHttpInfo(to, subject, redirectTo, emailAddress, successMessage, spamCheck, otherParameters); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FormControllerApi.SubmitFormWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **to** | **string** | The email address that submitted form should be sent to. | [optional] | +| **subject** | **string** | Optional subject of the email that will be sent. | [optional] | +| **redirectTo** | **string** | Optional URL to redirect form submitter to after submission. If not present user will see a success message. | [optional] | +| **emailAddress** | **string** | Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. | [optional] | +| **successMessage** | **string** | Optional success message to display if no _redirectTo present. | [optional] | +| **spamCheck** | **string** | Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. | [optional] | +| **otherParameters** | **string** | All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. | [optional] | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ForwardEmailOptions.md b/docs/ForwardEmailOptions.md new file mode 100644 index 00000000..9de76a79 --- /dev/null +++ b/docs/ForwardEmailOptions.md @@ -0,0 +1,17 @@ +# mailslurp.Model.ForwardEmailOptions +Options for forwarding an email + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | **List<string>** | To recipients for forwarded email | +**Subject** | **string** | Subject for forwarded email | [optional] +**Cc** | **List<string>** | Optional cc recipients | [optional] +**Bcc** | **List<string>** | Optional bcc recipients | [optional] +**From** | **string** | Optional from override | [optional] +**UseInboxName** | **bool?** | Optionally use inbox name as display name for sender email address | [optional] +**FilterBouncedRecipients** | **bool?** | Filter recipients to remove any bounced recipients from to, bcc, and cc before sending | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/GravatarUrl.md b/docs/GravatarUrl.md new file mode 100644 index 00000000..8a3af6f5 --- /dev/null +++ b/docs/GravatarUrl.md @@ -0,0 +1,12 @@ +# mailslurp.Model.GravatarUrl +User image + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**Hash** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/GroupContactsDto.md b/docs/GroupContactsDto.md new file mode 100644 index 00000000..79e5f0f3 --- /dev/null +++ b/docs/GroupContactsDto.md @@ -0,0 +1,12 @@ +# mailslurp.Model.GroupContactsDto +Describes contacts attached to a contact group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Group** | [**GroupDto**](GroupDto) | | +**Contacts** | [**List<ContactDto>**](ContactDto) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/GroupControllerApi.md b/docs/GroupControllerApi.md new file mode 100644 index 00000000..3f9f2b5a --- /dev/null +++ b/docs/GroupControllerApi.md @@ -0,0 +1,875 @@ +# mailslurp.Api.GroupControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**AddContactsToGroup**](GroupControllerApi#addcontactstogroup) | **PUT** /groups/{groupId}/contacts | Add contacts to a group | +| [**CreateGroup**](GroupControllerApi#creategroup) | **POST** /groups | Create a group | +| [**DeleteGroup**](GroupControllerApi#deletegroup) | **DELETE** /groups/{groupId} | Delete group | +| [**GetAllGroups**](GroupControllerApi#getallgroups) | **GET** /groups/paginated | Get all Contact Groups in paginated format | +| [**GetGroup**](GroupControllerApi#getgroup) | **GET** /groups/{groupId} | Get group | +| [**GetGroupWithContacts**](GroupControllerApi#getgroupwithcontacts) | **GET** /groups/{groupId}/contacts | Get group and contacts belonging to it | +| [**GetGroupWithContactsPaginated**](GroupControllerApi#getgroupwithcontactspaginated) | **GET** /groups/{groupId}/contacts-paginated | | +| [**GetGroups**](GroupControllerApi#getgroups) | **GET** /groups | Get all groups | +| [**RemoveContactsFromGroup**](GroupControllerApi#removecontactsfromgroup) | **DELETE** /groups/{groupId}/contacts | Remove contacts from a group | + + +# **AddContactsToGroup** +> GroupContactsDto AddContactsToGroup (Guid groupId, UpdateGroupContacts updateGroupContacts) + +Add contacts to a group + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class AddContactsToGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var groupId = "groupId_example"; // Guid | + var updateGroupContacts = new UpdateGroupContacts(); // UpdateGroupContacts | + + try + { + // Add contacts to a group + GroupContactsDto result = apiInstance.AddContactsToGroup(groupId, updateGroupContacts); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.AddContactsToGroup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the AddContactsToGroupWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Add contacts to a group + ApiResponse response = apiInstance.AddContactsToGroupWithHttpInfo(groupId, updateGroupContacts); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.AddContactsToGroupWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **groupId** | **Guid** | | | +| **updateGroupContacts** | [**UpdateGroupContacts**](UpdateGroupContacts) | | | + +### Return type + +[**GroupContactsDto**](GroupContactsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateGroup** +> GroupDto CreateGroup (CreateGroupOptions createGroupOptions) + +Create a group + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var createGroupOptions = new CreateGroupOptions(); // CreateGroupOptions | + + try + { + // Create a group + GroupDto result = apiInstance.CreateGroup(createGroupOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.CreateGroup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateGroupWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create a group + ApiResponse response = apiInstance.CreateGroupWithHttpInfo(createGroupOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.CreateGroupWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createGroupOptions** | [**CreateGroupOptions**](CreateGroupOptions) | | | + +### Return type + +[**GroupDto**](GroupDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteGroup** +> void DeleteGroup (Guid groupId) + +Delete group + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var groupId = "groupId_example"; // Guid | + + try + { + // Delete group + apiInstance.DeleteGroup(groupId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.DeleteGroup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteGroupWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete group + apiInstance.DeleteGroupWithHttpInfo(groupId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.DeleteGroupWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **groupId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllGroups** +> PageGroupProjection GetAllGroups (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get all Contact Groups in paginated format + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllGroupsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get all Contact Groups in paginated format + PageGroupProjection result = apiInstance.GetAllGroups(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.GetAllGroups: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllGroupsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all Contact Groups in paginated format + ApiResponse response = apiInstance.GetAllGroupsWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.GetAllGroupsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageGroupProjection**](PageGroupProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetGroup** +> GroupDto GetGroup (Guid groupId) + +Get group + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var groupId = "groupId_example"; // Guid | + + try + { + // Get group + GroupDto result = apiInstance.GetGroup(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.GetGroup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetGroupWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get group + ApiResponse response = apiInstance.GetGroupWithHttpInfo(groupId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.GetGroupWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **groupId** | **Guid** | | | + +### Return type + +[**GroupDto**](GroupDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetGroupWithContacts** +> GroupContactsDto GetGroupWithContacts (Guid groupId) + +Get group and contacts belonging to it + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetGroupWithContactsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var groupId = "groupId_example"; // Guid | + + try + { + // Get group and contacts belonging to it + GroupContactsDto result = apiInstance.GetGroupWithContacts(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.GetGroupWithContacts: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetGroupWithContactsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get group and contacts belonging to it + ApiResponse response = apiInstance.GetGroupWithContactsWithHttpInfo(groupId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.GetGroupWithContactsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **groupId** | **Guid** | | | + +### Return type + +[**GroupContactsDto**](GroupContactsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetGroupWithContactsPaginated** +> PageContactProjection GetGroupWithContactsPaginated (Guid groupId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + + + +Get group and paginated contacts belonging to it + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetGroupWithContactsPaginatedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var groupId = "groupId_example"; // Guid | + var page = 0; // int? | Optional page index in group contact pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in group contact pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PageContactProjection result = apiInstance.GetGroupWithContactsPaginated(groupId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.GetGroupWithContactsPaginated: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetGroupWithContactsPaginatedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetGroupWithContactsPaginatedWithHttpInfo(groupId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.GetGroupWithContactsPaginatedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **groupId** | **Guid** | | | +| **page** | **int?** | Optional page index in group contact pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in group contact pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageContactProjection**](PageContactProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetGroups** +> List<GroupProjection> GetGroups () + +Get all groups + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetGroupsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + + try + { + // Get all groups + List result = apiInstance.GetGroups(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.GetGroups: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetGroupsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all groups + ApiResponse> response = apiInstance.GetGroupsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.GetGroupsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**List<GroupProjection>**](GroupProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **RemoveContactsFromGroup** +> GroupContactsDto RemoveContactsFromGroup (Guid groupId, UpdateGroupContacts updateGroupContacts) + +Remove contacts from a group + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class RemoveContactsFromGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new GroupControllerApi(config); + var groupId = "groupId_example"; // Guid | + var updateGroupContacts = new UpdateGroupContacts(); // UpdateGroupContacts | + + try + { + // Remove contacts from a group + GroupContactsDto result = apiInstance.RemoveContactsFromGroup(groupId, updateGroupContacts); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupControllerApi.RemoveContactsFromGroup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RemoveContactsFromGroupWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Remove contacts from a group + ApiResponse response = apiInstance.RemoveContactsFromGroupWithHttpInfo(groupId, updateGroupContacts); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling GroupControllerApi.RemoveContactsFromGroupWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **groupId** | **Guid** | | | +| **updateGroupContacts** | [**UpdateGroupContacts**](UpdateGroupContacts) | | | + +### Return type + +[**GroupContactsDto**](GroupContactsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/GroupDto.md b/docs/GroupDto.md new file mode 100644 index 00000000..e15b8470 --- /dev/null +++ b/docs/GroupDto.md @@ -0,0 +1,14 @@ +# mailslurp.Model.GroupDto +Contact group data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**Name** | **string** | | +**Description** | **string** | | [optional] +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/GroupProjection.md b/docs/GroupProjection.md new file mode 100644 index 00000000..74cc0758 --- /dev/null +++ b/docs/GroupProjection.md @@ -0,0 +1,14 @@ +# mailslurp.Model.GroupProjection +Data for contact group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Id** | **Guid** | | +**Description** | **string** | | [optional] +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/HTMLValidationResult.md b/docs/HTMLValidationResult.md new file mode 100644 index 00000000..f2b2b783 --- /dev/null +++ b/docs/HTMLValidationResult.md @@ -0,0 +1,13 @@ +# mailslurp.Model.HTMLValidationResult +HTML Validation Results + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsValid** | **bool** | Is HTML validation result valid | +**Errors** | [**List<ValidationMessage>**](ValidationMessage) | Optional errors resulting from HTML validation | +**Warnings** | [**List<ValidationMessage>**](ValidationMessage) | Optional warnings resulting from HTML validation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/IPAddressResult.md b/docs/IPAddressResult.md new file mode 100644 index 00000000..6dd19bc7 --- /dev/null +++ b/docs/IPAddressResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.IPAddressResult +IP Address look up result for a given domain / hostname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | | +**Hostname** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ImapFlagOperationOptions.md b/docs/ImapFlagOperationOptions.md new file mode 100644 index 00000000..862eb45b --- /dev/null +++ b/docs/ImapFlagOperationOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.ImapFlagOperationOptions +IMAP operation flags + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlagOperation** | **string** | | +**Flags** | **List<string>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ImapSmtpAccessDetails.md b/docs/ImapSmtpAccessDetails.md new file mode 100644 index 00000000..9ea9d2b3 --- /dev/null +++ b/docs/ImapSmtpAccessDetails.md @@ -0,0 +1,22 @@ +# mailslurp.Model.ImapSmtpAccessDetails +Access details for inbox using SMTP or IMAP + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SecureSmtpServerHost** | **string** | Secure TLS SMTP server host domain | +**SecureSmtpServerPort** | **int** | Secure TLS SMTP server host port | +**SecureSmtpUsername** | **string** | Secure TLS SMTP username for login | +**SecureSmtpPassword** | **string** | Secure TLS SMTP password for login | +**SmtpServerHost** | **string** | SMTP server host domain | +**SmtpServerPort** | **int** | SMTP server host port | +**SmtpUsername** | **string** | SMTP username for login | +**SmtpPassword** | **string** | SMTP password for login | +**ImapServerHost** | **string** | IMAP server host domain | +**ImapServerPort** | **int** | IMAP server host port | +**ImapUsername** | **string** | IMAP username for login | +**ImapPassword** | **string** | IMAP password for login | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxByEmailAddressResult.md b/docs/InboxByEmailAddressResult.md new file mode 100644 index 00000000..67dd7ddc --- /dev/null +++ b/docs/InboxByEmailAddressResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.InboxByEmailAddressResult +Result of search for inbox by email address + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxId** | **Guid?** | | [optional] +**Exists** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxByNameResult.md b/docs/InboxByNameResult.md new file mode 100644 index 00000000..b5f1249a --- /dev/null +++ b/docs/InboxByNameResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.InboxByNameResult +Result of search for inbox by name + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxId** | **Guid?** | | [optional] +**Exists** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxControllerApi.md b/docs/InboxControllerApi.md new file mode 100644 index 00000000..f4b74d04 --- /dev/null +++ b/docs/InboxControllerApi.md @@ -0,0 +1,3909 @@ +# mailslurp.Api.InboxControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CancelScheduledJob**](InboxControllerApi#cancelscheduledjob) | **DELETE** /inboxes/scheduled-jobs/{jobId} | Cancel a scheduled email job | +| [**CreateInbox**](InboxControllerApi#createinbox) | **POST** /inboxes | Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. | +| [**CreateInboxRuleset**](InboxControllerApi#createinboxruleset) | **POST** /inboxes/{inboxId}/rulesets | Create an inbox ruleset | +| [**CreateInboxWithDefaults**](InboxControllerApi#createinboxwithdefaults) | **POST** /inboxes/withDefaults | Create an inbox with default options. Uses MailSlurp domain pool address and is private. | +| [**CreateInboxWithOptions**](InboxControllerApi#createinboxwithoptions) | **POST** /inboxes/withOptions | Create an inbox with options. Extended options for inbox creation. | +| [**DeleteAllInboxEmails**](InboxControllerApi#deleteallinboxemails) | **DELETE** /inboxes/{inboxId}/deleteAllInboxEmails | Delete all emails in a given inboxes. | +| [**DeleteAllInboxes**](InboxControllerApi#deleteallinboxes) | **DELETE** /inboxes | Delete all inboxes | +| [**DeleteInbox**](InboxControllerApi#deleteinbox) | **DELETE** /inboxes/{inboxId} | Delete inbox | +| [**DoesInboxExist**](InboxControllerApi#doesinboxexist) | **GET** /inboxes/exists | Does inbox exist | +| [**FlushExpired**](InboxControllerApi#flushexpired) | **DELETE** /inboxes/expired | Remove expired inboxes | +| [**GetAllInboxes**](InboxControllerApi#getallinboxes) | **GET** /inboxes/paginated | List All Inboxes Paginated | +| [**GetAllScheduledJobs**](InboxControllerApi#getallscheduledjobs) | **GET** /inboxes/scheduled-jobs | Get all scheduled email sending jobs for account | +| [**GetDeliveryStatusesByInboxId**](InboxControllerApi#getdeliverystatusesbyinboxid) | **GET** /inboxes/{inboxId}/delivery-status | | +| [**GetEmails**](InboxControllerApi#getemails) | **GET** /inboxes/{inboxId}/emails | Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. | +| [**GetImapSmtpAccess**](InboxControllerApi#getimapsmtpaccess) | **GET** /inboxes/imap-smtp-access | | +| [**GetInbox**](InboxControllerApi#getinbox) | **GET** /inboxes/{inboxId} | Get Inbox. Returns properties of an inbox. | +| [**GetInboxByEmailAddress**](InboxControllerApi#getinboxbyemailaddress) | **GET** /inboxes/byEmailAddress | Search for an inbox with the provided email address | +| [**GetInboxByName**](InboxControllerApi#getinboxbyname) | **GET** /inboxes/byName | Search for an inbox with the given name | +| [**GetInboxCount**](InboxControllerApi#getinboxcount) | **GET** /inboxes/count | Get total inbox count | +| [**GetInboxEmailCount**](InboxControllerApi#getinboxemailcount) | **GET** /inboxes/{inboxId}/emails/count | Get email count in inbox | +| [**GetInboxEmailsPaginated**](InboxControllerApi#getinboxemailspaginated) | **GET** /inboxes/{inboxId}/emails/paginated | Get inbox emails paginated | +| [**GetInboxIds**](InboxControllerApi#getinboxids) | **GET** /inboxes/ids | Get all inbox IDs | +| [**GetInboxSentEmails**](InboxControllerApi#getinboxsentemails) | **GET** /inboxes/{inboxId}/sent | Get Inbox Sent Emails | +| [**GetInboxTags**](InboxControllerApi#getinboxtags) | **GET** /inboxes/tags | Get inbox tags | +| [**GetInboxes**](InboxControllerApi#getinboxes) | **GET** /inboxes | List Inboxes and email addresses | +| [**GetLatestEmailInInbox**](InboxControllerApi#getlatestemailininbox) | **GET** /inboxes/getLatestEmail | Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. | +| [**GetOrganizationInboxes**](InboxControllerApi#getorganizationinboxes) | **GET** /inboxes/organization | List Organization Inboxes Paginated | +| [**GetScheduledJob**](InboxControllerApi#getscheduledjob) | **GET** /inboxes/scheduled-jobs/{jobId} | Get a scheduled email job | +| [**GetScheduledJobsByInboxId**](InboxControllerApi#getscheduledjobsbyinboxid) | **GET** /inboxes/{inboxId}/scheduled-jobs | Get all scheduled email sending jobs for the inbox | +| [**ListInboxRulesets**](InboxControllerApi#listinboxrulesets) | **GET** /inboxes/{inboxId}/rulesets | List inbox rulesets | +| [**ListInboxTrackingPixels**](InboxControllerApi#listinboxtrackingpixels) | **GET** /inboxes/{inboxId}/tracking-pixels | List inbox tracking pixels | +| [**SendEmail**](InboxControllerApi#sendemail) | **POST** /inboxes/{inboxId} | Send Email | +| [**SendEmailAndConfirm**](InboxControllerApi#sendemailandconfirm) | **POST** /inboxes/{inboxId}/confirm | Send email and return sent confirmation | +| [**SendEmailWithQueue**](InboxControllerApi#sendemailwithqueue) | **POST** /inboxes/{inboxId}/with-queue | Send email with queue | +| [**SendSmtpEnvelope**](InboxControllerApi#sendsmtpenvelope) | **POST** /inboxes/{inboxId}/smtp-envelope | Send email using an SMTP mail envelope and message body and return sent confirmation | +| [**SendTestEmail**](InboxControllerApi#sendtestemail) | **POST** /inboxes/{inboxId}/send-test-email | Send a test email to inbox | +| [**SendWithSchedule**](InboxControllerApi#sendwithschedule) | **POST** /inboxes/{inboxId}/with-schedule | Send email with with delay or schedule | +| [**SetInboxFavourited**](InboxControllerApi#setinboxfavourited) | **PUT** /inboxes/{inboxId}/favourite | Set inbox favourited state | +| [**UpdateInbox**](InboxControllerApi#updateinbox) | **PATCH** /inboxes/{inboxId} | Update Inbox. Change name and description. Email address is not editable. | + + +# **CancelScheduledJob** +> ScheduledJobDto CancelScheduledJob (Guid jobId) + +Cancel a scheduled email job + +Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CancelScheduledJobExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var jobId = "jobId_example"; // Guid | + + try + { + // Cancel a scheduled email job + ScheduledJobDto result = apiInstance.CancelScheduledJob(jobId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.CancelScheduledJob: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CancelScheduledJobWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Cancel a scheduled email job + ApiResponse response = apiInstance.CancelScheduledJobWithHttpInfo(jobId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.CancelScheduledJobWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **jobId** | **Guid** | | | + +### Return type + +[**ScheduledJobDto**](ScheduledJobDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateInbox** +> InboxDto CreateInbox (string emailAddress = null, List tags = null, string name = null, string description = null, bool? useDomainPool = null, bool? favourite = null, DateTime? expiresAt = null, long? expiresIn = null, bool? allowTeamAccess = null, string inboxType = null, bool? virtualInbox = null, bool? useShortAddress = null) + +Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + +Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var emailAddress = "emailAddress_example"; // string | A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + var tags = new List(); // List | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + var name = "name_example"; // string | Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + var description = "description_example"; // string | Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + var useDomainPool = true; // bool? | Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + var favourite = true; // bool? | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + var expiresAt = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + var expiresIn = 789L; // long? | Number of milliseconds that inbox should exist for (optional) + var allowTeamAccess = true; // bool? | DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + var inboxType = "HTTP_INBOX"; // string | HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + var virtualInbox = true; // bool? | Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + var useShortAddress = true; // bool? | Use a shorter email address under 31 characters (optional) + + try + { + // Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + InboxDto result = apiInstance.CreateInbox(emailAddress, tags, name, description, useDomainPool, favourite, expiresAt, expiresIn, allowTeamAccess, inboxType, virtualInbox, useShortAddress); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.CreateInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + ApiResponse response = apiInstance.CreateInboxWithHttpInfo(emailAddress, tags, name, description, useDomainPool, favourite, expiresAt, expiresIn, allowTeamAccess, inboxType, virtualInbox, useShortAddress); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.CreateInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailAddress** | **string** | A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] | +| **tags** | [**List<string>**](string) | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] | +| **name** | **string** | Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. | [optional] | +| **description** | **string** | Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with | [optional] | +| **useDomainPool** | **bool?** | Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. | [optional] | +| **favourite** | **bool?** | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering | [optional] | +| **expiresAt** | **DateTime?** | Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. | [optional] | +| **expiresIn** | **long?** | Number of milliseconds that inbox should exist for | [optional] | +| **allowTeamAccess** | **bool?** | DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. | [optional] | +| **inboxType** | **string** | HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. | [optional] | +| **virtualInbox** | **bool?** | Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. | [optional] | +| **useShortAddress** | **bool?** | Use a shorter email address under 31 characters | [optional] | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateInboxRuleset** +> InboxRulesetDto CreateInboxRuleset (Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions) + +Create an inbox ruleset + +Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateInboxRulesetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | inboxId + var createInboxRulesetOptions = new CreateInboxRulesetOptions(); // CreateInboxRulesetOptions | + + try + { + // Create an inbox ruleset + InboxRulesetDto result = apiInstance.CreateInboxRuleset(inboxId, createInboxRulesetOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.CreateInboxRuleset: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateInboxRulesetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an inbox ruleset + ApiResponse response = apiInstance.CreateInboxRulesetWithHttpInfo(inboxId, createInboxRulesetOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.CreateInboxRulesetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | inboxId | | +| **createInboxRulesetOptions** | [**CreateInboxRulesetOptions**](CreateInboxRulesetOptions) | | | + +### Return type + +[**InboxRulesetDto**](InboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateInboxWithDefaults** +> InboxDto CreateInboxWithDefaults () + +Create an inbox with default options. Uses MailSlurp domain pool address and is private. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateInboxWithDefaultsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + + try + { + // Create an inbox with default options. Uses MailSlurp domain pool address and is private. + InboxDto result = apiInstance.CreateInboxWithDefaults(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.CreateInboxWithDefaults: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateInboxWithDefaultsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an inbox with default options. Uses MailSlurp domain pool address and is private. + ApiResponse response = apiInstance.CreateInboxWithDefaultsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.CreateInboxWithDefaultsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateInboxWithOptions** +> InboxDto CreateInboxWithOptions (CreateInboxDto createInboxDto) + +Create an inbox with options. Extended options for inbox creation. + +Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateInboxWithOptionsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var createInboxDto = new CreateInboxDto(); // CreateInboxDto | + + try + { + // Create an inbox with options. Extended options for inbox creation. + InboxDto result = apiInstance.CreateInboxWithOptions(createInboxDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.CreateInboxWithOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateInboxWithOptionsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an inbox with options. Extended options for inbox creation. + ApiResponse response = apiInstance.CreateInboxWithOptionsWithHttpInfo(createInboxDto); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.CreateInboxWithOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createInboxDto** | [**CreateInboxDto**](CreateInboxDto) | | | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteAllInboxEmails** +> void DeleteAllInboxEmails (Guid inboxId) + +Delete all emails in a given inboxes. + +Deletes all emails in an inbox. Be careful as emails cannot be recovered + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAllInboxEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + + try + { + // Delete all emails in a given inboxes. + apiInstance.DeleteAllInboxEmails(inboxId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.DeleteAllInboxEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAllInboxEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all emails in a given inboxes. + apiInstance.DeleteAllInboxEmailsWithHttpInfo(inboxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.DeleteAllInboxEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteAllInboxes** +> void DeleteAllInboxes () + +Delete all inboxes + +Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAllInboxesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + + try + { + // Delete all inboxes + apiInstance.DeleteAllInboxes(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.DeleteAllInboxes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAllInboxesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all inboxes + apiInstance.DeleteAllInboxesWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.DeleteAllInboxesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteInbox** +> void DeleteInbox (Guid inboxId) + +Delete inbox + +Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + + try + { + // Delete inbox + apiInstance.DeleteInbox(inboxId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.DeleteInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete inbox + apiInstance.DeleteInboxWithHttpInfo(inboxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.DeleteInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DoesInboxExist** +> InboxExistsDto DoesInboxExist (string emailAddress, bool? allowCatchAll = null) + +Does inbox exist + +Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DoesInboxExistExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var emailAddress = "emailAddress_example"; // string | Email address + var allowCatchAll = true; // bool? | (optional) + + try + { + // Does inbox exist + InboxExistsDto result = apiInstance.DoesInboxExist(emailAddress, allowCatchAll); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.DoesInboxExist: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DoesInboxExistWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Does inbox exist + ApiResponse response = apiInstance.DoesInboxExistWithHttpInfo(emailAddress, allowCatchAll); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.DoesInboxExistWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailAddress** | **string** | Email address | | +| **allowCatchAll** | **bool?** | | [optional] | + +### Return type + +[**InboxExistsDto**](InboxExistsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **FlushExpired** +> FlushExpiredInboxesResult FlushExpired (DateTime? before = null) + +Remove expired inboxes + +Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class FlushExpiredExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + + try + { + // Remove expired inboxes + FlushExpiredInboxesResult result = apiInstance.FlushExpired(before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.FlushExpired: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the FlushExpiredWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Remove expired inboxes + ApiResponse response = apiInstance.FlushExpiredWithHttpInfo(before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.FlushExpiredWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **before** | **DateTime?** | Optional expired at before flag to flush expired inboxes that have expired before the given time | [optional] | + +### Return type + +[**FlushExpiredInboxesResult**](FlushExpiredInboxesResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllInboxes** +> PageInboxProjection GetAllInboxes (int? page = null, int? size = null, string sort = null, bool? favourite = null, string search = null, string tag = null, bool? teamAccess = null, DateTime? since = null, DateTime? before = null, string inboxType = null, Guid? domainId = null) + +List All Inboxes Paginated + +List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllInboxesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var favourite = false; // bool? | Optionally filter results for favourites only (optional) (default to false) + var search = "search_example"; // string | Optionally filter by search words partial matching ID, tags, name, and email address (optional) + var tag = "tag_example"; // string | Optionally filter by tags. Will return inboxes that include given tags (optional) + var teamAccess = true; // bool? | DEPRECATED. Optionally filter by team access. (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created before given date time (optional) + var inboxType = "HTTP_INBOX"; // string | Optional filter by inbox type (optional) + var domainId = "domainId_example"; // Guid? | Optional domain ID filter (optional) + + try + { + // List All Inboxes Paginated + PageInboxProjection result = apiInstance.GetAllInboxes(page, size, sort, favourite, search, tag, teamAccess, since, before, inboxType, domainId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetAllInboxes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllInboxesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List All Inboxes Paginated + ApiResponse response = apiInstance.GetAllInboxesWithHttpInfo(page, size, sort, favourite, search, tag, teamAccess, since, before, inboxType, domainId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetAllInboxesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **favourite** | **bool?** | Optionally filter results for favourites only | [optional] [default to false] | +| **search** | **string** | Optionally filter by search words partial matching ID, tags, name, and email address | [optional] | +| **tag** | **string** | Optionally filter by tags. Will return inboxes that include given tags | [optional] | +| **teamAccess** | **bool?** | DEPRECATED. Optionally filter by team access. | [optional] | +| **since** | **DateTime?** | Optional filter by created after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by created before given date time | [optional] | +| **inboxType** | **string** | Optional filter by inbox type | [optional] | +| **domainId** | **Guid?** | Optional domain ID filter | [optional] | + +### Return type + +[**PageInboxProjection**](PageInboxProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllScheduledJobs** +> PageScheduledJobs GetAllScheduledJobs (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get all scheduled email sending jobs for account + +Schedule sending of emails using scheduled jobs. These can be inbox or account level. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllScheduledJobsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var page = 0; // int? | Optional page index in scheduled job list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in scheduled job list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get all scheduled email sending jobs for account + PageScheduledJobs result = apiInstance.GetAllScheduledJobs(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetAllScheduledJobs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllScheduledJobsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all scheduled email sending jobs for account + ApiResponse response = apiInstance.GetAllScheduledJobsWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetAllScheduledJobsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in scheduled job list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in scheduled job list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageScheduledJobs**](PageScheduledJobs) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetDeliveryStatusesByInboxId** +> PageDeliveryStatus GetDeliveryStatusesByInboxId (Guid inboxId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + + + +Get all email delivery statuses for an inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetDeliveryStatusesByInboxIdExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var page = 0; // int? | Optional page index in delivery status list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in delivery status list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PageDeliveryStatus result = apiInstance.GetDeliveryStatusesByInboxId(inboxId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetDeliveryStatusesByInboxId: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDeliveryStatusesByInboxIdWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetDeliveryStatusesByInboxIdWithHttpInfo(inboxId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetDeliveryStatusesByInboxIdWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **page** | **int?** | Optional page index in delivery status list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in delivery status list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageDeliveryStatus**](PageDeliveryStatus) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmails** +> List<EmailPreview> GetEmails (Guid inboxId, int? size = null, int? limit = null, string sort = null, long? retryTimeout = null, long? delayTimeout = null, long? minCount = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null) + +Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + +List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Id of inbox that emails belongs to + var size = 56; // int? | Alias for limit. Assessed first before assessing any passed limit. (optional) + var limit = 56; // int? | Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + var sort = "ASC"; // string | Sort the results by received date and direction ASC or DESC (optional) + var retryTimeout = 789L; // long? | Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + var delayTimeout = 789L; // long? | (optional) + var minCount = 789L; // long? | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + var unreadOnly = true; // bool? | (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Exclude emails received after this ISO 8601 date time (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Exclude emails received before this ISO 8601 date time (optional) + + try + { + // Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + List result = apiInstance.GetEmails(inboxId, size, limit, sort, retryTimeout, delayTimeout, minCount, unreadOnly, before, since); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + ApiResponse> response = apiInstance.GetEmailsWithHttpInfo(inboxId, size, limit, sort, retryTimeout, delayTimeout, minCount, unreadOnly, before, since); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Id of inbox that emails belongs to | | +| **size** | **int?** | Alias for limit. Assessed first before assessing any passed limit. | [optional] | +| **limit** | **int?** | Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller | [optional] | +| **sort** | **string** | Sort the results by received date and direction ASC or DESC | [optional] | +| **retryTimeout** | **long?** | Maximum milliseconds to spend retrying inbox database until minCount emails are returned | [optional] | +| **delayTimeout** | **long?** | | [optional] | +| **minCount** | **long?** | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. | [optional] | +| **unreadOnly** | **bool?** | | [optional] | +| **before** | **DateTime?** | Exclude emails received after this ISO 8601 date time | [optional] | +| **since** | **DateTime?** | Exclude emails received before this ISO 8601 date time | [optional] | + +### Return type + +[**List<EmailPreview>**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetImapSmtpAccess** +> ImapSmtpAccessDetails GetImapSmtpAccess (Guid? inboxId = null) + + + +Get IMAP and SMTP access usernames and passwords + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetImapSmtpAccessExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Inbox ID (optional) + + try + { + ImapSmtpAccessDetails result = apiInstance.GetImapSmtpAccess(inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetImapSmtpAccess: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetImapSmtpAccessWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetImapSmtpAccessWithHttpInfo(inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetImapSmtpAccessWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Inbox ID | [optional] | + +### Return type + +[**ImapSmtpAccessDetails**](ImapSmtpAccessDetails) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInbox** +> InboxDto GetInbox (Guid inboxId) + +Get Inbox. Returns properties of an inbox. + +Returns an inbox's properties, including its email address and ID. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + + try + { + // Get Inbox. Returns properties of an inbox. + InboxDto result = apiInstance.GetInbox(inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Inbox. Returns properties of an inbox. + ApiResponse response = apiInstance.GetInboxWithHttpInfo(inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxByEmailAddress** +> InboxByEmailAddressResult GetInboxByEmailAddress (string emailAddress) + +Search for an inbox with the provided email address + +Get a inbox result by email address + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxByEmailAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var emailAddress = "emailAddress_example"; // string | + + try + { + // Search for an inbox with the provided email address + InboxByEmailAddressResult result = apiInstance.GetInboxByEmailAddress(emailAddress); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxByEmailAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxByEmailAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Search for an inbox with the provided email address + ApiResponse response = apiInstance.GetInboxByEmailAddressWithHttpInfo(emailAddress); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxByEmailAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailAddress** | **string** | | | + +### Return type + +[**InboxByEmailAddressResult**](InboxByEmailAddressResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxByName** +> InboxByNameResult GetInboxByName (string name) + +Search for an inbox with the given name + +Get a inbox result by name + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxByNameExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var name = "name_example"; // string | + + try + { + // Search for an inbox with the given name + InboxByNameResult result = apiInstance.GetInboxByName(name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxByName: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxByNameWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Search for an inbox with the given name + ApiResponse response = apiInstance.GetInboxByNameWithHttpInfo(name); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxByNameWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **name** | **string** | | | + +### Return type + +[**InboxByNameResult**](InboxByNameResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxCount** +> CountDto GetInboxCount () + +Get total inbox count + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxCountExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + + try + { + // Get total inbox count + CountDto result = apiInstance.GetInboxCount(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxCount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxCountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get total inbox count + ApiResponse response = apiInstance.GetInboxCountWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxCountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**CountDto**](CountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxEmailCount** +> CountDto GetInboxEmailCount (Guid inboxId) + +Get email count in inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxEmailCountExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Id of inbox that emails belongs to + + try + { + // Get email count in inbox + CountDto result = apiInstance.GetInboxEmailCount(inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxEmailCount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxEmailCountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get email count in inbox + ApiResponse response = apiInstance.GetInboxEmailCountWithHttpInfo(inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxEmailCountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Id of inbox that emails belongs to | | + +### Return type + +[**CountDto**](CountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxEmailsPaginated** +> PageEmailPreview GetInboxEmailsPaginated (Guid inboxId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get inbox emails paginated + +Get a paginated list of emails in an inbox. Does not hold connections open. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxEmailsPaginatedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Id of inbox that emails belongs to + var page = 0; // int? | Optional page index in inbox emails list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox emails list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by received after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by received before given date time (optional) + + try + { + // Get inbox emails paginated + PageEmailPreview result = apiInstance.GetInboxEmailsPaginated(inboxId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxEmailsPaginated: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxEmailsPaginatedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get inbox emails paginated + ApiResponse response = apiInstance.GetInboxEmailsPaginatedWithHttpInfo(inboxId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxEmailsPaginatedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Id of inbox that emails belongs to | | +| **page** | **int?** | Optional page index in inbox emails list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox emails list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Optional filter by received after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by received before given date time | [optional] | + +### Return type + +[**PageEmailPreview**](PageEmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxIds** +> InboxIdsResult GetInboxIds () + +Get all inbox IDs + +Get list of inbox IDs + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxIdsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + + try + { + // Get all inbox IDs + InboxIdsResult result = apiInstance.GetInboxIds(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxIds: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxIdsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all inbox IDs + ApiResponse response = apiInstance.GetInboxIdsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxIdsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**InboxIdsResult**](InboxIdsResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxSentEmails** +> PageSentEmailProjection GetInboxSentEmails (Guid inboxId, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +Get Inbox Sent Emails + +Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxSentEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var page = 0; // int? | Optional page index in inbox sent email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional sent email search (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by sent after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by sent before given date time (optional) + + try + { + // Get Inbox Sent Emails + PageSentEmailProjection result = apiInstance.GetInboxSentEmails(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxSentEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxSentEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Inbox Sent Emails + ApiResponse response = apiInstance.GetInboxSentEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxSentEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **page** | **int?** | Optional page index in inbox sent email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox sent email list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional sent email search | [optional] | +| **since** | **DateTime?** | Optional filter by sent after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by sent before given date time | [optional] | + +### Return type + +[**PageSentEmailProjection**](PageSentEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxTags** +> List<string> GetInboxTags () + +Get inbox tags + +Get all inbox tags + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxTagsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + + try + { + // Get inbox tags + List result = apiInstance.GetInboxTags(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxTags: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxTagsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get inbox tags + ApiResponse> response = apiInstance.GetInboxTagsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxTagsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +**List** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxes** +> List<InboxDto> GetInboxes (int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +List Inboxes and email addresses + +List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var size = 100; // int? | Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional) (default to 100) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created before given date time (optional) + + try + { + // List Inboxes and email addresses + List result = apiInstance.GetInboxes(size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetInboxes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Inboxes and email addresses + ApiResponse> response = apiInstance.GetInboxesWithHttpInfo(size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetInboxesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **size** | **int?** | Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. | [optional] [default to 100] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Optional filter by created after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by created before given date time | [optional] | + +### Return type + +[**List<InboxDto>**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetLatestEmailInInbox** +> Email GetLatestEmailInInbox (Guid inboxId, long timeoutMillis) + +Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + +Get the newest email in an inbox or wait for one to arrive + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetLatestEmailInInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of the inbox you want to get the latest email from + var timeoutMillis = 789L; // long | Timeout milliseconds to wait for latest email + + try + { + // Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + Email result = apiInstance.GetLatestEmailInInbox(inboxId, timeoutMillis); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetLatestEmailInInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLatestEmailInInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + ApiResponse response = apiInstance.GetLatestEmailInInboxWithHttpInfo(inboxId, timeoutMillis); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetLatestEmailInInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of the inbox you want to get the latest email from | | +| **timeoutMillis** | **long** | Timeout milliseconds to wait for latest email | | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetOrganizationInboxes** +> PageOrganizationInboxProjection GetOrganizationInboxes (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +List Organization Inboxes Paginated + +List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetOrganizationInboxesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created before given date time (optional) + + try + { + // List Organization Inboxes Paginated + PageOrganizationInboxProjection result = apiInstance.GetOrganizationInboxes(page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetOrganizationInboxes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetOrganizationInboxesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Organization Inboxes Paginated + ApiResponse response = apiInstance.GetOrganizationInboxesWithHttpInfo(page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetOrganizationInboxesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Optional filter by created after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by created before given date time | [optional] | + +### Return type + +[**PageOrganizationInboxProjection**](PageOrganizationInboxProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetScheduledJob** +> ScheduledJobDto GetScheduledJob (Guid jobId) + +Get a scheduled email job + +Get a scheduled email job details. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetScheduledJobExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var jobId = "jobId_example"; // Guid | + + try + { + // Get a scheduled email job + ScheduledJobDto result = apiInstance.GetScheduledJob(jobId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetScheduledJob: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetScheduledJobWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a scheduled email job + ApiResponse response = apiInstance.GetScheduledJobWithHttpInfo(jobId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetScheduledJobWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **jobId** | **Guid** | | | + +### Return type + +[**ScheduledJobDto**](ScheduledJobDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetScheduledJobsByInboxId** +> PageScheduledJobs GetScheduledJobsByInboxId (Guid inboxId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get all scheduled email sending jobs for the inbox + +Schedule sending of emails using scheduled jobs. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetScheduledJobsByInboxIdExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var page = 0; // int? | Optional page index in scheduled job list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in scheduled job list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get all scheduled email sending jobs for the inbox + PageScheduledJobs result = apiInstance.GetScheduledJobsByInboxId(inboxId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.GetScheduledJobsByInboxId: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetScheduledJobsByInboxIdWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all scheduled email sending jobs for the inbox + ApiResponse response = apiInstance.GetScheduledJobsByInboxIdWithHttpInfo(inboxId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.GetScheduledJobsByInboxIdWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **page** | **int?** | Optional page index in scheduled job list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in scheduled job list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageScheduledJobs**](PageScheduledJobs) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **ListInboxRulesets** +> PageInboxRulesetDto ListInboxRulesets (Guid inboxId, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +List inbox rulesets + +List all rulesets attached to an inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ListInboxRulesetsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var page = 0; // int? | Optional page index in inbox ruleset list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox ruleset list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created before given date time (optional) + + try + { + // List inbox rulesets + PageInboxRulesetDto result = apiInstance.ListInboxRulesets(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.ListInboxRulesets: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ListInboxRulesetsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List inbox rulesets + ApiResponse response = apiInstance.ListInboxRulesetsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.ListInboxRulesetsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **page** | **int?** | Optional page index in inbox ruleset list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox ruleset list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Optional filter by created after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by created before given date time | [optional] | + +### Return type + +[**PageInboxRulesetDto**](PageInboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **ListInboxTrackingPixels** +> PageTrackingPixelProjection ListInboxTrackingPixels (Guid inboxId, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +List inbox tracking pixels + +List all tracking pixels sent from an inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class ListInboxTrackingPixelsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var page = 0; // int? | Optional page index in inbox tracking pixel list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox tracking pixel list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter by created before given date time (optional) + + try + { + // List inbox tracking pixels + PageTrackingPixelProjection result = apiInstance.ListInboxTrackingPixels(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.ListInboxTrackingPixels: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ListInboxTrackingPixelsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List inbox tracking pixels + ApiResponse response = apiInstance.ListInboxTrackingPixelsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.ListInboxTrackingPixelsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **page** | **int?** | Optional page index in inbox tracking pixel list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox tracking pixel list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Optional filter by created after given date time | [optional] | +| **before** | **DateTime?** | Optional filter by created before given date time | [optional] | + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendEmail** +> void SendEmail (Guid inboxId, SendEmailOptions sendEmailOptions) + +Send Email + +Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of the inbox you want to send the email from + var sendEmailOptions = new SendEmailOptions(); // SendEmailOptions | + + try + { + // Send Email + apiInstance.SendEmail(inboxId, sendEmailOptions); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.SendEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send Email + apiInstance.SendEmailWithHttpInfo(inboxId, sendEmailOptions); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.SendEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of the inbox you want to send the email from | | +| **sendEmailOptions** | [**SendEmailOptions**](SendEmailOptions) | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendEmailAndConfirm** +> SentEmailDto SendEmailAndConfirm (Guid inboxId, SendEmailOptions sendEmailOptions) + +Send email and return sent confirmation + +Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendEmailAndConfirmExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of the inbox you want to send the email from + var sendEmailOptions = new SendEmailOptions(); // SendEmailOptions | + + try + { + // Send email and return sent confirmation + SentEmailDto result = apiInstance.SendEmailAndConfirm(inboxId, sendEmailOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.SendEmailAndConfirm: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendEmailAndConfirmWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send email and return sent confirmation + ApiResponse response = apiInstance.SendEmailAndConfirmWithHttpInfo(inboxId, sendEmailOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.SendEmailAndConfirmWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of the inbox you want to send the email from | | +| **sendEmailOptions** | [**SendEmailOptions**](SendEmailOptions) | | | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendEmailWithQueue** +> void SendEmailWithQueue (Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions) + +Send email with queue + +Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendEmailWithQueueExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of the inbox you want to send the email from + var validateBeforeEnqueue = true; // bool | Validate before adding to queue + var sendEmailOptions = new SendEmailOptions(); // SendEmailOptions | + + try + { + // Send email with queue + apiInstance.SendEmailWithQueue(inboxId, validateBeforeEnqueue, sendEmailOptions); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.SendEmailWithQueue: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendEmailWithQueueWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send email with queue + apiInstance.SendEmailWithQueueWithHttpInfo(inboxId, validateBeforeEnqueue, sendEmailOptions); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.SendEmailWithQueueWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of the inbox you want to send the email from | | +| **validateBeforeEnqueue** | **bool** | Validate before adding to queue | | +| **sendEmailOptions** | [**SendEmailOptions**](SendEmailOptions) | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendSmtpEnvelope** +> SentEmailDto SendSmtpEnvelope (Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions) + +Send email using an SMTP mail envelope and message body and return sent confirmation + +Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendSmtpEnvelopeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of the inbox you want to send the email from + var sendSMTPEnvelopeOptions = new SendSMTPEnvelopeOptions(); // SendSMTPEnvelopeOptions | + + try + { + // Send email using an SMTP mail envelope and message body and return sent confirmation + SentEmailDto result = apiInstance.SendSmtpEnvelope(inboxId, sendSMTPEnvelopeOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.SendSmtpEnvelope: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendSmtpEnvelopeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send email using an SMTP mail envelope and message body and return sent confirmation + ApiResponse response = apiInstance.SendSmtpEnvelopeWithHttpInfo(inboxId, sendSMTPEnvelopeOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.SendSmtpEnvelopeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of the inbox you want to send the email from | | +| **sendSMTPEnvelopeOptions** | [**SendSMTPEnvelopeOptions**](SendSMTPEnvelopeOptions) | | | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendTestEmail** +> void SendTestEmail (Guid inboxId) + +Send a test email to inbox + +Send an inbox a test email to test email receiving is working + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendTestEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + + try + { + // Send a test email to inbox + apiInstance.SendTestEmail(inboxId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.SendTestEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendTestEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send a test email to inbox + apiInstance.SendTestEmailWithHttpInfo(inboxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.SendTestEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendWithSchedule** +> ScheduledJobDto SendWithSchedule (Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = null, long? sendAtNowPlusSeconds = null, bool? validateBeforeEnqueue = null) + +Send email with with delay or schedule + +Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendWithScheduleExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of the inbox you want to send the email from + var sendEmailOptions = new SendEmailOptions(); // SendEmailOptions | + var sendAtTimestamp = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Sending timestamp (optional) + var sendAtNowPlusSeconds = 789L; // long? | Send after n seconds (optional) + var validateBeforeEnqueue = true; // bool? | Validate before adding to queue (optional) + + try + { + // Send email with with delay or schedule + ScheduledJobDto result = apiInstance.SendWithSchedule(inboxId, sendEmailOptions, sendAtTimestamp, sendAtNowPlusSeconds, validateBeforeEnqueue); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.SendWithSchedule: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendWithScheduleWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send email with with delay or schedule + ApiResponse response = apiInstance.SendWithScheduleWithHttpInfo(inboxId, sendEmailOptions, sendAtTimestamp, sendAtNowPlusSeconds, validateBeforeEnqueue); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.SendWithScheduleWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of the inbox you want to send the email from | | +| **sendEmailOptions** | [**SendEmailOptions**](SendEmailOptions) | | | +| **sendAtTimestamp** | **DateTime?** | Sending timestamp | [optional] | +| **sendAtNowPlusSeconds** | **long?** | Send after n seconds | [optional] | +| **validateBeforeEnqueue** | **bool?** | Validate before adding to queue | [optional] | + +### Return type + +[**ScheduledJobDto**](ScheduledJobDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SetInboxFavourited** +> InboxDto SetInboxFavourited (Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions) + +Set inbox favourited state + +Set and return new favourite state for an inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SetInboxFavouritedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of inbox to set favourite state + var setInboxFavouritedOptions = new SetInboxFavouritedOptions(); // SetInboxFavouritedOptions | + + try + { + // Set inbox favourited state + InboxDto result = apiInstance.SetInboxFavourited(inboxId, setInboxFavouritedOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.SetInboxFavourited: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SetInboxFavouritedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Set inbox favourited state + ApiResponse response = apiInstance.SetInboxFavouritedWithHttpInfo(inboxId, setInboxFavouritedOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.SetInboxFavouritedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of inbox to set favourite state | | +| **setInboxFavouritedOptions** | [**SetInboxFavouritedOptions**](SetInboxFavouritedOptions) | | | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UpdateInbox** +> InboxDto UpdateInbox (Guid inboxId, UpdateInboxOptions updateInboxOptions) + +Update Inbox. Change name and description. Email address is not editable. + +Update editable fields on an inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UpdateInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var updateInboxOptions = new UpdateInboxOptions(); // UpdateInboxOptions | + + try + { + // Update Inbox. Change name and description. Email address is not editable. + InboxDto result = apiInstance.UpdateInbox(inboxId, updateInboxOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxControllerApi.UpdateInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update Inbox. Change name and description. Email address is not editable. + ApiResponse response = apiInstance.UpdateInboxWithHttpInfo(inboxId, updateInboxOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxControllerApi.UpdateInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **updateInboxOptions** | [**UpdateInboxOptions**](UpdateInboxOptions) | | | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/InboxDto.md b/docs/InboxDto.md new file mode 100644 index 00000000..12b83409 --- /dev/null +++ b/docs/InboxDto.md @@ -0,0 +1,23 @@ +# mailslurp.Model.InboxDto +Representation of a MailSlurp inbox. An inbox has an ID and a real email address. Emails can be sent to or from this email address. Inboxes are either `SMTP` or `HTTP` mailboxes. The default, `HTTP` inboxes, use AWS SES to process emails and are best suited as test email accounts and do not support IMAP or POP3. `SMTP` inboxes use a custom mail server at `mx.mailslurp.com` and support SMTP login, IMAP and POP3. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments. Inboxes may have a description, name, and tags for display purposes. You can also favourite an inbox for easier searching. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. | +**UserId** | **Guid?** | ID of user that inbox belongs to | [optional] +**CreatedAt** | **DateTime** | When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. | +**Name** | **string** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**DomainId** | **Guid?** | ID of custom domain used by the inbox if any | [optional] +**Description** | **string** | Description of an inbox for labelling and searching purposes | [optional] +**EmailAddress** | **string** | The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | +**ExpiresAt** | **string** | Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. | [optional] +**Favourite** | **bool** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | +**Tags** | **List<string>** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**InboxType** | **string** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**ReadOnly** | **bool** | Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. | +**VirtualInbox** | **bool** | Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxExistsDto.md b/docs/InboxExistsDto.md new file mode 100644 index 00000000..a438b02a --- /dev/null +++ b/docs/InboxExistsDto.md @@ -0,0 +1,11 @@ +# mailslurp.Model.InboxExistsDto +Result of email exists query + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Exists** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxForwarderControllerApi.md b/docs/InboxForwarderControllerApi.md new file mode 100644 index 00000000..3c93e38a --- /dev/null +++ b/docs/InboxForwarderControllerApi.md @@ -0,0 +1,995 @@ +# mailslurp.Api.InboxForwarderControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateNewInboxForwarder**](InboxForwarderControllerApi#createnewinboxforwarder) | **POST** /forwarders | Create an inbox forwarder | +| [**DeleteInboxForwarder**](InboxForwarderControllerApi#deleteinboxforwarder) | **DELETE** /forwarders/{id} | Delete an inbox forwarder | +| [**DeleteInboxForwarders**](InboxForwarderControllerApi#deleteinboxforwarders) | **DELETE** /forwarders | Delete inbox forwarders | +| [**GetInboxForwarder**](InboxForwarderControllerApi#getinboxforwarder) | **GET** /forwarders/{id} | Get an inbox forwarder | +| [**GetInboxForwarderEvents**](InboxForwarderControllerApi#getinboxforwarderevents) | **GET** /forwarders/{id}/events | Get an inbox forwarder event list | +| [**GetInboxForwarders**](InboxForwarderControllerApi#getinboxforwarders) | **GET** /forwarders | List inbox forwarders | +| [**TestInboxForwarder**](InboxForwarderControllerApi#testinboxforwarder) | **POST** /forwarders/{id}/test | Test an inbox forwarder | +| [**TestInboxForwardersForInbox**](InboxForwarderControllerApi#testinboxforwardersforinbox) | **PUT** /forwarders | Test inbox forwarders for inbox | +| [**TestNewInboxForwarder**](InboxForwarderControllerApi#testnewinboxforwarder) | **PATCH** /forwarders | Test new inbox forwarder | +| [**UpdateInboxForwarder**](InboxForwarderControllerApi#updateinboxforwarder) | **PUT** /forwarders/{id} | Update an inbox forwarder | + + +# **CreateNewInboxForwarder** +> InboxForwarderDto CreateNewInboxForwarder (Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions) + +Create an inbox forwarder + +Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateNewInboxForwarderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Inbox id to attach forwarder to + var createInboxForwarderOptions = new CreateInboxForwarderOptions(); // CreateInboxForwarderOptions | + + try + { + // Create an inbox forwarder + InboxForwarderDto result = apiInstance.CreateNewInboxForwarder(inboxId, createInboxForwarderOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.CreateNewInboxForwarder: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateNewInboxForwarderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an inbox forwarder + ApiResponse response = apiInstance.CreateNewInboxForwarderWithHttpInfo(inboxId, createInboxForwarderOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.CreateNewInboxForwarderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Inbox id to attach forwarder to | | +| **createInboxForwarderOptions** | [**CreateInboxForwarderOptions**](CreateInboxForwarderOptions) | | | + +### Return type + +[**InboxForwarderDto**](InboxForwarderDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteInboxForwarder** +> void DeleteInboxForwarder (Guid id) + +Delete an inbox forwarder + +Delete inbox forwarder + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteInboxForwarderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var id = "id_example"; // Guid | ID of inbox forwarder + + try + { + // Delete an inbox forwarder + apiInstance.DeleteInboxForwarder(id); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.DeleteInboxForwarder: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteInboxForwarderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete an inbox forwarder + apiInstance.DeleteInboxForwarderWithHttpInfo(id); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.DeleteInboxForwarderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox forwarder | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteInboxForwarders** +> void DeleteInboxForwarders (Guid? inboxId = null) + +Delete inbox forwarders + +Delete inbox forwarders. Accepts optional inboxId filter. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteInboxForwardersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Optional inbox id to attach forwarder to (optional) + + try + { + // Delete inbox forwarders + apiInstance.DeleteInboxForwarders(inboxId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.DeleteInboxForwarders: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteInboxForwardersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete inbox forwarders + apiInstance.DeleteInboxForwardersWithHttpInfo(inboxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.DeleteInboxForwardersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Optional inbox id to attach forwarder to | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxForwarder** +> InboxForwarderDto GetInboxForwarder (Guid id) + +Get an inbox forwarder + +Get inbox ruleset + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxForwarderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var id = "id_example"; // Guid | ID of inbox forwarder + + try + { + // Get an inbox forwarder + InboxForwarderDto result = apiInstance.GetInboxForwarder(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.GetInboxForwarder: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxForwarderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an inbox forwarder + ApiResponse response = apiInstance.GetInboxForwarderWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.GetInboxForwarderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox forwarder | | + +### Return type + +[**InboxForwarderDto**](InboxForwarderDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxForwarderEvents** +> PageInboxForwarderEvents GetInboxForwarderEvents (Guid id, int? page = null, int? size = null, string sort = null) + +Get an inbox forwarder event list + +Get inbox ruleset events + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxForwarderEventsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var id = "id_example"; // Guid | ID of inbox forwarder + var page = 0; // int? | Optional page index in inbox forwarder event list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox forwarder event list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + + try + { + // Get an inbox forwarder event list + PageInboxForwarderEvents result = apiInstance.GetInboxForwarderEvents(id, page, size, sort); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.GetInboxForwarderEvents: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxForwarderEventsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an inbox forwarder event list + ApiResponse response = apiInstance.GetInboxForwarderEventsWithHttpInfo(id, page, size, sort); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.GetInboxForwarderEventsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox forwarder | | +| **page** | **int?** | Optional page index in inbox forwarder event list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox forwarder event list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | + +### Return type + +[**PageInboxForwarderEvents**](PageInboxForwarderEvents) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxForwarders** +> PageInboxForwarderDto GetInboxForwarders (Guid? inboxId = null, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +List inbox forwarders + +List all forwarders attached to an inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxForwardersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Optional inbox id to get forwarders from (optional) + var page = 0; // int? | Optional page index in inbox forwarder list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox forwarder list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // List inbox forwarders + PageInboxForwarderDto result = apiInstance.GetInboxForwarders(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.GetInboxForwarders: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxForwardersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List inbox forwarders + ApiResponse response = apiInstance.GetInboxForwardersWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.GetInboxForwardersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Optional inbox id to get forwarders from | [optional] | +| **page** | **int?** | Optional page index in inbox forwarder list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox forwarder list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageInboxForwarderDto**](PageInboxForwarderDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **TestInboxForwarder** +> InboxForwarderTestResult TestInboxForwarder (Guid id, InboxForwarderTestOptions inboxForwarderTestOptions) + +Test an inbox forwarder + +Test an inbox forwarder + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class TestInboxForwarderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var id = "id_example"; // Guid | ID of inbox forwarder + var inboxForwarderTestOptions = new InboxForwarderTestOptions(); // InboxForwarderTestOptions | + + try + { + // Test an inbox forwarder + InboxForwarderTestResult result = apiInstance.TestInboxForwarder(id, inboxForwarderTestOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.TestInboxForwarder: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestInboxForwarderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Test an inbox forwarder + ApiResponse response = apiInstance.TestInboxForwarderWithHttpInfo(id, inboxForwarderTestOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.TestInboxForwarderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox forwarder | | +| **inboxForwarderTestOptions** | [**InboxForwarderTestOptions**](InboxForwarderTestOptions) | | | + +### Return type + +[**InboxForwarderTestResult**](InboxForwarderTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **TestInboxForwardersForInbox** +> InboxForwarderTestResult TestInboxForwardersForInbox (Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions) + +Test inbox forwarders for inbox + +Test inbox forwarders for inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class TestInboxForwardersForInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of inbox + var inboxForwarderTestOptions = new InboxForwarderTestOptions(); // InboxForwarderTestOptions | + + try + { + // Test inbox forwarders for inbox + InboxForwarderTestResult result = apiInstance.TestInboxForwardersForInbox(inboxId, inboxForwarderTestOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.TestInboxForwardersForInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestInboxForwardersForInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Test inbox forwarders for inbox + ApiResponse response = apiInstance.TestInboxForwardersForInboxWithHttpInfo(inboxId, inboxForwarderTestOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.TestInboxForwardersForInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of inbox | | +| **inboxForwarderTestOptions** | [**InboxForwarderTestOptions**](InboxForwarderTestOptions) | | | + +### Return type + +[**InboxForwarderTestResult**](InboxForwarderTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **TestNewInboxForwarder** +> InboxForwarderTestResult TestNewInboxForwarder (TestNewInboxForwarderOptions testNewInboxForwarderOptions) + +Test new inbox forwarder + +Test new inbox forwarder + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class TestNewInboxForwarderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var testNewInboxForwarderOptions = new TestNewInboxForwarderOptions(); // TestNewInboxForwarderOptions | + + try + { + // Test new inbox forwarder + InboxForwarderTestResult result = apiInstance.TestNewInboxForwarder(testNewInboxForwarderOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.TestNewInboxForwarder: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestNewInboxForwarderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Test new inbox forwarder + ApiResponse response = apiInstance.TestNewInboxForwarderWithHttpInfo(testNewInboxForwarderOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.TestNewInboxForwarderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **testNewInboxForwarderOptions** | [**TestNewInboxForwarderOptions**](TestNewInboxForwarderOptions) | | | + +### Return type + +[**InboxForwarderTestResult**](InboxForwarderTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UpdateInboxForwarder** +> InboxForwarderDto UpdateInboxForwarder (Guid id, CreateInboxForwarderOptions createInboxForwarderOptions) + +Update an inbox forwarder + +Update inbox ruleset + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UpdateInboxForwarderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxForwarderControllerApi(config); + var id = "id_example"; // Guid | ID of inbox forwarder + var createInboxForwarderOptions = new CreateInboxForwarderOptions(); // CreateInboxForwarderOptions | + + try + { + // Update an inbox forwarder + InboxForwarderDto result = apiInstance.UpdateInboxForwarder(id, createInboxForwarderOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxForwarderControllerApi.UpdateInboxForwarder: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateInboxForwarderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update an inbox forwarder + ApiResponse response = apiInstance.UpdateInboxForwarderWithHttpInfo(id, createInboxForwarderOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxForwarderControllerApi.UpdateInboxForwarderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox forwarder | | +| **createInboxForwarderOptions** | [**CreateInboxForwarderOptions**](CreateInboxForwarderOptions) | | | + +### Return type + +[**InboxForwarderDto**](InboxForwarderDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/InboxForwarderDto.md b/docs/InboxForwarderDto.md new file mode 100644 index 00000000..6aa040f5 --- /dev/null +++ b/docs/InboxForwarderDto.md @@ -0,0 +1,16 @@ +# mailslurp.Model.InboxForwarderDto +Inbox forwarder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**InboxId** | **Guid** | | +**Field** | **string** | | +**Match** | **string** | | +**ForwardToRecipients** | **List<string>** | | +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxForwarderEventProjection.md b/docs/InboxForwarderEventProjection.md new file mode 100644 index 00000000..7bd81b88 --- /dev/null +++ b/docs/InboxForwarderEventProjection.md @@ -0,0 +1,18 @@ +# mailslurp.Model.InboxForwarderEventProjection +Inbox forwarder event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | [optional] +**Id** | **Guid?** | | [optional] +**Status** | **string** | | [optional] +**UserId** | **Guid?** | | [optional] +**EmailId** | **Guid?** | | [optional] +**InboxId** | **Guid?** | | [optional] +**CreatedAt** | **DateTime** | | +**ForwarderId** | **Guid?** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxForwarderTestOptions.md b/docs/InboxForwarderTestOptions.md new file mode 100644 index 00000000..b8cbb1f7 --- /dev/null +++ b/docs/InboxForwarderTestOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.InboxForwarderTestOptions +Options for testing an inbox forwarder against a value + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TestValue** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxForwarderTestResult.md b/docs/InboxForwarderTestResult.md new file mode 100644 index 00000000..e7d3ebe3 --- /dev/null +++ b/docs/InboxForwarderTestResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.InboxForwarderTestResult +Results of inbox forwarder test + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Matches** | **Dictionary<string, bool>** | | +**DoesMatch** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxIdItem.md b/docs/InboxIdItem.md new file mode 100644 index 00000000..8e830655 --- /dev/null +++ b/docs/InboxIdItem.md @@ -0,0 +1,12 @@ +# mailslurp.Model.InboxIdItem +Inbox ID and email address pair + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**EmailAddress** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxIdsResult.md b/docs/InboxIdsResult.md new file mode 100644 index 00000000..f55cf174 --- /dev/null +++ b/docs/InboxIdsResult.md @@ -0,0 +1,11 @@ +# mailslurp.Model.InboxIdsResult +List of inbox IDs and email addresses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxIds** | [**List<InboxIdItem>**](InboxIdItem) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxPreview.md b/docs/InboxPreview.md new file mode 100644 index 00000000..fc3b38be --- /dev/null +++ b/docs/InboxPreview.md @@ -0,0 +1,21 @@ +# mailslurp.Model.InboxPreview +Inbox data preview element. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. | +**DomainId** | **Guid?** | ID of custom domain used by the inbox if any | [optional] +**EmailAddress** | **string** | The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] +**CreatedAt** | **DateTime** | When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. | +**Favourite** | **bool** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | +**Name** | **string** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**Tags** | **List<string>** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**TeamAccess** | **bool** | Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ | +**InboxType** | **string** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**VirtualInbox** | **bool** | Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. | +**ExpiresAt** | **string** | Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxRulesetControllerApi.md b/docs/InboxRulesetControllerApi.md new file mode 100644 index 00000000..2283a3da --- /dev/null +++ b/docs/InboxRulesetControllerApi.md @@ -0,0 +1,793 @@ +# mailslurp.Api.InboxRulesetControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateNewInboxRuleset**](InboxRulesetControllerApi#createnewinboxruleset) | **POST** /rulesets | Create an inbox ruleset | +| [**DeleteInboxRuleset**](InboxRulesetControllerApi#deleteinboxruleset) | **DELETE** /rulesets/{id} | Delete an inbox ruleset | +| [**DeleteInboxRulesets**](InboxRulesetControllerApi#deleteinboxrulesets) | **DELETE** /rulesets | Delete inbox rulesets | +| [**GetInboxRuleset**](InboxRulesetControllerApi#getinboxruleset) | **GET** /rulesets/{id} | Get an inbox ruleset | +| [**GetInboxRulesets**](InboxRulesetControllerApi#getinboxrulesets) | **GET** /rulesets | List inbox rulesets | +| [**TestInboxRuleset**](InboxRulesetControllerApi#testinboxruleset) | **POST** /rulesets/{id}/test | Test an inbox ruleset | +| [**TestInboxRulesetsForInbox**](InboxRulesetControllerApi#testinboxrulesetsforinbox) | **PUT** /rulesets | Test inbox rulesets for inbox | +| [**TestNewInboxRuleset**](InboxRulesetControllerApi#testnewinboxruleset) | **PATCH** /rulesets | Test new inbox ruleset | + + +# **CreateNewInboxRuleset** +> InboxRulesetDto CreateNewInboxRuleset (Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions) + +Create an inbox ruleset + +Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateNewInboxRulesetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Inbox id to attach ruleset to + var createInboxRulesetOptions = new CreateInboxRulesetOptions(); // CreateInboxRulesetOptions | + + try + { + // Create an inbox ruleset + InboxRulesetDto result = apiInstance.CreateNewInboxRuleset(inboxId, createInboxRulesetOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.CreateNewInboxRuleset: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateNewInboxRulesetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an inbox ruleset + ApiResponse response = apiInstance.CreateNewInboxRulesetWithHttpInfo(inboxId, createInboxRulesetOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.CreateNewInboxRulesetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Inbox id to attach ruleset to | | +| **createInboxRulesetOptions** | [**CreateInboxRulesetOptions**](CreateInboxRulesetOptions) | | | + +### Return type + +[**InboxRulesetDto**](InboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteInboxRuleset** +> void DeleteInboxRuleset (Guid id) + +Delete an inbox ruleset + +Delete inbox ruleset + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteInboxRulesetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var id = "id_example"; // Guid | ID of inbox ruleset + + try + { + // Delete an inbox ruleset + apiInstance.DeleteInboxRuleset(id); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRuleset: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteInboxRulesetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete an inbox ruleset + apiInstance.DeleteInboxRulesetWithHttpInfo(id); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRulesetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox ruleset | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteInboxRulesets** +> void DeleteInboxRulesets (Guid? inboxId = null) + +Delete inbox rulesets + +Delete inbox rulesets. Accepts optional inboxId filter. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteInboxRulesetsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Optional inbox id to attach ruleset to (optional) + + try + { + // Delete inbox rulesets + apiInstance.DeleteInboxRulesets(inboxId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRulesets: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteInboxRulesetsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete inbox rulesets + apiInstance.DeleteInboxRulesetsWithHttpInfo(inboxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRulesetsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Optional inbox id to attach ruleset to | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxRuleset** +> InboxRulesetDto GetInboxRuleset (Guid id) + +Get an inbox ruleset + +Get inbox ruleset + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxRulesetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var id = "id_example"; // Guid | ID of inbox ruleset + + try + { + // Get an inbox ruleset + InboxRulesetDto result = apiInstance.GetInboxRuleset(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRuleset: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxRulesetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an inbox ruleset + ApiResponse response = apiInstance.GetInboxRulesetWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRulesetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox ruleset | | + +### Return type + +[**InboxRulesetDto**](InboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxRulesets** +> PageInboxRulesetDto GetInboxRulesets (Guid? inboxId = null, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +List inbox rulesets + +List all rulesets attached to an inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxRulesetsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Optional inbox id to get rulesets from (optional) + var page = 0; // int? | Optional page index in inbox ruleset list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox ruleset list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // List inbox rulesets + PageInboxRulesetDto result = apiInstance.GetInboxRulesets(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRulesets: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxRulesetsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List inbox rulesets + ApiResponse response = apiInstance.GetInboxRulesetsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRulesetsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Optional inbox id to get rulesets from | [optional] | +| **page** | **int?** | Optional page index in inbox ruleset list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox ruleset list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageInboxRulesetDto**](PageInboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **TestInboxRuleset** +> InboxRulesetTestResult TestInboxRuleset (Guid id, InboxRulesetTestOptions inboxRulesetTestOptions) + +Test an inbox ruleset + +Test an inbox ruleset + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class TestInboxRulesetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var id = "id_example"; // Guid | ID of inbox ruleset + var inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions | + + try + { + // Test an inbox ruleset + InboxRulesetTestResult result = apiInstance.TestInboxRuleset(id, inboxRulesetTestOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRuleset: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestInboxRulesetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Test an inbox ruleset + ApiResponse response = apiInstance.TestInboxRulesetWithHttpInfo(id, inboxRulesetTestOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRulesetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | ID of inbox ruleset | | +| **inboxRulesetTestOptions** | [**InboxRulesetTestOptions**](InboxRulesetTestOptions) | | | + +### Return type + +[**InboxRulesetTestResult**](InboxRulesetTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **TestInboxRulesetsForInbox** +> InboxRulesetTestResult TestInboxRulesetsForInbox (Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions) + +Test inbox rulesets for inbox + +Test inbox rulesets for inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class TestInboxRulesetsForInboxExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var inboxId = "inboxId_example"; // Guid | ID of inbox + var inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions | + + try + { + // Test inbox rulesets for inbox + InboxRulesetTestResult result = apiInstance.TestInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRulesetsForInbox: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestInboxRulesetsForInboxWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Test inbox rulesets for inbox + ApiResponse response = apiInstance.TestInboxRulesetsForInboxWithHttpInfo(inboxId, inboxRulesetTestOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRulesetsForInboxWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | ID of inbox | | +| **inboxRulesetTestOptions** | [**InboxRulesetTestOptions**](InboxRulesetTestOptions) | | | + +### Return type + +[**InboxRulesetTestResult**](InboxRulesetTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **TestNewInboxRuleset** +> InboxRulesetTestResult TestNewInboxRuleset (TestNewInboxRulesetOptions testNewInboxRulesetOptions) + +Test new inbox ruleset + +Test new inbox ruleset + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class TestNewInboxRulesetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new InboxRulesetControllerApi(config); + var testNewInboxRulesetOptions = new TestNewInboxRulesetOptions(); // TestNewInboxRulesetOptions | + + try + { + // Test new inbox ruleset + InboxRulesetTestResult result = apiInstance.TestNewInboxRuleset(testNewInboxRulesetOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InboxRulesetControllerApi.TestNewInboxRuleset: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestNewInboxRulesetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Test new inbox ruleset + ApiResponse response = apiInstance.TestNewInboxRulesetWithHttpInfo(testNewInboxRulesetOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling InboxRulesetControllerApi.TestNewInboxRulesetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **testNewInboxRulesetOptions** | [**TestNewInboxRulesetOptions**](TestNewInboxRulesetOptions) | | | + +### Return type + +[**InboxRulesetTestResult**](InboxRulesetTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/InboxRulesetDto.md b/docs/InboxRulesetDto.md new file mode 100644 index 00000000..247bec81 --- /dev/null +++ b/docs/InboxRulesetDto.md @@ -0,0 +1,17 @@ +# mailslurp.Model.InboxRulesetDto +Rules for inbox + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**InboxId** | **Guid** | | +**Scope** | **string** | | +**Action** | **string** | | +**Target** | **string** | | +**Handler** | **string** | | +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxRulesetTestOptions.md b/docs/InboxRulesetTestOptions.md new file mode 100644 index 00000000..626cdd74 --- /dev/null +++ b/docs/InboxRulesetTestOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.InboxRulesetTestOptions +Test options for inbox ruleset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TestTarget** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/InboxRulesetTestResult.md b/docs/InboxRulesetTestResult.md new file mode 100644 index 00000000..d29d1317 --- /dev/null +++ b/docs/InboxRulesetTestResult.md @@ -0,0 +1,12 @@ +# mailslurp.Model.InboxRulesetTestResult +Result of test of inbox ruleset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RulesetMatches** | **Dictionary<string, bool>** | Map of inbox ruleset ID to boolean of if target matches | +**Matches** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/JSONSchemaDto.md b/docs/JSONSchemaDto.md new file mode 100644 index 00000000..0bfd5ff1 --- /dev/null +++ b/docs/JSONSchemaDto.md @@ -0,0 +1,11 @@ +# mailslurp.Model.JSONSchemaDto +JSONSchema for payload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ListUnsubscribeRecipientProjection.md b/docs/ListUnsubscribeRecipientProjection.md new file mode 100644 index 00000000..155358e8 --- /dev/null +++ b/docs/ListUnsubscribeRecipientProjection.md @@ -0,0 +1,14 @@ +# mailslurp.Model.ListUnsubscribeRecipientProjection +List unsubscribe recipient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**EmailAddress** | **string** | | +**CreatedAt** | **DateTime** | | +**DomainId** | **Guid?** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/MailServerControllerApi.md b/docs/MailServerControllerApi.md new file mode 100644 index 00000000..05d3476f --- /dev/null +++ b/docs/MailServerControllerApi.md @@ -0,0 +1,387 @@ +# mailslurp.Api.MailServerControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**DescribeMailServerDomain**](MailServerControllerApi#describemailserverdomain) | **POST** /mail-server/describe/domain | Get DNS Mail Server records for a domain | +| [**GetDnsLookup**](MailServerControllerApi#getdnslookup) | **POST** /mail-server/describe/dns-lookup | Lookup DNS records for a domain | +| [**GetIpAddress**](MailServerControllerApi#getipaddress) | **POST** /mail-server/describe/ip-address | Get IP address for a domain | +| [**VerifyEmailAddress**](MailServerControllerApi#verifyemailaddress) | **POST** /mail-server/verify/email-address | Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. | + + +# **DescribeMailServerDomain** +> DescribeMailServerDomainResult DescribeMailServerDomain (DescribeDomainOptions describeDomainOptions) + +Get DNS Mail Server records for a domain + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DescribeMailServerDomainExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MailServerControllerApi(config); + var describeDomainOptions = new DescribeDomainOptions(); // DescribeDomainOptions | + + try + { + // Get DNS Mail Server records for a domain + DescribeMailServerDomainResult result = apiInstance.DescribeMailServerDomain(describeDomainOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MailServerControllerApi.DescribeMailServerDomain: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DescribeMailServerDomainWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get DNS Mail Server records for a domain + ApiResponse response = apiInstance.DescribeMailServerDomainWithHttpInfo(describeDomainOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MailServerControllerApi.DescribeMailServerDomainWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **describeDomainOptions** | [**DescribeDomainOptions**](DescribeDomainOptions) | | | + +### Return type + +[**DescribeMailServerDomainResult**](DescribeMailServerDomainResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetDnsLookup** +> DNSLookupResults GetDnsLookup (DNSLookupOptions dNSLookupOptions) + +Lookup DNS records for a domain + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetDnsLookupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MailServerControllerApi(config); + var dNSLookupOptions = new DNSLookupOptions(); // DNSLookupOptions | + + try + { + // Lookup DNS records for a domain + DNSLookupResults result = apiInstance.GetDnsLookup(dNSLookupOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MailServerControllerApi.GetDnsLookup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDnsLookupWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Lookup DNS records for a domain + ApiResponse response = apiInstance.GetDnsLookupWithHttpInfo(dNSLookupOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MailServerControllerApi.GetDnsLookupWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **dNSLookupOptions** | [**DNSLookupOptions**](DNSLookupOptions) | | | + +### Return type + +[**DNSLookupResults**](DNSLookupResults) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetIpAddress** +> IPAddressResult GetIpAddress (string name) + +Get IP address for a domain + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetIpAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MailServerControllerApi(config); + var name = "name_example"; // string | + + try + { + // Get IP address for a domain + IPAddressResult result = apiInstance.GetIpAddress(name); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MailServerControllerApi.GetIpAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetIpAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get IP address for a domain + ApiResponse response = apiInstance.GetIpAddressWithHttpInfo(name); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MailServerControllerApi.GetIpAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **name** | **string** | | | + +### Return type + +[**IPAddressResult**](IPAddressResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **VerifyEmailAddress** +> EmailVerificationResult VerifyEmailAddress (VerifyEmailAddressOptions verifyEmailAddressOptions) + +Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class VerifyEmailAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MailServerControllerApi(config); + var verifyEmailAddressOptions = new VerifyEmailAddressOptions(); // VerifyEmailAddressOptions | + + try + { + // Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + EmailVerificationResult result = apiInstance.VerifyEmailAddress(verifyEmailAddressOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MailServerControllerApi.VerifyEmailAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the VerifyEmailAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + ApiResponse response = apiInstance.VerifyEmailAddressWithHttpInfo(verifyEmailAddressOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MailServerControllerApi.VerifyEmailAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **verifyEmailAddressOptions** | [**VerifyEmailAddressOptions**](VerifyEmailAddressOptions) | | | + +### Return type + +[**EmailVerificationResult**](EmailVerificationResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/MatchOption.md b/docs/MatchOption.md new file mode 100644 index 00000000..43aea9b7 --- /dev/null +++ b/docs/MatchOption.md @@ -0,0 +1,13 @@ +# mailslurp.Model.MatchOption +Options for matching emails in an inbox. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `SUBJECT` should `CONTAIN` value. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | Fields of an email object that can be used to filter results | +**Should** | **string** | How the value of the email field specified should be compared to the value given in the match options. | +**Value** | **string** | The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/MatchOptions.md b/docs/MatchOptions.md new file mode 100644 index 00000000..12f62623 --- /dev/null +++ b/docs/MatchOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.MatchOptions +Optional filter for matching emails based on fields. For instance filter results to only include emails whose `SUBJECT` value does `CONTAIN` given match value. An example payload would be `{ matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }`. You can also pass conditions such as `HAS_ATTACHMENT`. If you wish to extract regex matches inside the email content see the `getEmailContentMatch` method in the EmailController. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Matches** | [**List<MatchOption>**](MatchOption) | Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results | [optional] +**Conditions** | [**List<ConditionOption>**](ConditionOption) | Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/MissedEmailControllerApi.md b/docs/MissedEmailControllerApi.md new file mode 100644 index 00000000..e0593942 --- /dev/null +++ b/docs/MissedEmailControllerApi.md @@ -0,0 +1,513 @@ +# mailslurp.Api.MissedEmailControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**GetAllMissedEmails**](MissedEmailControllerApi#getallmissedemails) | **GET** /missed-emails | Get all MissedEmails in paginated format | +| [**GetAllUnknownMissedEmails**](MissedEmailControllerApi#getallunknownmissedemails) | **GET** /missed-emails/unknown | Get all unknown missed emails in paginated format | +| [**GetMissedEmail**](MissedEmailControllerApi#getmissedemail) | **GET** /missed-emails/{missedEmailId} | Get MissedEmail | +| [**RestoreMissedEmails**](MissedEmailControllerApi#restoremissedemails) | **POST** /missed-emails/restore | Restore missed emails | +| [**WaitForNthMissedEmail**](MissedEmailControllerApi#waitfornthmissedemail) | **GET** /missed-emails/waitForNthMissedEmail | Wait for Nth missed email | + + +# **GetAllMissedEmails** +> PageMissedEmailProjection GetAllMissedEmails (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, Guid? inboxId = null) + +Get all MissedEmails in paginated format + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllMissedEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MissedEmailControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + var inboxId = "inboxId_example"; // Guid? | Optional inbox ID filter (optional) + + try + { + // Get all MissedEmails in paginated format + PageMissedEmailProjection result = apiInstance.GetAllMissedEmails(page, size, sort, searchFilter, since, before, inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MissedEmailControllerApi.GetAllMissedEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllMissedEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all MissedEmails in paginated format + ApiResponse response = apiInstance.GetAllMissedEmailsWithHttpInfo(page, size, sort, searchFilter, since, before, inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MissedEmailControllerApi.GetAllMissedEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | +| **inboxId** | **Guid?** | Optional inbox ID filter | [optional] | + +### Return type + +[**PageMissedEmailProjection**](PageMissedEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllUnknownMissedEmails** +> PageUnknownMissedEmailProjection GetAllUnknownMissedEmails (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, Guid? inboxId = null) + +Get all unknown missed emails in paginated format + +Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllUnknownMissedEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MissedEmailControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + var inboxId = "inboxId_example"; // Guid? | Optional inbox ID filter (optional) + + try + { + // Get all unknown missed emails in paginated format + PageUnknownMissedEmailProjection result = apiInstance.GetAllUnknownMissedEmails(page, size, sort, searchFilter, since, before, inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MissedEmailControllerApi.GetAllUnknownMissedEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllUnknownMissedEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all unknown missed emails in paginated format + ApiResponse response = apiInstance.GetAllUnknownMissedEmailsWithHttpInfo(page, size, sort, searchFilter, since, before, inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MissedEmailControllerApi.GetAllUnknownMissedEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | +| **inboxId** | **Guid?** | Optional inbox ID filter | [optional] | + +### Return type + +[**PageUnknownMissedEmailProjection**](PageUnknownMissedEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetMissedEmail** +> MissedEmailDto GetMissedEmail (Guid missedEmailId) + +Get MissedEmail + +List emails that were missed due to plan limits. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetMissedEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MissedEmailControllerApi(config); + var missedEmailId = "missedEmailId_example"; // Guid | + + try + { + // Get MissedEmail + MissedEmailDto result = apiInstance.GetMissedEmail(missedEmailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MissedEmailControllerApi.GetMissedEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetMissedEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get MissedEmail + ApiResponse response = apiInstance.GetMissedEmailWithHttpInfo(missedEmailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MissedEmailControllerApi.GetMissedEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **missedEmailId** | **Guid** | | | + +### Return type + +[**MissedEmailDto**](MissedEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **RestoreMissedEmails** +> void RestoreMissedEmails () + +Restore missed emails + +If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class RestoreMissedEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MissedEmailControllerApi(config); + + try + { + // Restore missed emails + apiInstance.RestoreMissedEmails(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MissedEmailControllerApi.RestoreMissedEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RestoreMissedEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Restore missed emails + apiInstance.RestoreMissedEmailsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MissedEmailControllerApi.RestoreMissedEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForNthMissedEmail** +> MissedEmailDto WaitForNthMissedEmail (int index, Guid? inboxId = null, long? timeout = null, DateTime? since = null, DateTime? before = null) + +Wait for Nth missed email + +Wait for 0 based index missed email + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForNthMissedEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new MissedEmailControllerApi(config); + var index = 56; // int | Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + var inboxId = "inboxId_example"; // Guid? | Optional inbox ID filter (optional) + var timeout = 789L; // long? | Optional timeout milliseconds (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Wait for Nth missed email + MissedEmailDto result = apiInstance.WaitForNthMissedEmail(index, inboxId, timeout, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MissedEmailControllerApi.WaitForNthMissedEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForNthMissedEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait for Nth missed email + ApiResponse response = apiInstance.WaitForNthMissedEmailWithHttpInfo(index, inboxId, timeout, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MissedEmailControllerApi.WaitForNthMissedEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **index** | **int** | Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 | | +| **inboxId** | **Guid?** | Optional inbox ID filter | [optional] | +| **timeout** | **long?** | Optional timeout milliseconds | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**MissedEmailDto**](MissedEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/MissedEmailDto.md b/docs/MissedEmailDto.md new file mode 100644 index 00000000..d9ccb7f0 --- /dev/null +++ b/docs/MissedEmailDto.md @@ -0,0 +1,26 @@ +# mailslurp.Model.MissedEmailDto +Missed email + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid?** | | [optional] +**Subject** | **string** | | [optional] +**BodyExcerpt** | **string** | | [optional] +**AttachmentCount** | **int** | | +**From** | **string** | | [optional] +**RawUrl** | **string** | | [optional] +**RawKey** | **string** | | [optional] +**RawBucket** | **string** | | [optional] +**CanRestore** | **bool?** | | [optional] +**To** | **List<string>** | | +**Cc** | **List<string>** | | +**Bcc** | **List<string>** | | +**InboxIds** | **List<Guid>** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/MissedEmailProjection.md b/docs/MissedEmailProjection.md new file mode 100644 index 00000000..91e7120a --- /dev/null +++ b/docs/MissedEmailProjection.md @@ -0,0 +1,15 @@ +# mailslurp.Model.MissedEmailProjection +Missed email data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**From** | **string** | | [optional] +**Subject** | **string** | | [optional] +**UserId** | **Guid?** | | [optional] +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/NameServerRecord.md b/docs/NameServerRecord.md new file mode 100644 index 00000000..5f727342 --- /dev/null +++ b/docs/NameServerRecord.md @@ -0,0 +1,14 @@ +# mailslurp.Model.NameServerRecord +Name Server Record + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Raw** | **string** | | +**RecordType** | **string** | | +**Priority** | **string** | | +**Value** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/OrganizationInboxProjection.md b/docs/OrganizationInboxProjection.md new file mode 100644 index 00000000..66aa3d9b --- /dev/null +++ b/docs/OrganizationInboxProjection.md @@ -0,0 +1,21 @@ +# mailslurp.Model.OrganizationInboxProjection +Organization team inbox + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. | +**DomainId** | **Guid?** | ID of custom domain used by the inbox if any | [optional] +**CreatedAt** | **DateTime** | When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. | +**Name** | **string** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**EmailAddress** | **string** | The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] +**Favourite** | **bool** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | +**Tags** | **List<string>** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**TeamAccess** | **bool** | Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ | +**InboxType** | **string** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**ReadOnly** | **bool** | Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. | +**VirtualInbox** | **bool** | Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageAlias.md b/docs/PageAlias.md new file mode 100644 index 00000000..f949c281 --- /dev/null +++ b/docs/PageAlias.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageAlias +Paginated email alias results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<AliasProjection>**](AliasProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageAttachmentEntity.md b/docs/PageAttachmentEntity.md new file mode 100644 index 00000000..52195723 --- /dev/null +++ b/docs/PageAttachmentEntity.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageAttachmentEntity +Paginated attachment entity results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<AttachmentProjection>**](AttachmentProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageBouncedEmail.md b/docs/PageBouncedEmail.md new file mode 100644 index 00000000..784d4f7a --- /dev/null +++ b/docs/PageBouncedEmail.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageBouncedEmail +Paginated bounced email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<BounceProjection>**](BounceProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageBouncedRecipients.md b/docs/PageBouncedRecipients.md new file mode 100644 index 00000000..3be85ad3 --- /dev/null +++ b/docs/PageBouncedRecipients.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageBouncedRecipients +Paginated bounced recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<BounceRecipientProjection>**](BounceRecipientProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageComplaint.md b/docs/PageComplaint.md new file mode 100644 index 00000000..cc7227ed --- /dev/null +++ b/docs/PageComplaint.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageComplaint +Paginated complaint email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<Complaint>**](Complaint) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageContactProjection.md b/docs/PageContactProjection.md new file mode 100644 index 00000000..616c71f2 --- /dev/null +++ b/docs/PageContactProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageContactProjection +Paginated contact results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<ContactProjection>**](ContactProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageDeliveryStatus.md b/docs/PageDeliveryStatus.md new file mode 100644 index 00000000..bfaa6c22 --- /dev/null +++ b/docs/PageDeliveryStatus.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageDeliveryStatus +Paginated delivery status results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<DeliveryStatusDto>**](DeliveryStatusDto) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageEmailPreview.md b/docs/PageEmailPreview.md new file mode 100644 index 00000000..14039bab --- /dev/null +++ b/docs/PageEmailPreview.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageEmailPreview +Paginated email preview results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<EmailPreview>**](EmailPreview) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageEmailProjection.md b/docs/PageEmailProjection.md new file mode 100644 index 00000000..dc8120be --- /dev/null +++ b/docs/PageEmailProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageEmailProjection +Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<EmailProjection>**](EmailProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageEmailValidationRequest.md b/docs/PageEmailValidationRequest.md new file mode 100644 index 00000000..428fa010 --- /dev/null +++ b/docs/PageEmailValidationRequest.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageEmailValidationRequest +Paginated email validation request records. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<EmailValidationRequestDto>**](EmailValidationRequestDto) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageExpiredInboxRecordProjection.md b/docs/PageExpiredInboxRecordProjection.md new file mode 100644 index 00000000..7a6b4825 --- /dev/null +++ b/docs/PageExpiredInboxRecordProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageExpiredInboxRecordProjection +Paginated expired inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<ExpiredInboxRecordProjection>**](ExpiredInboxRecordProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageGroupProjection.md b/docs/PageGroupProjection.md new file mode 100644 index 00000000..bbe5dd87 --- /dev/null +++ b/docs/PageGroupProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageGroupProjection +Paginated missed email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<GroupProjection>**](GroupProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageInboxForwarderDto.md b/docs/PageInboxForwarderDto.md new file mode 100644 index 00000000..e01c9451 --- /dev/null +++ b/docs/PageInboxForwarderDto.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageInboxForwarderDto +Paginated inbox forwarder results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<InboxForwarderDto>**](InboxForwarderDto) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageInboxForwarderEvents.md b/docs/PageInboxForwarderEvents.md new file mode 100644 index 00000000..15677c58 --- /dev/null +++ b/docs/PageInboxForwarderEvents.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageInboxForwarderEvents +Paginated inbox forwarder events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<InboxForwarderEventProjection>**](InboxForwarderEventProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageInboxProjection.md b/docs/PageInboxProjection.md new file mode 100644 index 00000000..835e47c1 --- /dev/null +++ b/docs/PageInboxProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageInboxProjection +Paginated inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<InboxPreview>**](InboxPreview) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageInboxRulesetDto.md b/docs/PageInboxRulesetDto.md new file mode 100644 index 00000000..93efb792 --- /dev/null +++ b/docs/PageInboxRulesetDto.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageInboxRulesetDto +Paginated inbox ruleset results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<InboxRulesetDto>**](InboxRulesetDto) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageListUnsubscribeRecipients.md b/docs/PageListUnsubscribeRecipients.md new file mode 100644 index 00000000..a51d75f3 --- /dev/null +++ b/docs/PageListUnsubscribeRecipients.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageListUnsubscribeRecipients +Paginated list unsubscribe recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<ListUnsubscribeRecipientProjection>**](ListUnsubscribeRecipientProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageMissedEmailProjection.md b/docs/PageMissedEmailProjection.md new file mode 100644 index 00000000..0ebd763a --- /dev/null +++ b/docs/PageMissedEmailProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageMissedEmailProjection +Paginated MissedEmail results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<MissedEmailProjection>**](MissedEmailProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageOrganizationInboxProjection.md b/docs/PageOrganizationInboxProjection.md new file mode 100644 index 00000000..20a17fdb --- /dev/null +++ b/docs/PageOrganizationInboxProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageOrganizationInboxProjection +Paginated organization inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<OrganizationInboxProjection>**](OrganizationInboxProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PagePhoneNumberProjection.md b/docs/PagePhoneNumberProjection.md new file mode 100644 index 00000000..2456682e --- /dev/null +++ b/docs/PagePhoneNumberProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PagePhoneNumberProjection +Paginated phone numbers. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<PhoneNumberProjection>**](PhoneNumberProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageScheduledJobs.md b/docs/PageScheduledJobs.md new file mode 100644 index 00000000..5b4b84bc --- /dev/null +++ b/docs/PageScheduledJobs.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageScheduledJobs +Paginated scheduled jobs results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<ScheduledJob>**](ScheduledJob) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageSentEmailProjection.md b/docs/PageSentEmailProjection.md new file mode 100644 index 00000000..1d78c537 --- /dev/null +++ b/docs/PageSentEmailProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageSentEmailProjection +Paginated sent email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<SentEmailProjection>**](SentEmailProjection) | Collection of items | +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Size** | **int** | Size of page requested | +**Number** | **int** | Page number starting at 0 | +**NumberOfElements** | **int** | Number of items returned | +**TotalElements** | **long** | Total number of items available for querying | +**TotalPages** | **int** | Total number of pages available | +**Last** | **bool** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageSentEmailWithQueueProjection.md b/docs/PageSentEmailWithQueueProjection.md new file mode 100644 index 00000000..5f6eb17a --- /dev/null +++ b/docs/PageSentEmailWithQueueProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageSentEmailWithQueueProjection +Paginated sent email results for emails sent with queue. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<SendWithQueueResult>**](SendWithQueueResult) | Collection of items | +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Size** | **int** | Size of page requested | +**Number** | **int** | Page number starting at 0 | +**NumberOfElements** | **int** | Number of items returned | +**TotalElements** | **long** | Total number of items available for querying | +**TotalPages** | **int** | Total number of pages available | +**Last** | **bool** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageSmsProjection.md b/docs/PageSmsProjection.md new file mode 100644 index 00000000..7d135cad --- /dev/null +++ b/docs/PageSmsProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageSmsProjection +Paginated SMS messages. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<SmsProjection>**](SmsProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageTemplateProjection.md b/docs/PageTemplateProjection.md new file mode 100644 index 00000000..71618d5f --- /dev/null +++ b/docs/PageTemplateProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageTemplateProjection +Paginated email template results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<TemplateProjection>**](TemplateProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageThreadProjection.md b/docs/PageThreadProjection.md new file mode 100644 index 00000000..4bbc282d --- /dev/null +++ b/docs/PageThreadProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageThreadProjection +Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<ThreadProjection>**](ThreadProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageTrackingPixelProjection.md b/docs/PageTrackingPixelProjection.md new file mode 100644 index 00000000..7f49013d --- /dev/null +++ b/docs/PageTrackingPixelProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageTrackingPixelProjection +Paginated TrackingPixel results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<TrackingPixelProjection>**](TrackingPixelProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageUnknownMissedEmailProjection.md b/docs/PageUnknownMissedEmailProjection.md new file mode 100644 index 00000000..bc7a8d89 --- /dev/null +++ b/docs/PageUnknownMissedEmailProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageUnknownMissedEmailProjection +Paginated unknown MissedEmail results. Unknown missed emails are emails that were sent to MailSlurp /Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<UnknownMissedEmailProjection>**](UnknownMissedEmailProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageWebhookProjection.md b/docs/PageWebhookProjection.md new file mode 100644 index 00000000..bde694c7 --- /dev/null +++ b/docs/PageWebhookProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageWebhookProjection +Paginated webhook entity. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<WebhookProjection>**](WebhookProjection) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageWebhookResult.md b/docs/PageWebhookResult.md new file mode 100644 index 00000000..9c2d65a3 --- /dev/null +++ b/docs/PageWebhookResult.md @@ -0,0 +1,22 @@ +# mailslurp.Model.PageWebhookResult +Paginated webhook results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**List<WebhookResultDto>**](WebhookResultDto) | | [optional] +**Pageable** | [**PageableObject**](PageableObject) | | [optional] +**Total** | **long** | | [optional] +**Last** | **bool** | | [optional] +**TotalElements** | **long** | | [optional] +**TotalPages** | **int** | | [optional] +**Size** | **int** | | [optional] +**Number** | **int** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**First** | **bool** | | [optional] +**NumberOfElements** | **int** | | [optional] +**Empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PageableObject.md b/docs/PageableObject.md new file mode 100644 index 00000000..6de89b99 --- /dev/null +++ b/docs/PageableObject.md @@ -0,0 +1,15 @@ +# mailslurp.Model.PageableObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offset** | **long** | | [optional] +**Sort** | [**Sort**](Sort) | | [optional] +**PageNumber** | **int** | | [optional] +**PageSize** | **int** | | [optional] +**Paged** | **bool** | | [optional] +**Unpaged** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PhoneControllerApi.md b/docs/PhoneControllerApi.md new file mode 100644 index 00000000..1789e226 --- /dev/null +++ b/docs/PhoneControllerApi.md @@ -0,0 +1,840 @@ +# mailslurp.Api.PhoneControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateEmergencyAddress**](PhoneControllerApi#createemergencyaddress) | **POST** /phone/emergency-addresses | | +| [**DeleteEmergencyAddress**](PhoneControllerApi#deleteemergencyaddress) | **DELETE** /phone/emergency-addresses/{addressId} | | +| [**DeletePhoneNumber**](PhoneControllerApi#deletephonenumber) | **DELETE** /phone/numbers/{phoneNumberId} | | +| [**GetEmergencyAddress**](PhoneControllerApi#getemergencyaddress) | **GET** /phone/emergency-addresses/{addressId} | | +| [**GetEmergencyAddresses**](PhoneControllerApi#getemergencyaddresses) | **GET** /phone/emergency-addresses | | +| [**GetPhoneNumber**](PhoneControllerApi#getphonenumber) | **GET** /phone/numbers/{phoneNumberId} | | +| [**GetPhoneNumbers**](PhoneControllerApi#getphonenumbers) | **GET** /phone/numbers | | +| [**GetPhonePlans**](PhoneControllerApi#getphoneplans) | **GET** /phone/plans | | +| [**TestPhoneNumberSendSms**](PhoneControllerApi#testphonenumbersendsms) | **POST** /phone/numbers/{phoneNumberId}/test | | + + +# **CreateEmergencyAddress** +> EmergencyAddress CreateEmergencyAddress (CreateEmergencyAddressOptions createEmergencyAddressOptions) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateEmergencyAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + var createEmergencyAddressOptions = new CreateEmergencyAddressOptions(); // CreateEmergencyAddressOptions | + + try + { + EmergencyAddress result = apiInstance.CreateEmergencyAddress(createEmergencyAddressOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.CreateEmergencyAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateEmergencyAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.CreateEmergencyAddressWithHttpInfo(createEmergencyAddressOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.CreateEmergencyAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createEmergencyAddressOptions** | [**CreateEmergencyAddressOptions**](CreateEmergencyAddressOptions) | | | + +### Return type + +[**EmergencyAddress**](EmergencyAddress) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteEmergencyAddress** +> EmptyResponseDto DeleteEmergencyAddress (Guid addressId) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteEmergencyAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + var addressId = "addressId_example"; // Guid | + + try + { + EmptyResponseDto result = apiInstance.DeleteEmergencyAddress(addressId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.DeleteEmergencyAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteEmergencyAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.DeleteEmergencyAddressWithHttpInfo(addressId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.DeleteEmergencyAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **addressId** | **Guid** | | | + +### Return type + +[**EmptyResponseDto**](EmptyResponseDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeletePhoneNumber** +> void DeletePhoneNumber (Guid phoneNumberId) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeletePhoneNumberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + var phoneNumberId = "phoneNumberId_example"; // Guid | + + try + { + apiInstance.DeletePhoneNumber(phoneNumberId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.DeletePhoneNumber: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeletePhoneNumberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + apiInstance.DeletePhoneNumberWithHttpInfo(phoneNumberId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.DeletePhoneNumberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneNumberId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmergencyAddress** +> EmergencyAddress GetEmergencyAddress (Guid addressId) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmergencyAddressExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + var addressId = "addressId_example"; // Guid | + + try + { + EmergencyAddress result = apiInstance.GetEmergencyAddress(addressId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.GetEmergencyAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmergencyAddressWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetEmergencyAddressWithHttpInfo(addressId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.GetEmergencyAddressWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **addressId** | **Guid** | | | + +### Return type + +[**EmergencyAddress**](EmergencyAddress) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetEmergencyAddresses** +> List<EmergencyAddressDto> GetEmergencyAddresses () + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetEmergencyAddressesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + + try + { + List result = apiInstance.GetEmergencyAddresses(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.GetEmergencyAddresses: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetEmergencyAddressesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse> response = apiInstance.GetEmergencyAddressesWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.GetEmergencyAddressesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**List<EmergencyAddressDto>**](EmergencyAddressDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetPhoneNumber** +> PhoneNumberDto GetPhoneNumber (Guid phoneNumberId) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetPhoneNumberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + var phoneNumberId = "phoneNumberId_example"; // Guid | + + try + { + PhoneNumberDto result = apiInstance.GetPhoneNumber(phoneNumberId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.GetPhoneNumber: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPhoneNumberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetPhoneNumberWithHttpInfo(phoneNumberId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.GetPhoneNumberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneNumberId** | **Guid** | | | + +### Return type + +[**PhoneNumberDto**](PhoneNumberDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetPhoneNumbers** +> PagePhoneNumberProjection GetPhoneNumbers (string phoneCountry = null, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetPhoneNumbersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + var phoneCountry = "US"; // string | Optional phone country (optional) + var page = 0; // int? | Optional page index for list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size for list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PagePhoneNumberProjection result = apiInstance.GetPhoneNumbers(phoneCountry, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.GetPhoneNumbers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPhoneNumbersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetPhoneNumbersWithHttpInfo(phoneCountry, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.GetPhoneNumbersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneCountry** | **string** | Optional phone country | [optional] | +| **page** | **int?** | Optional page index for list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size for list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PagePhoneNumberProjection**](PagePhoneNumberProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetPhonePlans** +> List<PhonePlanDto> GetPhonePlans () + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetPhonePlansExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + + try + { + List result = apiInstance.GetPhonePlans(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.GetPhonePlans: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPhonePlansWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse> response = apiInstance.GetPhonePlansWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.GetPhonePlansWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**List<PhonePlanDto>**](PhonePlanDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **TestPhoneNumberSendSms** +> void TestPhoneNumberSendSms (Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = null) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class TestPhoneNumberSendSmsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new PhoneControllerApi(config); + var phoneNumberId = "phoneNumberId_example"; // Guid | + var testPhoneNumberOptions = new TestPhoneNumberOptions(); // TestPhoneNumberOptions | + var xTestId = "xTestId_example"; // string | (optional) + + try + { + apiInstance.TestPhoneNumberSendSms(phoneNumberId, testPhoneNumberOptions, xTestId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PhoneControllerApi.TestPhoneNumberSendSms: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestPhoneNumberSendSmsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + apiInstance.TestPhoneNumberSendSmsWithHttpInfo(phoneNumberId, testPhoneNumberOptions, xTestId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PhoneControllerApi.TestPhoneNumberSendSmsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneNumberId** | **Guid** | | | +| **testPhoneNumberOptions** | [**TestPhoneNumberOptions**](TestPhoneNumberOptions) | | | +| **xTestId** | **string** | | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/PhoneNumberDto.md b/docs/PhoneNumberDto.md new file mode 100644 index 00000000..791cbd72 --- /dev/null +++ b/docs/PhoneNumberDto.md @@ -0,0 +1,18 @@ +# mailslurp.Model.PhoneNumberDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**ComplianceAddress** | **Guid** | | [optional] +**EmergencyAddress** | **Guid** | | [optional] +**PhoneNumber** | **string** | | +**PhoneCountry** | **string** | | +**PhonePlan** | **Guid** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PhoneNumberProjection.md b/docs/PhoneNumberProjection.md new file mode 100644 index 00000000..94783abb --- /dev/null +++ b/docs/PhoneNumberProjection.md @@ -0,0 +1,15 @@ +# mailslurp.Model.PhoneNumberProjection +Phone number projection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**PhoneCountry** | **string** | | +**CreatedAt** | **DateTime** | | +**PhoneNumber** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/PhonePlanDto.md b/docs/PhonePlanDto.md new file mode 100644 index 00000000..44952838 --- /dev/null +++ b/docs/PhonePlanDto.md @@ -0,0 +1,13 @@ +# mailslurp.Model.PhonePlanDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**PhoneCountry** | **string** | | +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/RawEmailJson.md b/docs/RawEmailJson.md new file mode 100644 index 00000000..97d221be --- /dev/null +++ b/docs/RawEmailJson.md @@ -0,0 +1,11 @@ +# mailslurp.Model.RawEmailJson +Content in raw format + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/Recipient.md b/docs/Recipient.md new file mode 100644 index 00000000..3b1283c2 --- /dev/null +++ b/docs/Recipient.md @@ -0,0 +1,13 @@ +# mailslurp.Model.Recipient +Email recipient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RawValue** | **string** | | +**EmailAddress** | **string** | | +**Name** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ReplyToAliasEmailOptions.md b/docs/ReplyToAliasEmailOptions.md new file mode 100644 index 00000000..11e9da34 --- /dev/null +++ b/docs/ReplyToAliasEmailOptions.md @@ -0,0 +1,19 @@ +# mailslurp.Model.ReplyToAliasEmailOptions +Options for replying to an alias email using the alias inbox + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Body** | **string** | Body of the reply email you want to send | +**IsHTML** | **bool** | Is the reply HTML | +**Charset** | **string** | The charset that your message should be sent with. Optional. Default is UTF-8 | [optional] +**Attachments** | **List<string>** | List of uploaded attachments to send with the reply. Optional. | [optional] +**TemplateVariables** | **Dictionary<string, Object>** | Template variables if using a template | [optional] +**Template** | **Guid?** | Template ID to use instead of body. Will use template variable map to fill defined variable slots. | [optional] +**SendStrategy** | **string** | How an email should be sent based on its recipients | [optional] +**UseInboxName** | **bool?** | Optionally use inbox name as display name for sender email address | [optional] +**Html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ReplyToEmailOptions.md b/docs/ReplyToEmailOptions.md new file mode 100644 index 00000000..0421ad69 --- /dev/null +++ b/docs/ReplyToEmailOptions.md @@ -0,0 +1,21 @@ +# mailslurp.Model.ReplyToEmailOptions +Options for replying to email with API + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Body** | **string** | Body of the reply email you want to send | +**IsHTML** | **bool** | Is the reply HTML | +**From** | **string** | The from header that should be used. Optional | [optional] +**ReplyTo** | **string** | The replyTo header that should be used. Optional | [optional] +**Charset** | **string** | The charset that your message should be sent with. Optional. Default is UTF-8 | [optional] +**Attachments** | **List<string>** | List of uploaded attachments to send with the reply. Optional. | [optional] +**TemplateVariables** | **Dictionary<string, Object>** | Template variables if using a template | [optional] +**Template** | **Guid?** | Template ID to use instead of body. Will use template variable map to fill defined variable slots. | [optional] +**SendStrategy** | **string** | How an email should be sent based on its recipients | [optional] +**UseInboxName** | **bool?** | Optionally use inbox name as display name for sender email address | [optional] +**Html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ScheduledJob.md b/docs/ScheduledJob.md new file mode 100644 index 00000000..0f93f124 --- /dev/null +++ b/docs/ScheduledJob.md @@ -0,0 +1,19 @@ +# mailslurp.Model.ScheduledJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**InboxId** | **Guid** | | +**JobId** | **string** | | +**GroupId** | **string** | | +**TriggerId** | **string** | | +**Status** | **string** | | +**SendAtTimestamp** | **DateTime** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ScheduledJobDto.md b/docs/ScheduledJobDto.md new file mode 100644 index 00000000..4559323e --- /dev/null +++ b/docs/ScheduledJobDto.md @@ -0,0 +1,19 @@ +# mailslurp.Model.ScheduledJobDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**InboxId** | **Guid** | | +**JobId** | **string** | | +**GroupId** | **string** | | +**TriggerId** | **string** | | +**Status** | **string** | | +**SendAtTimestamp** | **DateTime** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SendEmailOptions.md b/docs/SendEmailOptions.md new file mode 100644 index 00000000..2c527694 --- /dev/null +++ b/docs/SendEmailOptions.md @@ -0,0 +1,30 @@ +# mailslurp.Model.SendEmailOptions +Options for the email to be sent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ToContacts** | **List<Guid?>** | Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. | [optional] +**ToGroup** | **Guid?** | Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients | [optional] +**To** | **List<string>** | List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing. | [optional] +**From** | **string** | Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox <my@address.com>`). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name <inbox@address.com>`. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used. | [optional] +**Cc** | **List<string>** | Optional list of cc destination email addresses | [optional] +**Bcc** | **List<string>** | Optional list of bcc destination email addresses | [optional] +**Subject** | **string** | Optional email subject line | [optional] +**ReplyTo** | **string** | Optional replyTo header | [optional] +**Body** | **string** | Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body. | [optional] +**Html** | **bool?** | Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.) | [optional] +**IsHTML** | **bool?** | Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients | [optional] +**Charset** | **string** | Optional charset | [optional] +**Attachments** | **List<string>** | Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. | [optional] +**TemplateVariables** | **Dictionary<string, Object>** | Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. | [optional] +**Template** | **Guid?** | Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. | [optional] +**SendStrategy** | **string** | How an email should be sent based on its recipients | [optional] +**UseInboxName** | **bool?** | Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name <inbox@address.com>` if the inbox has a name. | [optional] +**AddTrackingPixel** | **bool?** | Add tracking pixel to email | [optional] +**FilterBouncedRecipients** | **bool?** | Filter recipients to remove any bounced recipients from to, bcc, and cc before sending | [optional] +**ValidateEmailAddresses** | **string** | Validate recipient email addresses before sending | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SendSMTPEnvelopeOptions.md b/docs/SendSMTPEnvelopeOptions.md new file mode 100644 index 00000000..8be8ce90 --- /dev/null +++ b/docs/SendSMTPEnvelopeOptions.md @@ -0,0 +1,13 @@ +# mailslurp.Model.SendSMTPEnvelopeOptions +Options for the email envelope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RcptTo** | **List<string>** | | +**MailFrom** | **string** | | +**Data** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SendWithQueueResult.md b/docs/SendWithQueueResult.md new file mode 100644 index 00000000..6f5e2d82 --- /dev/null +++ b/docs/SendWithQueueResult.md @@ -0,0 +1,20 @@ +# mailslurp.Model.SendWithQueueResult +Collection of items + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**Subject** | **string** | | [optional] +**InboxId** | **Guid** | | [optional] +**HeaderId** | **string** | | +**Delivered** | **bool** | | +**ExceptionName** | **string** | | [optional] +**Message** | **string** | | [optional] +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/Sender.md b/docs/Sender.md new file mode 100644 index 00000000..3dd8a233 --- /dev/null +++ b/docs/Sender.md @@ -0,0 +1,13 @@ +# mailslurp.Model.Sender +Sender object containing from email address and from personal name if provided in address + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RawValue** | **string** | | +**EmailAddress** | **string** | | +**Name** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SentEmailDto.md b/docs/SentEmailDto.md new file mode 100644 index 00000000..1b59d688 --- /dev/null +++ b/docs/SentEmailDto.md @@ -0,0 +1,35 @@ +# mailslurp.Model.SentEmailDto +Sent email details + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of sent email | +**UserId** | **Guid** | User ID | +**InboxId** | **Guid** | Inbox ID email was sent from | +**DomainId** | **Guid?** | Domain ID | [optional] +**To** | **List<string>** | Recipients email was sent to | [optional] +**From** | **string** | Sent from address | [optional] +**ReplyTo** | **string** | | [optional] +**Cc** | **List<string>** | | [optional] +**Bcc** | **List<string>** | | [optional] +**Attachments** | **List<string>** | Array of IDs of attachments that were sent with this email | [optional] +**Subject** | **string** | | [optional] +**BodyMD5Hash** | **string** | MD5 Hash | [optional] +**Body** | **string** | Sent email body | [optional] +**ToContacts** | **List<Guid?>** | | [optional] +**ToGroup** | **Guid?** | | [optional] +**Charset** | **string** | | [optional] +**IsHTML** | **bool?** | | [optional] +**SentAt** | **DateTime** | | +**PixelIds** | **List<Guid?>** | | [optional] +**MessageId** | **string** | | [optional] +**MessageIds** | **List<string>** | | [optional] +**VirtualSend** | **bool?** | | [optional] +**TemplateId** | **Guid?** | | [optional] +**TemplateVariables** | **Dictionary<string, Object>** | | [optional] +**Html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SentEmailProjection.md b/docs/SentEmailProjection.md new file mode 100644 index 00000000..563524ad --- /dev/null +++ b/docs/SentEmailProjection.md @@ -0,0 +1,22 @@ +# mailslurp.Model.SentEmailProjection +Collection of items + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**From** | **string** | | [optional] +**UserId** | **Guid** | | +**Subject** | **string** | | [optional] +**InboxId** | **Guid** | | +**Attachments** | **List<string>** | | +**CreatedAt** | **DateTime** | | +**To** | **List<string>** | | +**Bcc** | **List<string>** | | +**Cc** | **List<string>** | | +**BodyMD5Hash** | **string** | | [optional] +**VirtualSend** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SentEmailsControllerApi.md b/docs/SentEmailsControllerApi.md new file mode 100644 index 00000000..df4460d3 --- /dev/null +++ b/docs/SentEmailsControllerApi.md @@ -0,0 +1,1602 @@ +# mailslurp.Api.SentEmailsControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**DeleteAllSentEmails**](SentEmailsControllerApi#deleteallsentemails) | **DELETE** /sent | Delete all sent email receipts | +| [**DeleteSentEmail**](SentEmailsControllerApi#deletesentemail) | **DELETE** /sent/{id} | Delete sent email receipt | +| [**GetAllSentTrackingPixels**](SentEmailsControllerApi#getallsenttrackingpixels) | **GET** /sent/tracking-pixels | | +| [**GetRawSentEmailContents**](SentEmailsControllerApi#getrawsentemailcontents) | **GET** /sent/{emailId}/raw | Get raw sent email string. Returns unparsed raw SMTP message with headers and body. | +| [**GetRawSentEmailJson**](SentEmailsControllerApi#getrawsentemailjson) | **GET** /sent/{emailId}/raw/json | Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. | +| [**GetSentDeliveryStatus**](SentEmailsControllerApi#getsentdeliverystatus) | **GET** /sent/delivery-status/{deliveryId} | | +| [**GetSentDeliveryStatuses**](SentEmailsControllerApi#getsentdeliverystatuses) | **GET** /sent/delivery-status | | +| [**GetSentDeliveryStatusesBySentId**](SentEmailsControllerApi#getsentdeliverystatusesbysentid) | **GET** /sent/{sentId}/delivery-status | | +| [**GetSentEmail**](SentEmailsControllerApi#getsentemail) | **GET** /sent/{id} | Get sent email receipt | +| [**GetSentEmailHTMLContent**](SentEmailsControllerApi#getsentemailhtmlcontent) | **GET** /sent/{id}/html | Get sent email HTML content | +| [**GetSentEmailPreviewURLs**](SentEmailsControllerApi#getsentemailpreviewurls) | **GET** /sent/{id}/urls | Get sent email URL for viewing in browser or downloading | +| [**GetSentEmailTrackingPixels**](SentEmailsControllerApi#getsentemailtrackingpixels) | **GET** /sent/{id}/tracking-pixels | | +| [**GetSentEmails**](SentEmailsControllerApi#getsentemails) | **GET** /sent | Get all sent emails in paginated form | +| [**GetSentEmailsWithQueueResults**](SentEmailsControllerApi#getsentemailswithqueueresults) | **GET** /sent/queue-results | Get results of email sent with queues in paginated form | +| [**GetSentOrganizationEmails**](SentEmailsControllerApi#getsentorganizationemails) | **GET** /sent/organization | | +| [**WaitForDeliveryStatuses**](SentEmailsControllerApi#waitfordeliverystatuses) | **GET** /sent/delivery-status/wait-for | | + + +# **DeleteAllSentEmails** +> void DeleteAllSentEmails () + +Delete all sent email receipts + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAllSentEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + + try + { + // Delete all sent email receipts + apiInstance.DeleteAllSentEmails(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.DeleteAllSentEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAllSentEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all sent email receipts + apiInstance.DeleteAllSentEmailsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.DeleteAllSentEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteSentEmail** +> void DeleteSentEmail (Guid id) + +Delete sent email receipt + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteSentEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Delete sent email receipt + apiInstance.DeleteSentEmail(id); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.DeleteSentEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteSentEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete sent email receipt + apiInstance.DeleteSentEmailWithHttpInfo(id); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.DeleteSentEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllSentTrackingPixels** +> PageTrackingPixelProjection GetAllSentTrackingPixels (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + + + +Get all sent email tracking pixels in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllSentTrackingPixelsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var page = 0; // int? | Optional page index in sent email tracking pixel list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in sent email tracking pixel list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PageTrackingPixelProjection result = apiInstance.GetAllSentTrackingPixels(page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetAllSentTrackingPixels: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllSentTrackingPixelsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetAllSentTrackingPixelsWithHttpInfo(page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetAllSentTrackingPixelsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in sent email tracking pixel list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in sent email tracking pixel list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetRawSentEmailContents** +> string GetRawSentEmailContents (Guid emailId) + +Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + +Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetRawSentEmailContentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + string result = apiInstance.GetRawSentEmailContents(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailContents: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetRawSentEmailContentsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + ApiResponse response = apiInstance.GetRawSentEmailContentsWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailContentsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetRawSentEmailJson** +> RawEmailJson GetRawSentEmailJson (Guid emailId) + +Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + +Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetRawSentEmailJsonExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var emailId = "emailId_example"; // Guid | ID of email + + try + { + // Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + RawEmailJson result = apiInstance.GetRawSentEmailJson(emailId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailJson: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetRawSentEmailJsonWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + ApiResponse response = apiInstance.GetRawSentEmailJsonWithHttpInfo(emailId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetRawSentEmailJsonWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **emailId** | **Guid** | ID of email | | + +### Return type + +[**RawEmailJson**](RawEmailJson) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentDeliveryStatus** +> DeliveryStatusDto GetSentDeliveryStatus (Guid deliveryId) + + + +Get a sent email delivery status + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentDeliveryStatusExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var deliveryId = "deliveryId_example"; // Guid | + + try + { + DeliveryStatusDto result = apiInstance.GetSentDeliveryStatus(deliveryId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatus: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentDeliveryStatusWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetSentDeliveryStatusWithHttpInfo(deliveryId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **deliveryId** | **Guid** | | | + +### Return type + +[**DeliveryStatusDto**](DeliveryStatusDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentDeliveryStatuses** +> PageDeliveryStatus GetSentDeliveryStatuses (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + + + +Get all sent email delivery statuses + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentDeliveryStatusesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var page = 0; // int? | Optional page index in delivery status list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in delivery status list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PageDeliveryStatus result = apiInstance.GetSentDeliveryStatuses(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatuses: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentDeliveryStatusesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetSentDeliveryStatusesWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in delivery status list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in delivery status list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageDeliveryStatus**](PageDeliveryStatus) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentDeliveryStatusesBySentId** +> PageDeliveryStatus GetSentDeliveryStatusesBySentId (Guid sentId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + + + +Get all sent email delivery statuses + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentDeliveryStatusesBySentIdExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var sentId = "sentId_example"; // Guid | + var page = 0; // int? | Optional page index in delivery status list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in delivery status list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PageDeliveryStatus result = apiInstance.GetSentDeliveryStatusesBySentId(sentId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusesBySentId: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentDeliveryStatusesBySentIdWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetSentDeliveryStatusesBySentIdWithHttpInfo(sentId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentDeliveryStatusesBySentIdWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **sentId** | **Guid** | | | +| **page** | **int?** | Optional page index in delivery status list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in delivery status list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageDeliveryStatus**](PageDeliveryStatus) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentEmail** +> SentEmailDto GetSentEmail (Guid id) + +Get sent email receipt + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Get sent email receipt + SentEmailDto result = apiInstance.GetSentEmail(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get sent email receipt + ApiResponse response = apiInstance.GetSentEmailWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentEmailHTMLContent** +> string GetSentEmailHTMLContent (Guid id) + +Get sent email HTML content + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentEmailHTMLContentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Get sent email HTML content + string result = apiInstance.GetSentEmailHTMLContent(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailHTMLContent: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentEmailHTMLContentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get sent email HTML content + ApiResponse response = apiInstance.GetSentEmailHTMLContentWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailHTMLContentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentEmailPreviewURLs** +> EmailPreviewUrls GetSentEmailPreviewURLs (Guid id) + +Get sent email URL for viewing in browser or downloading + +Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentEmailPreviewURLsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Get sent email URL for viewing in browser or downloading + EmailPreviewUrls result = apiInstance.GetSentEmailPreviewURLs(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailPreviewURLs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentEmailPreviewURLsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get sent email URL for viewing in browser or downloading + ApiResponse response = apiInstance.GetSentEmailPreviewURLsWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailPreviewURLsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +[**EmailPreviewUrls**](EmailPreviewUrls) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentEmailTrackingPixels** +> PageTrackingPixelProjection GetSentEmailTrackingPixels (Guid id, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + + + +Get all tracking pixels for a sent email in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentEmailTrackingPixelsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var id = "id_example"; // Guid | + var page = 0; // int? | Optional page index in sent email tracking pixel list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in sent email tracking pixel list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PageTrackingPixelProjection result = apiInstance.GetSentEmailTrackingPixels(id, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailTrackingPixels: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentEmailTrackingPixelsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetSentEmailTrackingPixelsWithHttpInfo(id, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailTrackingPixelsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | +| **page** | **int?** | Optional page index in sent email tracking pixel list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in sent email tracking pixel list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentEmails** +> PageSentEmailProjection GetSentEmails (Guid? inboxId = null, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +Get all sent emails in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Optional inboxId to filter sender of sent emails by (optional) + var page = 0; // int? | Optional page index in inbox sent email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get all sent emails in paginated form + PageSentEmailProjection result = apiInstance.GetSentEmails(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all sent emails in paginated form + ApiResponse response = apiInstance.GetSentEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Optional inboxId to filter sender of sent emails by | [optional] | +| **page** | **int?** | Optional page index in inbox sent email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox sent email list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageSentEmailProjection**](PageSentEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentEmailsWithQueueResults** +> PageSentEmailWithQueueProjection GetSentEmailsWithQueueResults (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get results of email sent with queues in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentEmailsWithQueueResultsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var page = 0; // int? | Optional page index in inbox sent email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get results of email sent with queues in paginated form + PageSentEmailWithQueueProjection result = apiInstance.GetSentEmailsWithQueueResults(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailsWithQueueResults: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentEmailsWithQueueResultsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get results of email sent with queues in paginated form + ApiResponse response = apiInstance.GetSentEmailsWithQueueResultsWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentEmailsWithQueueResultsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in inbox sent email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in inbox sent email list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageSentEmailWithQueueProjection**](PageSentEmailWithQueueProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSentOrganizationEmails** +> PageSentEmailProjection GetSentOrganizationEmails (Guid? inboxId = null, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + + + +Get all sent organization emails in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSentOrganizationEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Optional inboxId to filter sender of sent emails by (optional) + var page = 0; // int? | Optional page index in sent email list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in sent email list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + PageSentEmailProjection result = apiInstance.GetSentOrganizationEmails(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentOrganizationEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSentOrganizationEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetSentOrganizationEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.GetSentOrganizationEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Optional inboxId to filter sender of sent emails by | [optional] | +| **page** | **int?** | Optional page index in sent email list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in sent email list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageSentEmailProjection**](PageSentEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForDeliveryStatuses** +> DeliveryStatusDto WaitForDeliveryStatuses (Guid? sentId = null, Guid? inboxId = null, long? timeout = null, int? index = null, DateTime? since = null, DateTime? before = null) + + + +Wait for delivery statuses + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForDeliveryStatusesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SentEmailsControllerApi(config); + var sentId = "sentId_example"; // Guid? | Optional sent email ID filter (optional) + var inboxId = "inboxId_example"; // Guid? | Optional inbox ID filter (optional) + var timeout = 789L; // long? | Optional timeout milliseconds (optional) + var index = 56; // int? | Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + DeliveryStatusDto result = apiInstance.WaitForDeliveryStatuses(sentId, inboxId, timeout, index, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SentEmailsControllerApi.WaitForDeliveryStatuses: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForDeliveryStatusesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.WaitForDeliveryStatusesWithHttpInfo(sentId, inboxId, timeout, index, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SentEmailsControllerApi.WaitForDeliveryStatusesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **sentId** | **Guid?** | Optional sent email ID filter | [optional] | +| **inboxId** | **Guid?** | Optional inbox ID filter | [optional] | +| **timeout** | **long?** | Optional timeout milliseconds | [optional] | +| **index** | **int?** | Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**DeliveryStatusDto**](DeliveryStatusDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/SetInboxFavouritedOptions.md b/docs/SetInboxFavouritedOptions.md new file mode 100644 index 00000000..ce58351a --- /dev/null +++ b/docs/SetInboxFavouritedOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.SetInboxFavouritedOptions +Options for setting inbox favourite state + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **bool** | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SimpleSendEmailOptions.md b/docs/SimpleSendEmailOptions.md new file mode 100644 index 00000000..59625adf --- /dev/null +++ b/docs/SimpleSendEmailOptions.md @@ -0,0 +1,14 @@ +# mailslurp.Model.SimpleSendEmailOptions +Simplified send email options + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SenderId** | **Guid?** | ID of inbox to send from. If null an inbox will be created for sending | [optional] +**To** | **string** | Email address to send to | +**Body** | **string** | Body of the email message. Supports HTML | [optional] +**Subject** | **string** | Subject line of the email | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SmsControllerApi.md b/docs/SmsControllerApi.md new file mode 100644 index 00000000..ad04bcad --- /dev/null +++ b/docs/SmsControllerApi.md @@ -0,0 +1,399 @@ +# mailslurp.Api.SmsControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**DeleteSmsMessage**](SmsControllerApi#deletesmsmessage) | **DELETE** /sms/{smsId} | Delete SMS message. | +| [**DeleteSmsMessages**](SmsControllerApi#deletesmsmessages) | **DELETE** /sms | Delete all SMS messages | +| [**GetSmsMessage**](SmsControllerApi#getsmsmessage) | **GET** /sms/{smsId} | Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. | +| [**GetSmsMessagesPaginated**](SmsControllerApi#getsmsmessagespaginated) | **GET** /sms | Get all SMS messages in all phone numbers in paginated form. . | + + +# **DeleteSmsMessage** +> void DeleteSmsMessage (Guid smsId) + +Delete SMS message. + +Delete an SMS message + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteSmsMessageExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SmsControllerApi(config); + var smsId = "smsId_example"; // Guid | + + try + { + // Delete SMS message. + apiInstance.DeleteSmsMessage(smsId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SmsControllerApi.DeleteSmsMessage: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteSmsMessageWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete SMS message. + apiInstance.DeleteSmsMessageWithHttpInfo(smsId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SmsControllerApi.DeleteSmsMessageWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **smsId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteSmsMessages** +> void DeleteSmsMessages (Guid? phoneNumberId = null) + +Delete all SMS messages + +Delete all SMS messages or all messages for a given phone number + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteSmsMessagesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SmsControllerApi(config); + var phoneNumberId = "phoneNumberId_example"; // Guid? | (optional) + + try + { + // Delete all SMS messages + apiInstance.DeleteSmsMessages(phoneNumberId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SmsControllerApi.DeleteSmsMessages: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteSmsMessagesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all SMS messages + apiInstance.DeleteSmsMessagesWithHttpInfo(phoneNumberId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SmsControllerApi.DeleteSmsMessagesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneNumberId** | **Guid?** | | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSmsMessage** +> SmsDto GetSmsMessage (Guid smsId) + +Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + +Returns a SMS summary object with content. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSmsMessageExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SmsControllerApi(config); + var smsId = "smsId_example"; // Guid | + + try + { + // Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + SmsDto result = apiInstance.GetSmsMessage(smsId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SmsControllerApi.GetSmsMessage: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSmsMessageWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + ApiResponse response = apiInstance.GetSmsMessageWithHttpInfo(smsId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SmsControllerApi.GetSmsMessageWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **smsId** | **Guid** | | | + +### Return type + +[**SmsDto**](SmsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetSmsMessagesPaginated** +> PageSmsProjection GetSmsMessagesPaginated (Guid? phoneNumber = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null) + +Get all SMS messages in all phone numbers in paginated form. . + +By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetSmsMessagesPaginatedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new SmsControllerApi(config); + var phoneNumber = "phoneNumber_example"; // Guid? | Optional receiving phone number to filter SMS messages for (optional) + var page = 0; // int? | Optional page index in SMS list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var unreadOnly = false; // bool? | Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional) (default to false) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter SMSs received after given date time (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Optional filter SMSs received before given date time (optional) + + try + { + // Get all SMS messages in all phone numbers in paginated form. . + PageSmsProjection result = apiInstance.GetSmsMessagesPaginated(phoneNumber, page, size, sort, unreadOnly, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SmsControllerApi.GetSmsMessagesPaginated: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSmsMessagesPaginatedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all SMS messages in all phone numbers in paginated form. . + ApiResponse response = apiInstance.GetSmsMessagesPaginatedWithHttpInfo(phoneNumber, page, size, sort, unreadOnly, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SmsControllerApi.GetSmsMessagesPaginatedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneNumber** | **Guid?** | Optional receiving phone number to filter SMS messages for | [optional] | +| **page** | **int?** | Optional page index in SMS list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **unreadOnly** | **bool?** | Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to false] | +| **since** | **DateTime?** | Optional filter SMSs received after given date time | [optional] | +| **before** | **DateTime?** | Optional filter SMSs received before given date time | [optional] | + +### Return type + +[**PageSmsProjection**](PageSmsProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/SmsDto.md b/docs/SmsDto.md new file mode 100644 index 00000000..8e2d6bcb --- /dev/null +++ b/docs/SmsDto.md @@ -0,0 +1,17 @@ +# mailslurp.Model.SmsDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**PhoneNumber** | **Guid** | | +**FromNumber** | **string** | | +**Body** | **string** | | +**Read** | **bool** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SmsMatchOption.md b/docs/SmsMatchOption.md new file mode 100644 index 00000000..7b36ac5f --- /dev/null +++ b/docs/SmsMatchOption.md @@ -0,0 +1,13 @@ +# mailslurp.Model.SmsMatchOption +Options for matching SMS messages in a phone number. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `BODY` should `CONTAIN` value. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | Fields of an SMS object that can be used to filter results | +**Should** | **string** | How the value of the email field specified should be compared to the value given in the match options. | +**Value** | **string** | The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SmsPreview.md b/docs/SmsPreview.md new file mode 100644 index 00000000..a6391ef6 --- /dev/null +++ b/docs/SmsPreview.md @@ -0,0 +1,15 @@ +# mailslurp.Model.SmsPreview + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**UserId** | **Guid** | | +**Body** | **string** | | +**PhoneNumber** | **Guid** | | +**FromNumber** | **string** | | +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/SmsProjection.md b/docs/SmsProjection.md new file mode 100644 index 00000000..29b78eb6 --- /dev/null +++ b/docs/SmsProjection.md @@ -0,0 +1,17 @@ +# mailslurp.Model.SmsProjection +SMS projection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**Body** | **string** | | +**UserId** | **Guid** | | +**CreatedAt** | **DateTime** | | +**PhoneNumber** | **Guid** | | +**FromNumber** | **string** | | +**Read** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/Sort.md b/docs/Sort.md new file mode 100644 index 00000000..c6b19626 --- /dev/null +++ b/docs/Sort.md @@ -0,0 +1,12 @@ +# mailslurp.Model.Sort + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Empty** | **bool** | | [optional] +**Sorted** | **bool** | | [optional] +**Unsorted** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TemplateControllerApi.md b/docs/TemplateControllerApi.md new file mode 100644 index 00000000..b1540c36 --- /dev/null +++ b/docs/TemplateControllerApi.md @@ -0,0 +1,784 @@ +# mailslurp.Api.TemplateControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateTemplate**](TemplateControllerApi#createtemplate) | **POST** /templates | Create a Template | +| [**DeleteTemplate**](TemplateControllerApi#deletetemplate) | **DELETE** /templates/{templateId} | Delete email template | +| [**GetAllTemplates**](TemplateControllerApi#getalltemplates) | **GET** /templates/paginated | List templates | +| [**GetTemplate**](TemplateControllerApi#gettemplate) | **GET** /templates/{templateId} | Get template | +| [**GetTemplatePreviewHtml**](TemplateControllerApi#gettemplatepreviewhtml) | **GET** /templates/{templateId}/preview/html | Get template preview HTML | +| [**GetTemplatePreviewJson**](TemplateControllerApi#gettemplatepreviewjson) | **GET** /templates/{templateId}/preview/json | Get template preview Json | +| [**GetTemplates**](TemplateControllerApi#gettemplates) | **GET** /templates | List templates | +| [**UpdateTemplate**](TemplateControllerApi#updatetemplate) | **PUT** /templates/{templateId} | Update template | + + +# **CreateTemplate** +> TemplateDto CreateTemplate (CreateTemplateOptions createTemplateOptions) + +Create a Template + +Create an email template with variables for use with templated transactional emails. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateTemplateExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + var createTemplateOptions = new CreateTemplateOptions(); // CreateTemplateOptions | + + try + { + // Create a Template + TemplateDto result = apiInstance.CreateTemplate(createTemplateOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.CreateTemplate: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create a Template + ApiResponse response = apiInstance.CreateTemplateWithHttpInfo(createTemplateOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.CreateTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createTemplateOptions** | [**CreateTemplateOptions**](CreateTemplateOptions) | | | + +### Return type + +[**TemplateDto**](TemplateDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteTemplate** +> void DeleteTemplate (Guid templateId) + +Delete email template + +Delete template + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteTemplateExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + var templateId = "templateId_example"; // Guid | Template ID + + try + { + // Delete email template + apiInstance.DeleteTemplate(templateId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.DeleteTemplate: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete email template + apiInstance.DeleteTemplateWithHttpInfo(templateId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.DeleteTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **templateId** | **Guid** | Template ID | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllTemplates** +> PageTemplateProjection GetAllTemplates (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +List templates + +Get all templates in paginated format + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllTemplatesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // List templates + PageTemplateProjection result = apiInstance.GetAllTemplates(page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.GetAllTemplates: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllTemplatesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List templates + ApiResponse response = apiInstance.GetAllTemplatesWithHttpInfo(page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.GetAllTemplatesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageTemplateProjection**](PageTemplateProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTemplate** +> TemplateDto GetTemplate (Guid templateId) + +Get template + +Get email template + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTemplateExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + var templateId = "templateId_example"; // Guid | Template ID + + try + { + // Get template + TemplateDto result = apiInstance.GetTemplate(templateId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.GetTemplate: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get template + ApiResponse response = apiInstance.GetTemplateWithHttpInfo(templateId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.GetTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **templateId** | **Guid** | Template ID | | + +### Return type + +[**TemplateDto**](TemplateDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTemplatePreviewHtml** +> string GetTemplatePreviewHtml (Guid templateId) + +Get template preview HTML + +Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTemplatePreviewHtmlExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + var templateId = "templateId_example"; // Guid | Template ID + + try + { + // Get template preview HTML + string result = apiInstance.GetTemplatePreviewHtml(templateId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.GetTemplatePreviewHtml: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTemplatePreviewHtmlWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get template preview HTML + ApiResponse response = apiInstance.GetTemplatePreviewHtmlWithHttpInfo(templateId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.GetTemplatePreviewHtmlWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **templateId** | **Guid** | Template ID | | + +### Return type + +**string** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html;charset=utf-8, text/html + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTemplatePreviewJson** +> TemplatePreview GetTemplatePreviewJson (Guid templateId) + +Get template preview Json + +Get email template preview with passed template variables in JSON format. Pass template variables as query params. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTemplatePreviewJsonExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + var templateId = "templateId_example"; // Guid | Template ID + + try + { + // Get template preview Json + TemplatePreview result = apiInstance.GetTemplatePreviewJson(templateId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.GetTemplatePreviewJson: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTemplatePreviewJsonWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get template preview Json + ApiResponse response = apiInstance.GetTemplatePreviewJsonWithHttpInfo(templateId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.GetTemplatePreviewJsonWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **templateId** | **Guid** | Template ID | | + +### Return type + +[**TemplatePreview**](TemplatePreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTemplates** +> List<TemplateProjection> GetTemplates () + +List templates + +Get all templates + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTemplatesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + + try + { + // List templates + List result = apiInstance.GetTemplates(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.GetTemplates: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTemplatesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List templates + ApiResponse> response = apiInstance.GetTemplatesWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.GetTemplatesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**List<TemplateProjection>**](TemplateProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UpdateTemplate** +> TemplateDto UpdateTemplate (Guid templateId, CreateTemplateOptions createTemplateOptions) + +Update template + +Update email template + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UpdateTemplateExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TemplateControllerApi(config); + var templateId = "templateId_example"; // Guid | Template ID + var createTemplateOptions = new CreateTemplateOptions(); // CreateTemplateOptions | + + try + { + // Update template + TemplateDto result = apiInstance.UpdateTemplate(templateId, createTemplateOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TemplateControllerApi.UpdateTemplate: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update template + ApiResponse response = apiInstance.UpdateTemplateWithHttpInfo(templateId, createTemplateOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TemplateControllerApi.UpdateTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **templateId** | **Guid** | Template ID | | +| **createTemplateOptions** | [**CreateTemplateOptions**](CreateTemplateOptions) | | | + +### Return type + +[**TemplateDto**](TemplateDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/TemplateDto.md b/docs/TemplateDto.md new file mode 100644 index 00000000..1631496c --- /dev/null +++ b/docs/TemplateDto.md @@ -0,0 +1,15 @@ +# mailslurp.Model.TemplateDto +Email template + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of template | +**Name** | **string** | Template name | +**Variables** | [**List<TemplateVariable>**](TemplateVariable) | Variables available in template that can be replaced with values | +**Content** | **string** | Content of the template | +**CreatedAt** | **DateTime** | Created at time | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TemplatePreview.md b/docs/TemplatePreview.md new file mode 100644 index 00000000..15f317bd --- /dev/null +++ b/docs/TemplatePreview.md @@ -0,0 +1,10 @@ +# mailslurp.Model.TemplatePreview + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Preview** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TemplateProjection.md b/docs/TemplateProjection.md new file mode 100644 index 00000000..43aebcd9 --- /dev/null +++ b/docs/TemplateProjection.md @@ -0,0 +1,15 @@ +# mailslurp.Model.TemplateProjection +Email template data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Id** | **Guid** | | +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**Variables** | **List<string>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TemplateVariable.md b/docs/TemplateVariable.md new file mode 100644 index 00000000..0b725159 --- /dev/null +++ b/docs/TemplateVariable.md @@ -0,0 +1,12 @@ +# mailslurp.Model.TemplateVariable +Variable for use with email template + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of variable. This can be used in a template as {{name}} | +**VariableType** | **string** | The type of variable | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TestNewInboxForwarderOptions.md b/docs/TestNewInboxForwarderOptions.md new file mode 100644 index 00000000..ed279bb3 --- /dev/null +++ b/docs/TestNewInboxForwarderOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.TestNewInboxForwarderOptions +Options for testing new inbox forwarder rules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxForwarderTestOptions** | [**InboxForwarderTestOptions**](InboxForwarderTestOptions) | | +**CreateInboxForwarderOptions** | [**CreateInboxForwarderOptions**](CreateInboxForwarderOptions) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TestNewInboxRulesetOptions.md b/docs/TestNewInboxRulesetOptions.md new file mode 100644 index 00000000..0a818525 --- /dev/null +++ b/docs/TestNewInboxRulesetOptions.md @@ -0,0 +1,12 @@ +# mailslurp.Model.TestNewInboxRulesetOptions +Test inbox ruleset options + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxRulesetTestOptions** | [**InboxRulesetTestOptions**](InboxRulesetTestOptions) | | +**CreateInboxRulesetOptions** | [**CreateInboxRulesetOptions**](CreateInboxRulesetOptions) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TestPhoneNumberOptions.md b/docs/TestPhoneNumberOptions.md new file mode 100644 index 00000000..26ff5976 --- /dev/null +++ b/docs/TestPhoneNumberOptions.md @@ -0,0 +1,10 @@ +# mailslurp.Model.TestPhoneNumberOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ThreadProjection.md b/docs/ThreadProjection.md new file mode 100644 index 00000000..d3cf9001 --- /dev/null +++ b/docs/ThreadProjection.md @@ -0,0 +1,21 @@ +# mailslurp.Model.ThreadProjection +A thread is a message thread created for a message received by an alias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of thread | [optional] +**Id** | **Guid** | ID of email thread | +**Subject** | **string** | Thread subject | [optional] +**UserId** | **Guid** | User ID | +**InboxId** | **Guid** | Inbox ID | +**CreatedAt** | **DateTime** | Created at DateTime | +**UpdatedAt** | **DateTime** | Updated at DateTime | +**To** | **List<string>** | To recipients | +**Bcc** | **List<string>** | BCC recipients | [optional] +**Cc** | **List<string>** | CC recipients | [optional] +**AliasId** | **Guid** | Alias ID | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TrackingControllerApi.md b/docs/TrackingControllerApi.md new file mode 100644 index 00000000..b2521071 --- /dev/null +++ b/docs/TrackingControllerApi.md @@ -0,0 +1,306 @@ +# mailslurp.Api.TrackingControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateTrackingPixel**](TrackingControllerApi#createtrackingpixel) | **POST** /tracking/pixels | Create tracking pixel | +| [**GetAllTrackingPixels**](TrackingControllerApi#getalltrackingpixels) | **GET** /tracking/pixels | Get tracking pixels | +| [**GetTrackingPixel**](TrackingControllerApi#gettrackingpixel) | **GET** /tracking/pixels/{id} | Get pixel | + + +# **CreateTrackingPixel** +> TrackingPixelDto CreateTrackingPixel (CreateTrackingPixelOptions createTrackingPixelOptions) + +Create tracking pixel + +Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateTrackingPixelExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TrackingControllerApi(config); + var createTrackingPixelOptions = new CreateTrackingPixelOptions(); // CreateTrackingPixelOptions | + + try + { + // Create tracking pixel + TrackingPixelDto result = apiInstance.CreateTrackingPixel(createTrackingPixelOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TrackingControllerApi.CreateTrackingPixel: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateTrackingPixelWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create tracking pixel + ApiResponse response = apiInstance.CreateTrackingPixelWithHttpInfo(createTrackingPixelOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TrackingControllerApi.CreateTrackingPixelWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createTrackingPixelOptions** | [**CreateTrackingPixelOptions**](CreateTrackingPixelOptions) | | | + +### Return type + +[**TrackingPixelDto**](TrackingPixelDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllTrackingPixels** +> PageTrackingPixelProjection GetAllTrackingPixels (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +Get tracking pixels + +List tracking pixels in paginated form + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllTrackingPixelsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TrackingControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get tracking pixels + PageTrackingPixelProjection result = apiInstance.GetAllTrackingPixels(page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TrackingControllerApi.GetAllTrackingPixels: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllTrackingPixelsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get tracking pixels + ApiResponse response = apiInstance.GetAllTrackingPixelsWithHttpInfo(page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TrackingControllerApi.GetAllTrackingPixelsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTrackingPixel** +> TrackingPixelDto GetTrackingPixel (Guid id) + +Get pixel + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTrackingPixelExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new TrackingControllerApi(config); + var id = "id_example"; // Guid | + + try + { + // Get pixel + TrackingPixelDto result = apiInstance.GetTrackingPixel(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TrackingControllerApi.GetTrackingPixel: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTrackingPixelWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get pixel + ApiResponse response = apiInstance.GetTrackingPixelWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TrackingControllerApi.GetTrackingPixelWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **Guid** | | | + +### Return type + +[**TrackingPixelDto**](TrackingPixelDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/TrackingPixelDto.md b/docs/TrackingPixelDto.md new file mode 100644 index 00000000..f6d13585 --- /dev/null +++ b/docs/TrackingPixelDto.md @@ -0,0 +1,19 @@ +# mailslurp.Model.TrackingPixelDto +Tracking pixel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**Seen** | **bool** | | +**Recipient** | **string** | | [optional] +**Html** | **string** | | +**Url** | **string** | | +**InboxId** | **Guid?** | | [optional] +**SentEmailId** | **Guid?** | | [optional] +**SeenAt** | **DateTime?** | | [optional] +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/TrackingPixelProjection.md b/docs/TrackingPixelProjection.md new file mode 100644 index 00000000..0a90d95d --- /dev/null +++ b/docs/TrackingPixelProjection.md @@ -0,0 +1,19 @@ +# mailslurp.Model.TrackingPixelProjection +Tracking pixel data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**Id** | **Guid** | | +**UserId** | **Guid** | | +**InboxId** | **Guid** | | [optional] +**SentEmailId** | **Guid** | | [optional] +**CreatedAt** | **DateTime** | | +**Recipient** | **string** | | [optional] +**Seen** | **bool** | | +**SeenAt** | **DateTime** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UnknownMissedEmailProjection.md b/docs/UnknownMissedEmailProjection.md new file mode 100644 index 00000000..e12ddf6c --- /dev/null +++ b/docs/UnknownMissedEmailProjection.md @@ -0,0 +1,15 @@ +# mailslurp.Model.UnknownMissedEmailProjection +Unknown missed email projection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**From** | **string** | | [optional] +**Subject** | **string** | | [optional] +**CreatedAt** | **DateTime** | | +**To** | **List<string>** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UnreadCount.md b/docs/UnreadCount.md new file mode 100644 index 00000000..73324dee --- /dev/null +++ b/docs/UnreadCount.md @@ -0,0 +1,11 @@ +# mailslurp.Model.UnreadCount +Number of unread emails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **long** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UnseenErrorCountDto.md b/docs/UnseenErrorCountDto.md new file mode 100644 index 00000000..829ac25e --- /dev/null +++ b/docs/UnseenErrorCountDto.md @@ -0,0 +1,11 @@ +# mailslurp.Model.UnseenErrorCountDto +Number of unseen errors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **long** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UpdateAliasOptions.md b/docs/UpdateAliasOptions.md new file mode 100644 index 00000000..37e6145f --- /dev/null +++ b/docs/UpdateAliasOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.UpdateAliasOptions +Update an email alias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Optional name for alias | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UpdateDomainOptions.md b/docs/UpdateDomainOptions.md new file mode 100644 index 00000000..76502dc1 --- /dev/null +++ b/docs/UpdateDomainOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.UpdateDomainOptions +Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not functionally currently until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CatchAllInboxId** | **Guid?** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UpdateGroupContacts.md b/docs/UpdateGroupContacts.md new file mode 100644 index 00000000..b4cfee3d --- /dev/null +++ b/docs/UpdateGroupContacts.md @@ -0,0 +1,11 @@ +# mailslurp.Model.UpdateGroupContacts +Update group contacts options. Pass a list of contact ids to replace existing group contacts. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContactIds** | **List<Guid>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UpdateInboxOptions.md b/docs/UpdateInboxOptions.md new file mode 100644 index 00000000..43a51c88 --- /dev/null +++ b/docs/UpdateInboxOptions.md @@ -0,0 +1,15 @@ +# mailslurp.Model.UpdateInboxOptions +Options for updating inbox properties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**Description** | **string** | Description of an inbox for labelling and searching purposes | [optional] +**Tags** | **List<string>** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**ExpiresAt** | **DateTime?** | Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. | [optional] +**Favourite** | **bool?** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UploadAttachmentBytesRequest.md b/docs/UploadAttachmentBytesRequest.md new file mode 100644 index 00000000..4afba77d --- /dev/null +++ b/docs/UploadAttachmentBytesRequest.md @@ -0,0 +1,18 @@ +# mailslurp.Model.UploadAttachmentBytesRequest +Byte array request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Short** | **int** | | [optional] +**Char** | **string** | | [optional] +**Int** | **int** | | [optional] +**Long** | **long** | | [optional] +**Float** | **float** | | [optional] +**Double** | **double** | | [optional] +**Direct** | **bool** | | [optional] +**ReadOnly** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UploadAttachmentOptions.md b/docs/UploadAttachmentOptions.md new file mode 100644 index 00000000..101a3c46 --- /dev/null +++ b/docs/UploadAttachmentOptions.md @@ -0,0 +1,13 @@ +# mailslurp.Model.UploadAttachmentOptions +Options for uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your `SendEmailOptions` when sending an email. This way you can use attachments multiple times once they have been uploaded. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContentType** | **string** | Optional contentType for file. For instance `application/pdf` | [optional] +**Filename** | **string** | Optional filename to save upload with. Will be the name that is shown in email clients | [optional] +**Base64Contents** | **string** | Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UploadMultipartFormRequest.md b/docs/UploadMultipartFormRequest.md new file mode 100644 index 00000000..369961c0 --- /dev/null +++ b/docs/UploadMultipartFormRequest.md @@ -0,0 +1,11 @@ +# mailslurp.Model.UploadMultipartFormRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContentTypeHeader** | **string** | Optional content type header of attachment | [optional] +**File** | **System.IO.Stream** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/UserInfoDto.md b/docs/UserInfoDto.md new file mode 100644 index 00000000..091510dc --- /dev/null +++ b/docs/UserInfoDto.md @@ -0,0 +1,15 @@ +# mailslurp.Model.UserInfoDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | +**EmailAddress** | **string** | | +**AccountState** | **string** | | +**SubscriptionType** | **string** | | [optional] +**AccountType** | **string** | | +**CreatedAt** | **DateTime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ValidateEmailAddressListOptions.md b/docs/ValidateEmailAddressListOptions.md new file mode 100644 index 00000000..3216c67d --- /dev/null +++ b/docs/ValidateEmailAddressListOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.ValidateEmailAddressListOptions +Options for validating a list of email addresses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailAddressList** | **List<string>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ValidateEmailAddressListResult.md b/docs/ValidateEmailAddressListResult.md new file mode 100644 index 00000000..a0993a3f --- /dev/null +++ b/docs/ValidateEmailAddressListResult.md @@ -0,0 +1,13 @@ +# mailslurp.Model.ValidateEmailAddressListResult +Result of validating a list of email addresses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ValidEmailAddresses** | **List<string>** | | +**InvalidEmailAddresses** | **List<string>** | | +**ResultMapEmailAddressIsValid** | **Dictionary<string, bool>** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ValidationDto.md b/docs/ValidationDto.md new file mode 100644 index 00000000..3b231fa5 --- /dev/null +++ b/docs/ValidationDto.md @@ -0,0 +1,12 @@ +# mailslurp.Model.ValidationDto +Response object for email validation operation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailId** | **Guid** | ID of the email validated | +**Html** | [**HTMLValidationResult**](HTMLValidationResult) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/ValidationMessage.md b/docs/ValidationMessage.md new file mode 100644 index 00000000..fae639d0 --- /dev/null +++ b/docs/ValidationMessage.md @@ -0,0 +1,12 @@ +# mailslurp.Model.ValidationMessage +Optional warnings resulting from HTML validation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LineNumber** | **int** | | +**Message** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/VerifyEmailAddressOptions.md b/docs/VerifyEmailAddressOptions.md new file mode 100644 index 00000000..accc4e62 --- /dev/null +++ b/docs/VerifyEmailAddressOptions.md @@ -0,0 +1,14 @@ +# mailslurp.Model.VerifyEmailAddressOptions +Options for verifying that an email address exists at a remote mail server. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailServerDomain** | **string** | | [optional] +**EmailAddress** | **string** | | +**SenderEmailAddress** | **string** | | [optional] +**Port** | **int?** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/VerifyWebhookSignatureOptions.md b/docs/VerifyWebhookSignatureOptions.md new file mode 100644 index 00000000..2f1f9449 --- /dev/null +++ b/docs/VerifyWebhookSignatureOptions.md @@ -0,0 +1,11 @@ +# mailslurp.Model.VerifyWebhookSignatureOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | | +**Signature** | **string** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/VerifyWebhookSignatureResults.md b/docs/VerifyWebhookSignatureResults.md new file mode 100644 index 00000000..a0696baa --- /dev/null +++ b/docs/VerifyWebhookSignatureResults.md @@ -0,0 +1,10 @@ +# mailslurp.Model.VerifyWebhookSignatureResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsValid** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WaitForConditions.md b/docs/WaitForConditions.md new file mode 100644 index 00000000..c980d0dc --- /dev/null +++ b/docs/WaitForConditions.md @@ -0,0 +1,20 @@ +# mailslurp.Model.WaitForConditions +Conditions to apply to emails that you are waiting for + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InboxId** | **Guid** | ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. | +**Count** | **int?** | Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. | [optional] +**DelayTimeout** | **long?** | Max time in milliseconds to wait between retries if a `timeout` is specified. | [optional] +**Timeout** | **long** | Max time in milliseconds to retry the `waitFor` operation until conditions are met. | +**UnreadOnly** | **bool?** | Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard. | [optional] +**CountType** | **string** | How result size should be compared with the expected size. Exactly or at-least matching result? | [optional] +**Matches** | [**List<MatchOption>**](MatchOption) | Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. | [optional] +**SortDirection** | **string** | Direction to sort matching emails by created time | [optional] +**Since** | **DateTime?** | ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date | [optional] +**Before** | **DateTime?** | ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WaitForControllerApi.md b/docs/WaitForControllerApi.md new file mode 100644 index 00000000..3ccec022 --- /dev/null +++ b/docs/WaitForControllerApi.md @@ -0,0 +1,853 @@ +# mailslurp.Api.WaitForControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**WaitFor**](WaitForControllerApi#waitfor) | **POST** /waitFor | Wait for an email to match the provided filter conditions such as subject contains keyword. | +| [**WaitForEmailCount**](WaitForControllerApi#waitforemailcount) | **GET** /waitForEmailCount | Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs | +| [**WaitForLatestEmail**](WaitForControllerApi#waitforlatestemail) | **GET** /waitForLatestEmail | Fetch inbox's latest email or if empty wait for an email to arrive | +| [**WaitForLatestSms**](WaitForControllerApi#waitforlatestsms) | **POST** /waitForLatestSms | Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. | +| [**WaitForMatchingEmails**](WaitForControllerApi#waitformatchingemails) | **POST** /waitForMatchingEmails | Wait or return list of emails that match simple matching patterns | +| [**WaitForMatchingFirstEmail**](WaitForControllerApi#waitformatchingfirstemail) | **POST** /waitForMatchingFirstEmail | Wait for or return the first email that matches provided MatchOptions array | +| [**WaitForNthEmail**](WaitForControllerApi#waitfornthemail) | **GET** /waitForNthEmail | Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. | +| [**WaitForSms**](WaitForControllerApi#waitforsms) | **POST** /waitForSms | Wait for an SMS message to match the provided filter conditions such as body contains keyword. | + + +# **WaitFor** +> List<EmailPreview> WaitFor (WaitForConditions waitForConditions) + +Wait for an email to match the provided filter conditions such as subject contains keyword. + +Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var waitForConditions = new WaitForConditions(); // WaitForConditions | + + try + { + // Wait for an email to match the provided filter conditions such as subject contains keyword. + List result = apiInstance.WaitFor(waitForConditions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitFor: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait for an email to match the provided filter conditions such as subject contains keyword. + ApiResponse> response = apiInstance.WaitForWithHttpInfo(waitForConditions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **waitForConditions** | [**WaitForConditions**](WaitForConditions) | | | + +### Return type + +[**List<EmailPreview>**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForEmailCount** +> List<EmailPreview> WaitForEmailCount (Guid inboxId, int count, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null) + +Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + +If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForEmailCountExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Id of the inbox we are fetching emails from + var count = 56; // int | Number of emails to wait for. Must be greater that 1 + var timeout = 789L; // long? | Max milliseconds to wait (optional) + var unreadOnly = false; // bool? | Optional filter for unread only (optional) (default to false) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received before the given timestamp (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received after the given timestamp (optional) + var sort = "ASC"; // string | Sort direction (optional) + var delay = 789L; // long? | Max milliseconds delay between calls (optional) + + try + { + // Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + List result = apiInstance.WaitForEmailCount(inboxId, count, timeout, unreadOnly, before, since, sort, delay); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitForEmailCount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForEmailCountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + ApiResponse> response = apiInstance.WaitForEmailCountWithHttpInfo(inboxId, count, timeout, unreadOnly, before, since, sort, delay); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForEmailCountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Id of the inbox we are fetching emails from | | +| **count** | **int** | Number of emails to wait for. Must be greater that 1 | | +| **timeout** | **long?** | Max milliseconds to wait | [optional] | +| **unreadOnly** | **bool?** | Optional filter for unread only | [optional] [default to false] | +| **before** | **DateTime?** | Filter for emails that were received before the given timestamp | [optional] | +| **since** | **DateTime?** | Filter for emails that were received after the given timestamp | [optional] | +| **sort** | **string** | Sort direction | [optional] | +| **delay** | **long?** | Max milliseconds delay between calls | [optional] | + +### Return type + +[**List<EmailPreview>**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForLatestEmail** +> Email WaitForLatestEmail (Guid? inboxId = null, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null) + +Fetch inbox's latest email or if empty wait for an email to arrive + +Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForLatestEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Id of the inbox we are fetching emails from (optional) + var timeout = 789L; // long? | Max milliseconds to wait (optional) + var unreadOnly = false; // bool? | Optional filter for unread only. (optional) (default to false) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were before after the given timestamp (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received after the given timestamp (optional) + var sort = "ASC"; // string | Sort direction (optional) + var delay = 789L; // long? | Max milliseconds delay between calls (optional) + + try + { + // Fetch inbox's latest email or if empty wait for an email to arrive + Email result = apiInstance.WaitForLatestEmail(inboxId, timeout, unreadOnly, before, since, sort, delay); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitForLatestEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForLatestEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Fetch inbox's latest email or if empty wait for an email to arrive + ApiResponse response = apiInstance.WaitForLatestEmailWithHttpInfo(inboxId, timeout, unreadOnly, before, since, sort, delay); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForLatestEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Id of the inbox we are fetching emails from | [optional] | +| **timeout** | **long?** | Max milliseconds to wait | [optional] | +| **unreadOnly** | **bool?** | Optional filter for unread only. | [optional] [default to false] | +| **before** | **DateTime?** | Filter for emails that were before after the given timestamp | [optional] | +| **since** | **DateTime?** | Filter for emails that were received after the given timestamp | [optional] | +| **sort** | **string** | Sort direction | [optional] | +| **delay** | **long?** | Max milliseconds delay between calls | [optional] | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForLatestSms** +> SmsDto WaitForLatestSms (WaitForSingleSmsOptions waitForSingleSmsOptions) + +Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + +Wait until a phone number meets given conditions or return immediately if already met + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForLatestSmsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var waitForSingleSmsOptions = new WaitForSingleSmsOptions(); // WaitForSingleSmsOptions | + + try + { + // Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + SmsDto result = apiInstance.WaitForLatestSms(waitForSingleSmsOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitForLatestSms: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForLatestSmsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + ApiResponse response = apiInstance.WaitForLatestSmsWithHttpInfo(waitForSingleSmsOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForLatestSmsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **waitForSingleSmsOptions** | [**WaitForSingleSmsOptions**](WaitForSingleSmsOptions) | | | + +### Return type + +[**SmsDto**](SmsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForMatchingEmails** +> List<EmailPreview> WaitForMatchingEmails (Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, long? timeout = null, bool? unreadOnly = null) + +Wait or return list of emails that match simple matching patterns + +Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForMatchingEmailsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Id of the inbox we are fetching emails from + var count = 56; // int | Number of emails to wait for. Must be greater or equal to 1 + var matchOptions = new MatchOptions(); // MatchOptions | + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received before the given timestamp (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received after the given timestamp (optional) + var sort = "ASC"; // string | Sort direction (optional) + var delay = 789L; // long? | Max milliseconds delay between calls (optional) + var timeout = 789L; // long? | Max milliseconds to wait (optional) + var unreadOnly = false; // bool? | Optional filter for unread only (optional) (default to false) + + try + { + // Wait or return list of emails that match simple matching patterns + List result = apiInstance.WaitForMatchingEmails(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitForMatchingEmails: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForMatchingEmailsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait or return list of emails that match simple matching patterns + ApiResponse> response = apiInstance.WaitForMatchingEmailsWithHttpInfo(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForMatchingEmailsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Id of the inbox we are fetching emails from | | +| **count** | **int** | Number of emails to wait for. Must be greater or equal to 1 | | +| **matchOptions** | [**MatchOptions**](MatchOptions) | | | +| **before** | **DateTime?** | Filter for emails that were received before the given timestamp | [optional] | +| **since** | **DateTime?** | Filter for emails that were received after the given timestamp | [optional] | +| **sort** | **string** | Sort direction | [optional] | +| **delay** | **long?** | Max milliseconds delay between calls | [optional] | +| **timeout** | **long?** | Max milliseconds to wait | [optional] | +| **unreadOnly** | **bool?** | Optional filter for unread only | [optional] [default to false] | + +### Return type + +[**List<EmailPreview>**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForMatchingFirstEmail** +> Email WaitForMatchingFirstEmail (Guid inboxId, MatchOptions matchOptions, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null) + +Wait for or return the first email that matches provided MatchOptions array + +Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForMatchingFirstEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var inboxId = "inboxId_example"; // Guid | Id of the inbox we are matching an email for + var matchOptions = new MatchOptions(); // MatchOptions | + var timeout = 789L; // long? | Max milliseconds to wait (optional) + var unreadOnly = false; // bool? | Optional filter for unread only (optional) (default to false) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received before the given timestamp (optional) + var sort = "ASC"; // string | Sort direction (optional) + var delay = 789L; // long? | Max milliseconds delay between calls (optional) + + try + { + // Wait for or return the first email that matches provided MatchOptions array + Email result = apiInstance.WaitForMatchingFirstEmail(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitForMatchingFirstEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForMatchingFirstEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait for or return the first email that matches provided MatchOptions array + ApiResponse response = apiInstance.WaitForMatchingFirstEmailWithHttpInfo(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForMatchingFirstEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | Id of the inbox we are matching an email for | | +| **matchOptions** | [**MatchOptions**](MatchOptions) | | | +| **timeout** | **long?** | Max milliseconds to wait | [optional] | +| **unreadOnly** | **bool?** | Optional filter for unread only | [optional] [default to false] | +| **since** | **DateTime?** | Filter for emails that were received after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter for emails that were received before the given timestamp | [optional] | +| **sort** | **string** | Sort direction | [optional] | +| **delay** | **long?** | Max milliseconds delay between calls | [optional] | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForNthEmail** +> Email WaitForNthEmail (Guid? inboxId = null, int? index = null, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null) + +Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + +If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForNthEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var inboxId = "inboxId_example"; // Guid? | Id of the inbox you are fetching emails from (optional) + var index = 0; // int? | Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional) (default to 0) + var timeout = 789L; // long? | Max milliseconds to wait for the nth email if not already present (optional) + var unreadOnly = false; // bool? | Optional filter for unread only (optional) (default to false) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter for emails that were received before the given timestamp (optional) + var sort = "ASC"; // string | Sort direction (optional) + var delay = 789L; // long? | Max milliseconds delay between calls (optional) + + try + { + // Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + Email result = apiInstance.WaitForNthEmail(inboxId, index, timeout, unreadOnly, since, before, sort, delay); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitForNthEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForNthEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + ApiResponse response = apiInstance.WaitForNthEmailWithHttpInfo(inboxId, index, timeout, unreadOnly, since, before, sort, delay); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForNthEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid?** | Id of the inbox you are fetching emails from | [optional] | +| **index** | **int?** | Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 | [optional] [default to 0] | +| **timeout** | **long?** | Max milliseconds to wait for the nth email if not already present | [optional] | +| **unreadOnly** | **bool?** | Optional filter for unread only | [optional] [default to false] | +| **since** | **DateTime?** | Filter for emails that were received after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter for emails that were received before the given timestamp | [optional] | +| **sort** | **string** | Sort direction | [optional] | +| **delay** | **long?** | Max milliseconds delay between calls | [optional] | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **WaitForSms** +> List<SmsPreview> WaitForSms (WaitForSmsConditions waitForSmsConditions) + +Wait for an SMS message to match the provided filter conditions such as body contains keyword. + +Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class WaitForSmsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WaitForControllerApi(config); + var waitForSmsConditions = new WaitForSmsConditions(); // WaitForSmsConditions | + + try + { + // Wait for an SMS message to match the provided filter conditions such as body contains keyword. + List result = apiInstance.WaitForSms(waitForSmsConditions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WaitForControllerApi.WaitForSms: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the WaitForSmsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Wait for an SMS message to match the provided filter conditions such as body contains keyword. + ApiResponse> response = apiInstance.WaitForSmsWithHttpInfo(waitForSmsConditions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WaitForControllerApi.WaitForSmsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **waitForSmsConditions** | [**WaitForSmsConditions**](WaitForSmsConditions) | | | + +### Return type + +[**List<SmsPreview>**](SmsPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/WaitForSingleSmsOptions.md b/docs/WaitForSingleSmsOptions.md new file mode 100644 index 00000000..c4aee390 --- /dev/null +++ b/docs/WaitForSingleSmsOptions.md @@ -0,0 +1,16 @@ +# mailslurp.Model.WaitForSingleSmsOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumberId** | **Guid** | | +**Timeout** | **long** | | +**UnreadOnly** | **bool** | | [optional] +**Before** | **DateTime** | | [optional] +**Since** | **DateTime** | | [optional] +**SortDirection** | **string** | | [optional] +**Delay** | **long** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WaitForSmsConditions.md b/docs/WaitForSmsConditions.md new file mode 100644 index 00000000..72d58cb7 --- /dev/null +++ b/docs/WaitForSmsConditions.md @@ -0,0 +1,21 @@ +# mailslurp.Model.WaitForSmsConditions +Conditions to apply to emails that you are waiting for + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumberId** | **Guid** | ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. | +**Limit** | **int?** | Limit results | [optional] +**Count** | **long** | Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. | +**DelayTimeout** | **long?** | Max time in milliseconds to wait between retries if a `timeout` is specified. | [optional] +**Timeout** | **long** | Max time in milliseconds to retry the `waitFor` operation until conditions are met. | +**UnreadOnly** | **bool?** | Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard. | [optional] +**CountType** | **string** | How result size should be compared with the expected size. Exactly or at-least matching result? | [optional] +**Matches** | [**List<SmsMatchOption>**](SmsMatchOption) | Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for. | [optional] +**SortDirection** | **string** | Direction to sort matching SMSs by created time | [optional] +**Since** | **DateTime?** | ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date | [optional] +**Before** | **DateTime?** | ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookBouncePayload.md b/docs/WebhookBouncePayload.md new file mode 100644 index 00000000..47ed437e --- /dev/null +++ b/docs/WebhookBouncePayload.md @@ -0,0 +1,18 @@ +# mailslurp.Model.WebhookBouncePayload +BOUNCE webhook payload. Sent to your webhook url endpoint via HTTP POST when an email bounced or was rejected by a recipient. Save the recipients to a ban list on your server and avoid emailing them again. It is recommended you also listen to the BOUNCE_RECIPIENT payload. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**BounceId** | **Guid** | ID of the bounce email record. Use the ID with the bounce controller to view more information | +**SentToRecipients** | **List<string>** | Email sent to recipients | [optional] +**Sender** | **string** | Sender causing bounce | +**BounceRecipients** | **List<string>** | Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookBounceRecipientPayload.md b/docs/WebhookBounceRecipientPayload.md new file mode 100644 index 00000000..05a03bb7 --- /dev/null +++ b/docs/WebhookBounceRecipientPayload.md @@ -0,0 +1,15 @@ +# mailslurp.Model.WebhookBounceRecipientPayload +BOUNCE_RECIPIENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email caused a bounce to occur for a recipient. Save the recipient to a ban list of your server and avoid email them again. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**Recipient** | **string** | Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookControllerApi.md b/docs/WebhookControllerApi.md new file mode 100644 index 00000000..50a59f17 --- /dev/null +++ b/docs/WebhookControllerApi.md @@ -0,0 +1,3174 @@ +# mailslurp.Api.WebhookControllerApi + +All URIs are relative to *https://csharp.api.mailslurp.com* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateAccountWebhook**](WebhookControllerApi#createaccountwebhook) | **POST** /webhooks | Attach a WebHook URL to an inbox | +| [**CreateWebhook**](WebhookControllerApi#createwebhook) | **POST** /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox | +| [**CreateWebhookForPhoneNumber**](WebhookControllerApi#createwebhookforphonenumber) | **POST** /phone/numbers/{phoneNumberId}/webhooks | Attach a WebHook URL to a phone number | +| [**DeleteAllWebhooks**](WebhookControllerApi#deleteallwebhooks) | **DELETE** /webhooks | Delete all webhooks | +| [**DeleteWebhook**](WebhookControllerApi#deletewebhook) | **DELETE** /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a Webhook for an Inbox | +| [**DeleteWebhookById**](WebhookControllerApi#deletewebhookbyid) | **DELETE** /webhooks/{webhookId} | Delete a webhook | +| [**GetAllAccountWebhooks**](WebhookControllerApi#getallaccountwebhooks) | **GET** /webhooks/account/paginated | List account webhooks Paginated | +| [**GetAllWebhookResults**](WebhookControllerApi#getallwebhookresults) | **GET** /webhooks/results | Get results for all webhooks | +| [**GetAllWebhooks**](WebhookControllerApi#getallwebhooks) | **GET** /webhooks/paginated | List Webhooks Paginated | +| [**GetInboxWebhooksPaginated**](WebhookControllerApi#getinboxwebhookspaginated) | **GET** /inboxes/{inboxId}/webhooks/paginated | Get paginated webhooks for an Inbox | +| [**GetJsonSchemaForWebhookEvent**](WebhookControllerApi#getjsonschemaforwebhookevent) | **POST** /webhooks/schema | | +| [**GetJsonSchemaForWebhookPayload**](WebhookControllerApi#getjsonschemaforwebhookpayload) | **POST** /webhooks/{webhookId}/schema | | +| [**GetPhoneNumberWebhooksPaginated**](WebhookControllerApi#getphonenumberwebhookspaginated) | **GET** /phone/numbers/{phoneId}/webhooks/paginated | Get paginated webhooks for a phone number | +| [**GetTestWebhookPayload**](WebhookControllerApi#gettestwebhookpayload) | **GET** /webhooks/test | | +| [**GetTestWebhookPayloadBounce**](WebhookControllerApi#gettestwebhookpayloadbounce) | **GET** /webhooks/test/email-bounce-payload | | +| [**GetTestWebhookPayloadBounceRecipient**](WebhookControllerApi#gettestwebhookpayloadbouncerecipient) | **GET** /webhooks/test/email-bounce-recipient-payload | | +| [**GetTestWebhookPayloadDeliveryStatus**](WebhookControllerApi#gettestwebhookpayloaddeliverystatus) | **GET** /webhooks/test/delivery-status-payload | Get webhook test payload for delivery status event | +| [**GetTestWebhookPayloadEmailOpened**](WebhookControllerApi#gettestwebhookpayloademailopened) | **GET** /webhooks/test/email-opened-payload | | +| [**GetTestWebhookPayloadEmailRead**](WebhookControllerApi#gettestwebhookpayloademailread) | **GET** /webhooks/test/email-read-payload | | +| [**GetTestWebhookPayloadForWebhook**](WebhookControllerApi#gettestwebhookpayloadforwebhook) | **POST** /webhooks/{webhookId}/example | | +| [**GetTestWebhookPayloadNewAttachment**](WebhookControllerApi#gettestwebhookpayloadnewattachment) | **GET** /webhooks/test/new-attachment-payload | Get webhook test payload for new attachment event | +| [**GetTestWebhookPayloadNewContact**](WebhookControllerApi#gettestwebhookpayloadnewcontact) | **GET** /webhooks/test/new-contact-payload | Get webhook test payload for new contact event | +| [**GetTestWebhookPayloadNewEmail**](WebhookControllerApi#gettestwebhookpayloadnewemail) | **GET** /webhooks/test/new-email-payload | Get webhook test payload for new email event | +| [**GetTestWebhookPayloadNewSms**](WebhookControllerApi#gettestwebhookpayloadnewsms) | **GET** /webhooks/test/new-sms-payload | Get webhook test payload for new sms event | +| [**GetWebhook**](WebhookControllerApi#getwebhook) | **GET** /webhooks/{webhookId} | Get a webhook | +| [**GetWebhookResult**](WebhookControllerApi#getwebhookresult) | **GET** /webhooks/results/{webhookResultId} | Get a webhook result for a webhook | +| [**GetWebhookResults**](WebhookControllerApi#getwebhookresults) | **GET** /webhooks/{webhookId}/results | Get a webhook results for a webhook | +| [**GetWebhookResultsUnseenErrorCount**](WebhookControllerApi#getwebhookresultsunseenerrorcount) | **GET** /webhooks/results/unseen-count | Get count of unseen webhook results with error status | +| [**GetWebhooks**](WebhookControllerApi#getwebhooks) | **GET** /inboxes/{inboxId}/webhooks | Get all webhooks for an Inbox | +| [**RedriveWebhookResult**](WebhookControllerApi#redrivewebhookresult) | **POST** /webhooks/results/{webhookResultId}/redrive | Get a webhook result and try to resend the original webhook payload | +| [**SendTestData**](WebhookControllerApi#sendtestdata) | **POST** /webhooks/{webhookId}/test | Send webhook test data | +| [**UpdateWebhookHeaders**](WebhookControllerApi#updatewebhookheaders) | **PUT** /webhooks/{webhookId}/headers | Update a webhook request headers | +| [**VerifyWebhookSignature**](WebhookControllerApi#verifywebhooksignature) | **POST** /webhooks/verify | Verify a webhook payload signature | + + +# **CreateAccountWebhook** +> WebhookDto CreateAccountWebhook (CreateWebhookOptions createWebhookOptions) + +Attach a WebHook URL to an inbox + +Get notified of account level events such as bounce and bounce recipient. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateAccountWebhookExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var createWebhookOptions = new CreateWebhookOptions(); // CreateWebhookOptions | + + try + { + // Attach a WebHook URL to an inbox + WebhookDto result = apiInstance.CreateAccountWebhook(createWebhookOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.CreateAccountWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateAccountWebhookWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Attach a WebHook URL to an inbox + ApiResponse response = apiInstance.CreateAccountWebhookWithHttpInfo(createWebhookOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.CreateAccountWebhookWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **createWebhookOptions** | [**CreateWebhookOptions**](CreateWebhookOptions) | | | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateWebhook** +> WebhookDto CreateWebhook (Guid inboxId, CreateWebhookOptions createWebhookOptions) + +Attach a WebHook URL to an inbox + +Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateWebhookExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var createWebhookOptions = new CreateWebhookOptions(); // CreateWebhookOptions | + + try + { + // Attach a WebHook URL to an inbox + WebhookDto result = apiInstance.CreateWebhook(inboxId, createWebhookOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.CreateWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateWebhookWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Attach a WebHook URL to an inbox + ApiResponse response = apiInstance.CreateWebhookWithHttpInfo(inboxId, createWebhookOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.CreateWebhookWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **createWebhookOptions** | [**CreateWebhookOptions**](CreateWebhookOptions) | | | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **CreateWebhookForPhoneNumber** +> WebhookDto CreateWebhookForPhoneNumber (Guid phoneNumberId, CreateWebhookOptions createWebhookOptions) + +Attach a WebHook URL to a phone number + +Get notified whenever a phone number receives an SMS via a WebHook URL. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class CreateWebhookForPhoneNumberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var phoneNumberId = "phoneNumberId_example"; // Guid | + var createWebhookOptions = new CreateWebhookOptions(); // CreateWebhookOptions | + + try + { + // Attach a WebHook URL to a phone number + WebhookDto result = apiInstance.CreateWebhookForPhoneNumber(phoneNumberId, createWebhookOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.CreateWebhookForPhoneNumber: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateWebhookForPhoneNumberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Attach a WebHook URL to a phone number + ApiResponse response = apiInstance.CreateWebhookForPhoneNumberWithHttpInfo(phoneNumberId, createWebhookOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.CreateWebhookForPhoneNumberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneNumberId** | **Guid** | | | +| **createWebhookOptions** | [**CreateWebhookOptions**](CreateWebhookOptions) | | | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteAllWebhooks** +> void DeleteAllWebhooks (DateTime? before = null) + +Delete all webhooks + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteAllWebhooksExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | before (optional) + + try + { + // Delete all webhooks + apiInstance.DeleteAllWebhooks(before); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.DeleteAllWebhooks: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteAllWebhooksWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete all webhooks + apiInstance.DeleteAllWebhooksWithHttpInfo(before); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.DeleteAllWebhooksWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **before** | **DateTime?** | before | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteWebhook** +> void DeleteWebhook (Guid inboxId, Guid webhookId) + +Delete and disable a Webhook for an Inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteWebhookExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var webhookId = "webhookId_example"; // Guid | + + try + { + // Delete and disable a Webhook for an Inbox + apiInstance.DeleteWebhook(inboxId, webhookId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteWebhookWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete and disable a Webhook for an Inbox + apiInstance.DeleteWebhookWithHttpInfo(inboxId, webhookId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhookWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **webhookId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **DeleteWebhookById** +> void DeleteWebhookById (Guid webhookId) + +Delete a webhook + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class DeleteWebhookByIdExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookId = "webhookId_example"; // Guid | + + try + { + // Delete a webhook + apiInstance.DeleteWebhookById(webhookId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhookById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteWebhookByIdWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete a webhook + apiInstance.DeleteWebhookByIdWithHttpInfo(webhookId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhookByIdWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllAccountWebhooks** +> PageWebhookProjection GetAllAccountWebhooks (int? page = null, int? size = null, string sort = null, string eventType = null, DateTime? since = null, DateTime? before = null) + +List account webhooks Paginated + +List account webhooks in paginated form. Allows for page index, page size, and sort direction. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllAccountWebhooksExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size for paginated result list. (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to DESC) + var eventType = "EMAIL_RECEIVED"; // string | Optional event type (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // List account webhooks Paginated + PageWebhookProjection result = apiInstance.GetAllAccountWebhooks(page, size, sort, eventType, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetAllAccountWebhooks: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllAccountWebhooksWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List account webhooks Paginated + ApiResponse response = apiInstance.GetAllAccountWebhooksWithHttpInfo(page, size, sort, eventType, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetAllAccountWebhooksWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size for paginated result list. | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to DESC] | +| **eventType** | **string** | Optional event type | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageWebhookProjection**](PageWebhookProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllWebhookResults** +> PageWebhookResult GetAllWebhookResults (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, bool? unseenOnly = null) + +Get results for all webhooks + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllWebhookResultsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + var unseenOnly = true; // bool? | Filter for unseen exceptions only (optional) + + try + { + // Get results for all webhooks + PageWebhookResult result = apiInstance.GetAllWebhookResults(page, size, sort, searchFilter, since, before, unseenOnly); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhookResults: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllWebhookResultsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get results for all webhooks + ApiResponse response = apiInstance.GetAllWebhookResultsWithHttpInfo(page, size, sort, searchFilter, since, before, unseenOnly); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhookResultsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | +| **unseenOnly** | **bool?** | Filter for unseen exceptions only | [optional] | + +### Return type + +[**PageWebhookResult**](PageWebhookResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetAllWebhooks** +> PageWebhookProjection GetAllWebhooks (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, Guid? inboxId = null, Guid? phoneId = null, DateTime? before = null) + +List Webhooks Paginated + +List webhooks in paginated form. Allows for page index, page size, and sort direction. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetAllWebhooksExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size for paginated result list. (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to DESC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var inboxId = "inboxId_example"; // Guid? | Filter by inboxId (optional) + var phoneId = "phoneId_example"; // Guid? | Filter by phoneId (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // List Webhooks Paginated + PageWebhookProjection result = apiInstance.GetAllWebhooks(page, size, sort, searchFilter, since, inboxId, phoneId, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhooks: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllWebhooksWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Webhooks Paginated + ApiResponse response = apiInstance.GetAllWebhooksWithHttpInfo(page, size, sort, searchFilter, since, inboxId, phoneId, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhooksWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size for paginated result list. | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to DESC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **inboxId** | **Guid?** | Filter by inboxId | [optional] | +| **phoneId** | **Guid?** | Filter by phoneId | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageWebhookProjection**](PageWebhookProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetInboxWebhooksPaginated** +> PageWebhookProjection GetInboxWebhooksPaginated (Guid inboxId, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null) + +Get paginated webhooks for an Inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetInboxWebhooksPaginatedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get paginated webhooks for an Inbox + PageWebhookProjection result = apiInstance.GetInboxWebhooksPaginated(inboxId, page, size, sort, searchFilter, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetInboxWebhooksPaginated: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInboxWebhooksPaginatedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get paginated webhooks for an Inbox + ApiResponse response = apiInstance.GetInboxWebhooksPaginatedWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetInboxWebhooksPaginatedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageWebhookProjection**](PageWebhookProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetJsonSchemaForWebhookEvent** +> JSONSchemaDto GetJsonSchemaForWebhookEvent (string _event) + + + +Get JSON Schema definition for webhook payload by event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetJsonSchemaForWebhookEventExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var _event = "EMAIL_RECEIVED"; // string | + + try + { + JSONSchemaDto result = apiInstance.GetJsonSchemaForWebhookEvent(_event); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookEvent: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetJsonSchemaForWebhookEventWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetJsonSchemaForWebhookEventWithHttpInfo(_event); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookEventWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **_event** | **string** | | | + +### Return type + +[**JSONSchemaDto**](JSONSchemaDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetJsonSchemaForWebhookPayload** +> JSONSchemaDto GetJsonSchemaForWebhookPayload (Guid webhookId) + + + +Get JSON Schema definition for webhook payload + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetJsonSchemaForWebhookPayloadExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookId = "webhookId_example"; // Guid | + + try + { + JSONSchemaDto result = apiInstance.GetJsonSchemaForWebhookPayload(webhookId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookPayload: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetJsonSchemaForWebhookPayloadWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetJsonSchemaForWebhookPayloadWithHttpInfo(webhookId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookPayloadWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookId** | **Guid** | | | + +### Return type + +[**JSONSchemaDto**](JSONSchemaDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetPhoneNumberWebhooksPaginated** +> PageWebhookProjection GetPhoneNumberWebhooksPaginated (Guid phoneId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null) + +Get paginated webhooks for a phone number + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetPhoneNumberWebhooksPaginatedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var phoneId = "phoneId_example"; // Guid | + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + + try + { + // Get paginated webhooks for a phone number + PageWebhookProjection result = apiInstance.GetPhoneNumberWebhooksPaginated(phoneId, page, size, sort, since, before); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetPhoneNumberWebhooksPaginated: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPhoneNumberWebhooksPaginatedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get paginated webhooks for a phone number + ApiResponse response = apiInstance.GetPhoneNumberWebhooksPaginatedWithHttpInfo(phoneId, page, size, sort, since, before); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetPhoneNumberWebhooksPaginatedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **phoneId** | **Guid** | | | +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | + +### Return type + +[**PageWebhookProjection**](PageWebhookProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayload** +> AbstractWebhookPayload GetTestWebhookPayload (string eventName = null) + + + +Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var eventName = "EMAIL_RECEIVED"; // string | (optional) + + try + { + AbstractWebhookPayload result = apiInstance.GetTestWebhookPayload(eventName); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayload: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetTestWebhookPayloadWithHttpInfo(eventName); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **eventName** | **string** | | [optional] | + +### Return type + +[**AbstractWebhookPayload**](AbstractWebhookPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadBounce** +> WebhookBouncePayload GetTestWebhookPayloadBounce () + + + +Get webhook test payload for bounce + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadBounceExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + WebhookBouncePayload result = apiInstance.GetTestWebhookPayloadBounce(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounce: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadBounceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetTestWebhookPayloadBounceWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookBouncePayload**](WebhookBouncePayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadBounceRecipient** +> WebhookBounceRecipientPayload GetTestWebhookPayloadBounceRecipient () + + + +Get webhook test payload for bounce recipient + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadBounceRecipientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + WebhookBounceRecipientPayload result = apiInstance.GetTestWebhookPayloadBounceRecipient(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounceRecipient: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadBounceRecipientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetTestWebhookPayloadBounceRecipientWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounceRecipientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookBounceRecipientPayload**](WebhookBounceRecipientPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadDeliveryStatus** +> WebhookDeliveryStatusPayload GetTestWebhookPayloadDeliveryStatus () + +Get webhook test payload for delivery status event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadDeliveryStatusExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + // Get webhook test payload for delivery status event + WebhookDeliveryStatusPayload result = apiInstance.GetTestWebhookPayloadDeliveryStatus(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadDeliveryStatus: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadDeliveryStatusWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get webhook test payload for delivery status event + ApiResponse response = apiInstance.GetTestWebhookPayloadDeliveryStatusWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadDeliveryStatusWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookDeliveryStatusPayload**](WebhookDeliveryStatusPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadEmailOpened** +> WebhookEmailOpenedPayload GetTestWebhookPayloadEmailOpened () + + + +Get webhook test payload for email opened event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadEmailOpenedExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + WebhookEmailOpenedPayload result = apiInstance.GetTestWebhookPayloadEmailOpened(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailOpened: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadEmailOpenedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetTestWebhookPayloadEmailOpenedWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailOpenedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookEmailOpenedPayload**](WebhookEmailOpenedPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadEmailRead** +> WebhookEmailReadPayload GetTestWebhookPayloadEmailRead () + + + +Get webhook test payload for email opened event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadEmailReadExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + WebhookEmailReadPayload result = apiInstance.GetTestWebhookPayloadEmailRead(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailRead: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadEmailReadWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetTestWebhookPayloadEmailReadWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailReadWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookEmailReadPayload**](WebhookEmailReadPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadForWebhook** +> AbstractWebhookPayload GetTestWebhookPayloadForWebhook (Guid webhookId) + + + +Get example payload for webhook + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadForWebhookExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookId = "webhookId_example"; // Guid | + + try + { + AbstractWebhookPayload result = apiInstance.GetTestWebhookPayloadForWebhook(webhookId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadForWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadForWebhookWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetTestWebhookPayloadForWebhookWithHttpInfo(webhookId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadForWebhookWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookId** | **Guid** | | | + +### Return type + +[**AbstractWebhookPayload**](AbstractWebhookPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadNewAttachment** +> WebhookNewAttachmentPayload GetTestWebhookPayloadNewAttachment () + +Get webhook test payload for new attachment event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadNewAttachmentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + // Get webhook test payload for new attachment event + WebhookNewAttachmentPayload result = apiInstance.GetTestWebhookPayloadNewAttachment(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewAttachment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadNewAttachmentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get webhook test payload for new attachment event + ApiResponse response = apiInstance.GetTestWebhookPayloadNewAttachmentWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewAttachmentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookNewAttachmentPayload**](WebhookNewAttachmentPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadNewContact** +> WebhookNewContactPayload GetTestWebhookPayloadNewContact () + +Get webhook test payload for new contact event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadNewContactExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + // Get webhook test payload for new contact event + WebhookNewContactPayload result = apiInstance.GetTestWebhookPayloadNewContact(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewContact: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadNewContactWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get webhook test payload for new contact event + ApiResponse response = apiInstance.GetTestWebhookPayloadNewContactWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewContactWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookNewContactPayload**](WebhookNewContactPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadNewEmail** +> WebhookNewEmailPayload GetTestWebhookPayloadNewEmail () + +Get webhook test payload for new email event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadNewEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + // Get webhook test payload for new email event + WebhookNewEmailPayload result = apiInstance.GetTestWebhookPayloadNewEmail(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadNewEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get webhook test payload for new email event + ApiResponse response = apiInstance.GetTestWebhookPayloadNewEmailWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookNewEmailPayload**](WebhookNewEmailPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetTestWebhookPayloadNewSms** +> WebhookNewSmsPayload GetTestWebhookPayloadNewSms () + +Get webhook test payload for new sms event + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetTestWebhookPayloadNewSmsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + // Get webhook test payload for new sms event + WebhookNewSmsPayload result = apiInstance.GetTestWebhookPayloadNewSms(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewSms: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTestWebhookPayloadNewSmsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get webhook test payload for new sms event + ApiResponse response = apiInstance.GetTestWebhookPayloadNewSmsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewSmsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**WebhookNewSmsPayload**](WebhookNewSmsPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetWebhook** +> WebhookDto GetWebhook (Guid webhookId) + +Get a webhook + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetWebhookExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookId = "webhookId_example"; // Guid | + + try + { + // Get a webhook + WebhookDto result = apiInstance.GetWebhook(webhookId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetWebhookWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a webhook + ApiResponse response = apiInstance.GetWebhookWithHttpInfo(webhookId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetWebhookWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookId** | **Guid** | | | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetWebhookResult** +> WebhookResultDto GetWebhookResult (Guid webhookResultId) + +Get a webhook result for a webhook + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetWebhookResultExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookResultId = "webhookResultId_example"; // Guid | Webhook Result ID + + try + { + // Get a webhook result for a webhook + WebhookResultDto result = apiInstance.GetWebhookResult(webhookResultId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResult: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetWebhookResultWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a webhook result for a webhook + ApiResponse response = apiInstance.GetWebhookResultWithHttpInfo(webhookResultId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookResultId** | **Guid** | Webhook Result ID | | + +### Return type + +[**WebhookResultDto**](WebhookResultDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetWebhookResults** +> PageWebhookResult GetWebhookResults (Guid webhookId, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, bool? unseenOnly = null) + +Get a webhook results for a webhook + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetWebhookResultsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookId = "webhookId_example"; // Guid | ID of webhook to get results for + var page = 0; // int? | Optional page index in list pagination (optional) (default to 0) + var size = 20; // int? | Optional page size in list pagination (optional) (default to 20) + var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC) + var searchFilter = "searchFilter_example"; // string | Optional search filter (optional) + var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional) + var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional) + var unseenOnly = true; // bool? | Filter for unseen exceptions only (optional) + + try + { + // Get a webhook results for a webhook + PageWebhookResult result = apiInstance.GetWebhookResults(webhookId, page, size, sort, searchFilter, since, before, unseenOnly); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResults: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetWebhookResultsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a webhook results for a webhook + ApiResponse response = apiInstance.GetWebhookResultsWithHttpInfo(webhookId, page, size, sort, searchFilter, since, before, unseenOnly); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookId** | **Guid** | ID of webhook to get results for | | +| **page** | **int?** | Optional page index in list pagination | [optional] [default to 0] | +| **size** | **int?** | Optional page size in list pagination | [optional] [default to 20] | +| **sort** | **string** | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] | +| **searchFilter** | **string** | Optional search filter | [optional] | +| **since** | **DateTime?** | Filter by created at after the given timestamp | [optional] | +| **before** | **DateTime?** | Filter by created at before the given timestamp | [optional] | +| **unseenOnly** | **bool?** | Filter for unseen exceptions only | [optional] | + +### Return type + +[**PageWebhookResult**](PageWebhookResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetWebhookResultsUnseenErrorCount** +> UnseenErrorCountDto GetWebhookResultsUnseenErrorCount () + +Get count of unseen webhook results with error status + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetWebhookResultsUnseenErrorCountExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + + try + { + // Get count of unseen webhook results with error status + UnseenErrorCountDto result = apiInstance.GetWebhookResultsUnseenErrorCount(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultsUnseenErrorCount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetWebhookResultsUnseenErrorCountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get count of unseen webhook results with error status + ApiResponse response = apiInstance.GetWebhookResultsUnseenErrorCountWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultsUnseenErrorCountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**UnseenErrorCountDto**](UnseenErrorCountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **GetWebhooks** +> List<WebhookDto> GetWebhooks (Guid inboxId) + +Get all webhooks for an Inbox + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class GetWebhooksExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var inboxId = "inboxId_example"; // Guid | + + try + { + // Get all webhooks for an Inbox + List result = apiInstance.GetWebhooks(inboxId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.GetWebhooks: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetWebhooksWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get all webhooks for an Inbox + ApiResponse> response = apiInstance.GetWebhooksWithHttpInfo(inboxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.GetWebhooksWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **inboxId** | **Guid** | | | + +### Return type + +[**List<WebhookDto>**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **RedriveWebhookResult** +> WebhookRedriveResult RedriveWebhookResult (Guid webhookResultId) + +Get a webhook result and try to resend the original webhook payload + +Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class RedriveWebhookResultExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookResultId = "webhookResultId_example"; // Guid | Webhook Result ID + + try + { + // Get a webhook result and try to resend the original webhook payload + WebhookRedriveResult result = apiInstance.RedriveWebhookResult(webhookResultId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.RedriveWebhookResult: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RedriveWebhookResultWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a webhook result and try to resend the original webhook payload + ApiResponse response = apiInstance.RedriveWebhookResultWithHttpInfo(webhookResultId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.RedriveWebhookResultWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookResultId** | **Guid** | Webhook Result ID | | + +### Return type + +[**WebhookRedriveResult**](WebhookRedriveResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **SendTestData** +> WebhookTestResult SendTestData (Guid webhookId) + +Send webhook test data + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class SendTestDataExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookId = "webhookId_example"; // Guid | + + try + { + // Send webhook test data + WebhookTestResult result = apiInstance.SendTestData(webhookId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.SendTestData: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendTestDataWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send webhook test data + ApiResponse response = apiInstance.SendTestDataWithHttpInfo(webhookId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.SendTestDataWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookId** | **Guid** | | | + +### Return type + +[**WebhookTestResult**](WebhookTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **UpdateWebhookHeaders** +> WebhookDto UpdateWebhookHeaders (Guid webhookId, WebhookHeaders webhookHeaders) + +Update a webhook request headers + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class UpdateWebhookHeadersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var webhookId = "webhookId_example"; // Guid | + var webhookHeaders = new WebhookHeaders(); // WebhookHeaders | + + try + { + // Update a webhook request headers + WebhookDto result = apiInstance.UpdateWebhookHeaders(webhookId, webhookHeaders); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.UpdateWebhookHeaders: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateWebhookHeadersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update a webhook request headers + ApiResponse response = apiInstance.UpdateWebhookHeadersWithHttpInfo(webhookId, webhookHeaders); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.UpdateWebhookHeadersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **webhookId** | **Guid** | | | +| **webhookHeaders** | [**WebhookHeaders**](WebhookHeaders) | | | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + + +# **VerifyWebhookSignature** +> VerifyWebhookSignatureResults VerifyWebhookSignature (VerifyWebhookSignatureOptions verifyWebhookSignatureOptions) + +Verify a webhook payload signature + +Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +namespace Example +{ + public class VerifyWebhookSignatureExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://csharp.api.mailslurp.com"; + // Configure API key authorization: API_KEY + config.AddApiKey("x-api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("x-api-key", "Bearer"); + + var apiInstance = new WebhookControllerApi(config); + var verifyWebhookSignatureOptions = new VerifyWebhookSignatureOptions(); // VerifyWebhookSignatureOptions | + + try + { + // Verify a webhook payload signature + VerifyWebhookSignatureResults result = apiInstance.VerifyWebhookSignature(verifyWebhookSignatureOptions); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WebhookControllerApi.VerifyWebhookSignature: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the VerifyWebhookSignatureWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Verify a webhook payload signature + ApiResponse response = apiInstance.VerifyWebhookSignatureWithHttpInfo(verifyWebhookSignatureOptions); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WebhookControllerApi.VerifyWebhookSignatureWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **verifyWebhookSignatureOptions** | [**VerifyWebhookSignatureOptions**](VerifyWebhookSignatureOptions) | | | + +### Return type + +[**VerifyWebhookSignatureResults**](VerifyWebhookSignatureResults) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/WebhookDeliveryStatusPayload.md b/docs/WebhookDeliveryStatusPayload.md new file mode 100644 index 00000000..1412e1f8 --- /dev/null +++ b/docs/WebhookDeliveryStatusPayload.md @@ -0,0 +1,26 @@ +# mailslurp.Model.WebhookDeliveryStatusPayload +DELIVERY_STATUS webhook payload. Sent to your webhook url endpoint via HTTP POST when an email delivery status is created. This could be a successful delivery or a delivery failure. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**Id** | **Guid** | ID of delivery status | +**UserId** | **Guid** | User ID of event | +**SentId** | **Guid?** | ID of sent email | [optional] +**RemoteMtaIp** | **string** | IP address of the remote Mail Transfer Agent | [optional] +**InboxId** | **Guid?** | Id of the inbox | [optional] +**ReportingMta** | **string** | Mail Transfer Agent reporting delivery status | [optional] +**Recipients** | **List<string>** | Recipients for delivery | [optional] +**SmtpResponse** | **string** | SMTP server response message | [optional] +**SmtpStatusCode** | **int?** | SMTP server status | [optional] +**ProcessingTimeMillis** | **long?** | Time in milliseconds for delivery processing | [optional] +**Received** | **DateTime?** | Time event was received | [optional] +**Subject** | **string** | Email subject | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookDto.md b/docs/WebhookDto.md new file mode 100644 index 00000000..09024c49 --- /dev/null +++ b/docs/WebhookDto.md @@ -0,0 +1,24 @@ +# mailslurp.Model.WebhookDto +Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://csharp.api.mailslurp.com/schemas/webhook-payload for the payload schema. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | ID of the Webhook | +**UserId** | **Guid** | User ID of the Webhook | +**BasicAuth** | **bool** | Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. | +**Name** | **string** | Name of the webhook | [optional] +**PhoneId** | **Guid?** | The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set | [optional] +**InboxId** | **Guid?** | The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set | [optional] +**RequestBodyTemplate** | **string** | Request body template for HTTP request that will be sent for the webhook. Use Moustache style template variables to insert values from the original event payload. | [optional] +**Url** | **string** | URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. | +**Method** | **string** | HTTP method that your server endpoint must listen for | +**PayloadJsonSchema** | **string** | Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method | +**CreatedAt** | **DateTime?** | When the webhook was created | +**UpdatedAt** | **DateTime** | | +**EventName** | **string** | Webhook trigger event name | [optional] +**RequestHeaders** | [**WebhookHeaders**](WebhookHeaders) | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookEmailOpenedPayload.md b/docs/WebhookEmailOpenedPayload.md new file mode 100644 index 00000000..27bf600e --- /dev/null +++ b/docs/WebhookEmailOpenedPayload.md @@ -0,0 +1,19 @@ +# mailslurp.Model.WebhookEmailOpenedPayload +EMAIL_OPENED webhook payload. Sent to your webhook url endpoint via HTTP POST when an email containing a tracking pixel is opened and the pixel image is loaded by a reader. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**InboxId** | **Guid** | Id of the inbox | +**PixelId** | **Guid** | ID of the tracking pixel | +**SentEmailId** | **Guid** | ID of sent email | +**Recipient** | **string** | Email address for the recipient of the tracking pixel | +**CreatedAt** | **DateTime** | Date time of event creation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookEmailReadPayload.md b/docs/WebhookEmailReadPayload.md new file mode 100644 index 00000000..c9e41ba4 --- /dev/null +++ b/docs/WebhookEmailReadPayload.md @@ -0,0 +1,18 @@ +# mailslurp.Model.WebhookEmailReadPayload +EMAIL_READ webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is read. This happens when an email is requested in full from the API or a user views the email in the dashboard. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**EmailId** | **Guid** | ID of the email that was received. Use this ID for fetching the email with the `EmailController`. | +**InboxId** | **Guid** | Id of the inbox | +**EmailIsRead** | **bool** | Is the email read | +**CreatedAt** | **DateTime** | Date time of event creation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookHeaderNameValue.md b/docs/WebhookHeaderNameValue.md new file mode 100644 index 00000000..7dd7a804 --- /dev/null +++ b/docs/WebhookHeaderNameValue.md @@ -0,0 +1,12 @@ +# mailslurp.Model.WebhookHeaderNameValue +Name value pair for webhook header + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of header | +**Value** | **string** | Value of header | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookHeaders.md b/docs/WebhookHeaders.md new file mode 100644 index 00000000..99232221 --- /dev/null +++ b/docs/WebhookHeaders.md @@ -0,0 +1,11 @@ +# mailslurp.Model.WebhookHeaders +Webhook HTTP headers to include with each request from MailSlurp to your server + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Headers** | [**List<WebhookHeaderNameValue>**](WebhookHeaderNameValue) | List of header name value pairs to include with webhook requests | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookNewAttachmentPayload.md b/docs/WebhookNewAttachmentPayload.md new file mode 100644 index 00000000..56cf74dc --- /dev/null +++ b/docs/WebhookNewAttachmentPayload.md @@ -0,0 +1,18 @@ +# mailslurp.Model.WebhookNewAttachmentPayload +NEW_ATTACHMENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains an attachment. You can use the attachmentId to download the attachment. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**AttachmentId** | **string** | ID of attachment. Use the `AttachmentController` to | +**Name** | **string** | Filename of the attachment if present | +**ContentType** | **string** | Content type of attachment such as 'image/png' or 'application/pdf | +**ContentLength** | **long** | Size of attachment in bytes | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookNewContactPayload.md b/docs/WebhookNewContactPayload.md new file mode 100644 index 00000000..70bfa1d5 --- /dev/null +++ b/docs/WebhookNewContactPayload.md @@ -0,0 +1,25 @@ +# mailslurp.Model.WebhookNewContactPayload +NEW_CONTACT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains a recipient that has not been saved as a contact. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**ContactId** | **Guid** | Contact ID | +**GroupId** | **Guid?** | Contact group ID | [optional] +**FirstName** | **string** | Contact first name | [optional] +**LastName** | **string** | Contact last name | [optional] +**Company** | **string** | Contact company name | [optional] +**PrimaryEmailAddress** | **string** | Primary email address for contact | [optional] +**EmailAddresses** | **List<string>** | Email addresses for contact | +**Tags** | **List<string>** | Tags for contact | +**MetaData** | **Object** | | [optional] +**OptOut** | **bool** | Has contact opted out of emails | +**CreatedAt** | **DateTime** | Date time of event creation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookNewEmailPayload.md b/docs/WebhookNewEmailPayload.md new file mode 100644 index 00000000..cc68f832 --- /dev/null +++ b/docs/WebhookNewEmailPayload.md @@ -0,0 +1,24 @@ +# mailslurp.Model.WebhookNewEmailPayload +NEW_EMAIL webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to. Use the email ID to fetch the full email body or attachments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**InboxId** | **Guid** | Id of the inbox | +**DomainId** | **Guid?** | Id of the domain that received an email | [optional] +**EmailId** | **Guid** | ID of the email that was received. Use this ID for fetching the email with the `EmailController`. | +**CreatedAt** | **DateTime** | Date time of event creation | +**To** | **List<string>** | List of `To` recipient email addresses that the email was addressed to. See recipients object for names. | +**From** | **string** | Who the email was sent from. An email address - see fromName for the sender name. | +**Cc** | **List<string>** | List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. | +**Bcc** | **List<string>** | List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. | +**Subject** | **string** | The subject line of the email message as specified by SMTP subject header | [optional] +**AttachmentMetaDatas** | [**List<AttachmentMetaData>**](AttachmentMetaData) | List of attachment meta data objects if attachments present | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookNewSmsPayload.md b/docs/WebhookNewSmsPayload.md new file mode 100644 index 00000000..cb64ab0a --- /dev/null +++ b/docs/WebhookNewSmsPayload.md @@ -0,0 +1,21 @@ +# mailslurp.Model.WebhookNewSmsPayload +NEW_SMS webhook payload. Sent to your webhook url endpoint via HTTP POST when an sms is received by the phone number that your webhook is attached to. Use the SMS ID to fetch the full SMS details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**WebhookId** | **Guid** | ID of webhook entity being triggered | +**EventName** | **string** | Name of the event type webhook is being triggered for. | +**WebhookName** | **string** | Name of the webhook being triggered | [optional] +**SmsId** | **Guid** | ID of SMS message | +**UserId** | **Guid** | User ID of event | +**PhoneNumber** | **Guid** | ID of phone number receiving SMS | +**ToNumber** | **string** | Recipient phone number | +**FromNumber** | **string** | Sender phone number | +**Body** | **string** | SMS message body | +**Read** | **bool** | SMS has been read | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookProjection.md b/docs/WebhookProjection.md new file mode 100644 index 00000000..bbc943ed --- /dev/null +++ b/docs/WebhookProjection.md @@ -0,0 +1,18 @@ +# mailslurp.Model.WebhookProjection +Representation of a webhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**Id** | **Guid** | | +**Url** | **string** | | +**InboxId** | **Guid** | | [optional] +**EventName** | **string** | | [optional] +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**PhoneNumberId** | **Guid** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookRedriveResult.md b/docs/WebhookRedriveResult.md new file mode 100644 index 00000000..b9a3b1af --- /dev/null +++ b/docs/WebhookRedriveResult.md @@ -0,0 +1,13 @@ +# mailslurp.Model.WebhookRedriveResult +Result of retrying webhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WebhookResultId** | **Guid** | | +**Success** | **bool** | | +**Message** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookResultDto.md b/docs/WebhookResultDto.md new file mode 100644 index 00000000..0926d271 --- /dev/null +++ b/docs/WebhookResultDto.md @@ -0,0 +1,26 @@ +# mailslurp.Model.WebhookResultDto +Result of a webhook notification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid?** | | [optional] +**UserId** | **Guid** | | +**InboxId** | **Guid?** | | [optional] +**WebhookId** | **Guid** | | +**WebhookUrl** | **string** | | +**MessageId** | **string** | | +**RedriveId** | **Guid?** | | [optional] +**HttpMethod** | **string** | | +**WebhookEvent** | **string** | | +**ResponseStatus** | **int?** | | [optional] +**ResponseTimeMillis** | **long** | | +**ResponseBodyExtract** | **string** | | [optional] +**ResultType** | **string** | | [optional] +**CreatedAt** | **DateTime** | | +**UpdatedAt** | **DateTime** | | +**Seen** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookTestRequest.md b/docs/WebhookTestRequest.md new file mode 100644 index 00000000..fcaa90bb --- /dev/null +++ b/docs/WebhookTestRequest.md @@ -0,0 +1,14 @@ +# mailslurp.Model.WebhookTestRequest +Result of webhook test request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**Method** | **string** | | +**Headers** | **Dictionary<string, string>** | | +**Payload** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookTestResponse.md b/docs/WebhookTestResponse.md new file mode 100644 index 00000000..1619ebd9 --- /dev/null +++ b/docs/WebhookTestResponse.md @@ -0,0 +1,12 @@ +# mailslurp.Model.WebhookTestResponse +Response from webhook test request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | **int?** | | [optional] +**Message** | **string** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/docs/WebhookTestResult.md b/docs/WebhookTestResult.md new file mode 100644 index 00000000..99de3620 --- /dev/null +++ b/docs/WebhookTestResult.md @@ -0,0 +1,13 @@ +# mailslurp.Model.WebhookTestResult +Results of testing a webhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | [optional] +**Response** | [**WebhookTestResponse**](WebhookTestResponse) | | +**Request** | [**WebhookTestRequest**](WebhookTestRequest) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/mailslurp.sln b/mailslurp.sln new file mode 100644 index 00000000..3c68dccc --- /dev/null +++ b/mailslurp.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mailslurp", "src\mailslurp\mailslurp.csproj", "{B0FEA777-019B-4EAE-98D6-7D004DF93FC4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mailslurp.Test", "src\mailslurp.Test\mailslurp.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0FEA777-019B-4EAE-98D6-7D004DF93FC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0FEA777-019B-4EAE-98D6-7D004DF93FC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0FEA777-019B-4EAE-98D6-7D004DF93FC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0FEA777-019B-4EAE-98D6-7D004DF93FC4}.Release|Any CPU.Build.0 = Release|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/src/mailslurp.Test/Api/AliasControllerApiTests.cs b/src/mailslurp.Test/Api/AliasControllerApiTests.cs new file mode 100644 index 00000000..5ee6d62c --- /dev/null +++ b/src/mailslurp.Test/Api/AliasControllerApiTests.cs @@ -0,0 +1,183 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing AliasControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class AliasControllerApiTests : IDisposable + { + private AliasControllerApi instance; + + public AliasControllerApiTests() + { + instance = new AliasControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AliasControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' AliasControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateAlias + /// + [Fact] + public void CreateAliasTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateAliasOptions createAliasOptions = null; + //var response = instance.CreateAlias(createAliasOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteAlias + /// + [Fact] + public void DeleteAliasTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid aliasId = null; + //instance.DeleteAlias(aliasId); + } + + /// + /// Test GetAlias + /// + [Fact] + public void GetAliasTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid aliasId = null; + //var response = instance.GetAlias(aliasId); + //Assert.IsType(response); + } + + /// + /// Test GetAliasEmails + /// + [Fact] + public void GetAliasEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid aliasId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAliasEmails(aliasId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetAliasThreads + /// + [Fact] + public void GetAliasThreadsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid aliasId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAliasThreads(aliasId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetAliases + /// + [Fact] + public void GetAliasesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAliases(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test ReplyToAliasEmail + /// + [Fact] + public void ReplyToAliasEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid aliasId = null; + //Guid emailId = null; + //ReplyToAliasEmailOptions replyToAliasEmailOptions = null; + //var response = instance.ReplyToAliasEmail(aliasId, emailId, replyToAliasEmailOptions); + //Assert.IsType(response); + } + + /// + /// Test SendAliasEmail + /// + [Fact] + public void SendAliasEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid aliasId = null; + //SendEmailOptions sendEmailOptions = null; + //var response = instance.SendAliasEmail(aliasId, sendEmailOptions); + //Assert.IsType(response); + } + + /// + /// Test UpdateAlias + /// + [Fact] + public void UpdateAliasTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid aliasId = null; + //UpdateAliasOptions updateAliasOptions = null; + //var response = instance.UpdateAlias(aliasId, updateAliasOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/ApiUserControllerApiTests.cs b/src/mailslurp.Test/Api/ApiUserControllerApiTests.cs new file mode 100644 index 00000000..ea243c09 --- /dev/null +++ b/src/mailslurp.Test/Api/ApiUserControllerApiTests.cs @@ -0,0 +1,82 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing ApiUserControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class ApiUserControllerApiTests : IDisposable + { + private ApiUserControllerApi instance; + + public ApiUserControllerApiTests() + { + instance = new ApiUserControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ApiUserControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' ApiUserControllerApi + //Assert.IsType(instance); + } + + /// + /// Test GetJsonPropertyAsString + /// + [Fact] + public void GetJsonPropertyAsStringTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string property = null; + //Object body = null; + //var response = instance.GetJsonPropertyAsString(property, body); + //Assert.IsType(response); + } + + /// + /// Test GetUserInfo + /// + [Fact] + public void GetUserInfoTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetUserInfo(); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/AttachmentControllerApiTests.cs b/src/mailslurp.Test/Api/AttachmentControllerApiTests.cs new file mode 100644 index 00000000..2f176aad --- /dev/null +++ b/src/mailslurp.Test/Api/AttachmentControllerApiTests.cs @@ -0,0 +1,185 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing AttachmentControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class AttachmentControllerApiTests : IDisposable + { + private AttachmentControllerApi instance; + + public AttachmentControllerApiTests() + { + instance = new AttachmentControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AttachmentControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' AttachmentControllerApi + //Assert.IsType(instance); + } + + /// + /// Test DeleteAllAttachments + /// + [Fact] + public void DeleteAllAttachmentsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.DeleteAllAttachments(); + } + + /// + /// Test DeleteAttachment + /// + [Fact] + public void DeleteAttachmentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attachmentId = null; + //instance.DeleteAttachment(attachmentId); + } + + /// + /// Test DownloadAttachmentAsBase64Encoded + /// + [Fact] + public void DownloadAttachmentAsBase64EncodedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attachmentId = null; + //var response = instance.DownloadAttachmentAsBase64Encoded(attachmentId); + //Assert.IsType(response); + } + + /// + /// Test DownloadAttachmentAsBytes + /// + [Fact] + public void DownloadAttachmentAsBytesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attachmentId = null; + //var response = instance.DownloadAttachmentAsBytes(attachmentId); + //Assert.IsType(response); + } + + /// + /// Test GetAttachment + /// + [Fact] + public void GetAttachmentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attachmentId = null; + //var response = instance.GetAttachment(attachmentId); + //Assert.IsType(response); + } + + /// + /// Test GetAttachmentInfo + /// + [Fact] + public void GetAttachmentInfoTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attachmentId = null; + //var response = instance.GetAttachmentInfo(attachmentId); + //Assert.IsType(response); + } + + /// + /// Test GetAttachments + /// + [Fact] + public void GetAttachmentsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string fileNameFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAttachments(page, size, sort, fileNameFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test UploadAttachment + /// + [Fact] + public void UploadAttachmentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //UploadAttachmentOptions uploadAttachmentOptions = null; + //var response = instance.UploadAttachment(uploadAttachmentOptions); + //Assert.IsType>(response); + } + + /// + /// Test UploadAttachmentBytes + /// + [Fact] + public void UploadAttachmentBytesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //UploadAttachmentBytesRequest uploadAttachmentBytesRequest = null; + //string contentType = null; + //string filename = null; + //var response = instance.UploadAttachmentBytes(uploadAttachmentBytesRequest, contentType, filename); + //Assert.IsType>(response); + } + + /// + /// Test UploadMultipartForm + /// + [Fact] + public void UploadMultipartFormTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string contentType = null; + //string filename = null; + //string xFilename = null; + //UploadMultipartFormRequest uploadMultipartFormRequest = null; + //var response = instance.UploadMultipartForm(contentType, filename, xFilename, uploadMultipartFormRequest); + //Assert.IsType>(response); + } + } +} diff --git a/src/mailslurp.Test/Api/BounceControllerApiTests.cs b/src/mailslurp.Test/Api/BounceControllerApiTests.cs new file mode 100644 index 00000000..78677de1 --- /dev/null +++ b/src/mailslurp.Test/Api/BounceControllerApiTests.cs @@ -0,0 +1,157 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing BounceControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class BounceControllerApiTests : IDisposable + { + private BounceControllerApi instance; + + public BounceControllerApiTests() + { + instance = new BounceControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BounceControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' BounceControllerApi + //Assert.IsType(instance); + } + + /// + /// Test FilterBouncedRecipient + /// + [Fact] + public void FilterBouncedRecipientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //FilterBouncedRecipientsOptions filterBouncedRecipientsOptions = null; + //var response = instance.FilterBouncedRecipient(filterBouncedRecipientsOptions); + //Assert.IsType(response); + } + + /// + /// Test GetBouncedEmail + /// + [Fact] + public void GetBouncedEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetBouncedEmail(id); + //Assert.IsType(response); + } + + /// + /// Test GetBouncedEmails + /// + [Fact] + public void GetBouncedEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetBouncedEmails(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetBouncedRecipient + /// + [Fact] + public void GetBouncedRecipientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetBouncedRecipient(id); + //Assert.IsType(response); + } + + /// + /// Test GetBouncedRecipients + /// + [Fact] + public void GetBouncedRecipientsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetBouncedRecipients(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetComplaints + /// + [Fact] + public void GetComplaintsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetComplaints(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetListUnsubscribeRecipients + /// + [Fact] + public void GetListUnsubscribeRecipientsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //Guid? domainId = null; + //var response = instance.GetListUnsubscribeRecipients(page, size, sort, domainId); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/BulkActionsControllerApiTests.cs b/src/mailslurp.Test/Api/BulkActionsControllerApiTests.cs new file mode 100644 index 00000000..fa36a611 --- /dev/null +++ b/src/mailslurp.Test/Api/BulkActionsControllerApiTests.cs @@ -0,0 +1,92 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing BulkActionsControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class BulkActionsControllerApiTests : IDisposable + { + private BulkActionsControllerApi instance; + + public BulkActionsControllerApiTests() + { + instance = new BulkActionsControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BulkActionsControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' BulkActionsControllerApi + //Assert.IsType(instance); + } + + /// + /// Test BulkCreateInboxes + /// + [Fact] + public void BulkCreateInboxesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int count = null; + //var response = instance.BulkCreateInboxes(count); + //Assert.IsType>(response); + } + + /// + /// Test BulkDeleteInboxes + /// + [Fact] + public void BulkDeleteInboxesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List requestBody = null; + //instance.BulkDeleteInboxes(requestBody); + } + + /// + /// Test BulkSendEmails + /// + [Fact] + public void BulkSendEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //BulkSendEmailOptions bulkSendEmailOptions = null; + //instance.BulkSendEmails(bulkSendEmailOptions); + } + } +} diff --git a/src/mailslurp.Test/Api/CommonActionsControllerApiTests.cs b/src/mailslurp.Test/Api/CommonActionsControllerApiTests.cs new file mode 100644 index 00000000..cb95a4ba --- /dev/null +++ b/src/mailslurp.Test/Api/CommonActionsControllerApiTests.cs @@ -0,0 +1,137 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing CommonActionsControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class CommonActionsControllerApiTests : IDisposable + { + private CommonActionsControllerApi instance; + + public CommonActionsControllerApiTests() + { + instance = new CommonActionsControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CommonActionsControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' CommonActionsControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateNewEmailAddress + /// + [Fact] + public void CreateNewEmailAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //bool? allowTeamAccess = null; + //bool? useDomainPool = null; + //DateTime? expiresAt = null; + //long? expiresIn = null; + //string emailAddress = null; + //string inboxType = null; + //string description = null; + //string name = null; + //List tags = null; + //bool? favourite = null; + //bool? virtualInbox = null; + //bool? useShortAddress = null; + //var response = instance.CreateNewEmailAddress(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + //Assert.IsType(response); + } + + /// + /// Test CreateRandomInbox + /// + [Fact] + public void CreateRandomInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //bool? allowTeamAccess = null; + //bool? useDomainPool = null; + //DateTime? expiresAt = null; + //long? expiresIn = null; + //string emailAddress = null; + //string inboxType = null; + //string description = null; + //string name = null; + //List tags = null; + //bool? favourite = null; + //bool? virtualInbox = null; + //bool? useShortAddress = null; + //var response = instance.CreateRandomInbox(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + //Assert.IsType(response); + } + + /// + /// Test DeleteEmailAddress + /// + [Fact] + public void DeleteEmailAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //instance.DeleteEmailAddress(inboxId); + } + + /// + /// Test EmptyInbox + /// + [Fact] + public void EmptyInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //instance.EmptyInbox(inboxId); + } + + /// + /// Test SendEmailSimple + /// + [Fact] + public void SendEmailSimpleTest() + { + // TODO uncomment below to test the method and replace null with proper value + //SimpleSendEmailOptions simpleSendEmailOptions = null; + //instance.SendEmailSimple(simpleSendEmailOptions); + } + } +} diff --git a/src/mailslurp.Test/Api/ContactControllerApiTests.cs b/src/mailslurp.Test/Api/ContactControllerApiTests.cs new file mode 100644 index 00000000..7505ce2e --- /dev/null +++ b/src/mailslurp.Test/Api/ContactControllerApiTests.cs @@ -0,0 +1,132 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing ContactControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class ContactControllerApiTests : IDisposable + { + private ContactControllerApi instance; + + public ContactControllerApiTests() + { + instance = new ContactControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ContactControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' ContactControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateContact + /// + [Fact] + public void CreateContactTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateContactOptions createContactOptions = null; + //var response = instance.CreateContact(createContactOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteContact + /// + [Fact] + public void DeleteContactTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid contactId = null; + //instance.DeleteContact(contactId); + } + + /// + /// Test GetAllContacts + /// + [Fact] + public void GetAllContactsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAllContacts(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetContact + /// + [Fact] + public void GetContactTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid contactId = null; + //var response = instance.GetContact(contactId); + //Assert.IsType(response); + } + + /// + /// Test GetContactVCard + /// + [Fact] + public void GetContactVCardTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid contactId = null; + //var response = instance.GetContactVCard(contactId); + //Assert.IsType>(response); + } + + /// + /// Test GetContacts + /// + [Fact] + public void GetContactsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetContacts(); + //Assert.IsType>(response); + } + } +} diff --git a/src/mailslurp.Test/Api/DomainControllerApiTests.cs b/src/mailslurp.Test/Api/DomainControllerApiTests.cs new file mode 100644 index 00000000..d87023c4 --- /dev/null +++ b/src/mailslurp.Test/Api/DomainControllerApiTests.cs @@ -0,0 +1,142 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing DomainControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class DomainControllerApiTests : IDisposable + { + private DomainControllerApi instance; + + public DomainControllerApiTests() + { + instance = new DomainControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DomainControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' DomainControllerApi + //Assert.IsType(instance); + } + + /// + /// Test AddDomainWildcardCatchAll + /// + [Fact] + public void AddDomainWildcardCatchAllTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.AddDomainWildcardCatchAll(id); + //Assert.IsType(response); + } + + /// + /// Test CreateDomain + /// + [Fact] + public void CreateDomainTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateDomainOptions createDomainOptions = null; + //var response = instance.CreateDomain(createDomainOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteDomain + /// + [Fact] + public void DeleteDomainTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.DeleteDomain(id); + //Assert.IsType>(response); + } + + /// + /// Test GetDomain + /// + [Fact] + public void GetDomainTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetDomain(id); + //Assert.IsType(response); + } + + /// + /// Test GetDomainWildcardCatchAllInbox + /// + [Fact] + public void GetDomainWildcardCatchAllInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetDomainWildcardCatchAllInbox(id); + //Assert.IsType(response); + } + + /// + /// Test GetDomains + /// + [Fact] + public void GetDomainsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetDomains(); + //Assert.IsType>(response); + } + + /// + /// Test UpdateDomain + /// + [Fact] + public void UpdateDomainTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //UpdateDomainOptions updateDomainOptions = null; + //var response = instance.UpdateDomain(id, updateDomainOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/EmailControllerApiTests.cs b/src/mailslurp.Test/Api/EmailControllerApiTests.cs new file mode 100644 index 00000000..fe823775 --- /dev/null +++ b/src/mailslurp.Test/Api/EmailControllerApiTests.cs @@ -0,0 +1,457 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing EmailControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class EmailControllerApiTests : IDisposable + { + private EmailControllerApi instance; + + public EmailControllerApiTests() + { + instance = new EmailControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' EmailControllerApi + //Assert.IsType(instance); + } + + /// + /// Test ApplyImapFlagOperation + /// + [Fact] + public void ApplyImapFlagOperationTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //ImapFlagOperationOptions imapFlagOperationOptions = null; + //var response = instance.ApplyImapFlagOperation(emailId, imapFlagOperationOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteAllEmails + /// + [Fact] + public void DeleteAllEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.DeleteAllEmails(); + } + + /// + /// Test DeleteEmail + /// + [Fact] + public void DeleteEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //instance.DeleteEmail(emailId); + } + + /// + /// Test DownloadAttachment + /// + [Fact] + public void DownloadAttachmentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //string attachmentId = null; + //string apiKey = null; + //var response = instance.DownloadAttachment(emailId, attachmentId, apiKey); + //Assert.IsType(response); + } + + /// + /// Test DownloadAttachmentBase64 + /// + [Fact] + public void DownloadAttachmentBase64Test() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //string attachmentId = null; + //var response = instance.DownloadAttachmentBase64(emailId, attachmentId); + //Assert.IsType(response); + } + + /// + /// Test DownloadBody + /// + [Fact] + public void DownloadBodyTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.DownloadBody(emailId); + //Assert.IsType(response); + } + + /// + /// Test DownloadBodyBytes + /// + [Fact] + public void DownloadBodyBytesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.DownloadBodyBytes(emailId); + //Assert.IsType(response); + } + + /// + /// Test ForwardEmail + /// + [Fact] + public void ForwardEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //ForwardEmailOptions forwardEmailOptions = null; + //var response = instance.ForwardEmail(emailId, forwardEmailOptions); + //Assert.IsType(response); + } + + /// + /// Test GetAttachmentMetaData + /// + [Fact] + public void GetAttachmentMetaDataTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //string attachmentId = null; + //var response = instance.GetAttachmentMetaData(emailId, attachmentId); + //Assert.IsType(response); + } + + /// + /// Test GetEmail + /// + [Fact] + public void GetEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //bool? decode = null; + //var response = instance.GetEmail(emailId, decode); + //Assert.IsType(response); + } + + /// + /// Test GetEmailAttachments + /// + [Fact] + public void GetEmailAttachmentsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.GetEmailAttachments(emailId); + //Assert.IsType>(response); + } + + /// + /// Test GetEmailContentMatch + /// + [Fact] + public void GetEmailContentMatchTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //ContentMatchOptions contentMatchOptions = null; + //var response = instance.GetEmailContentMatch(emailId, contentMatchOptions); + //Assert.IsType(response); + } + + /// + /// Test GetEmailCount + /// + [Fact] + public void GetEmailCountTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetEmailCount(); + //Assert.IsType(response); + } + + /// + /// Test GetEmailHTML + /// + [Fact] + public void GetEmailHTMLTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //bool? decode = null; + //var response = instance.GetEmailHTML(emailId, decode); + //Assert.IsType(response); + } + + /// + /// Test GetEmailHTMLJson + /// + [Fact] + public void GetEmailHTMLJsonTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //bool? decode = null; + //var response = instance.GetEmailHTMLJson(emailId, decode); + //Assert.IsType(response); + } + + /// + /// Test GetEmailHTMLQuery + /// + [Fact] + public void GetEmailHTMLQueryTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //string htmlSelector = null; + //var response = instance.GetEmailHTMLQuery(emailId, htmlSelector); + //Assert.IsType(response); + } + + /// + /// Test GetEmailLinks + /// + [Fact] + public void GetEmailLinksTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.GetEmailLinks(emailId); + //Assert.IsType(response); + } + + /// + /// Test GetEmailPreviewURLs + /// + [Fact] + public void GetEmailPreviewURLsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.GetEmailPreviewURLs(emailId); + //Assert.IsType(response); + } + + /// + /// Test GetEmailTextLines + /// + [Fact] + public void GetEmailTextLinesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //bool? decodeHtmlEntities = null; + //string lineSeparator = null; + //var response = instance.GetEmailTextLines(emailId, decodeHtmlEntities, lineSeparator); + //Assert.IsType(response); + } + + /// + /// Test GetEmailsPaginated + /// + [Fact] + public void GetEmailsPaginatedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //bool? unreadOnly = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetEmailsPaginated(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetGravatarUrlForEmailAddress + /// + [Fact] + public void GetGravatarUrlForEmailAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string emailAddress = null; + //string size = null; + //var response = instance.GetGravatarUrlForEmailAddress(emailAddress, size); + //Assert.IsType(response); + } + + /// + /// Test GetLatestEmail + /// + [Fact] + public void GetLatestEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List inboxIds = null; + //var response = instance.GetLatestEmail(inboxIds); + //Assert.IsType(response); + } + + /// + /// Test GetLatestEmailInInbox1 + /// + [Fact] + public void GetLatestEmailInInbox1Test() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //var response = instance.GetLatestEmailInInbox1(inboxId); + //Assert.IsType(response); + } + + /// + /// Test GetOrganizationEmailsPaginated + /// + [Fact] + public void GetOrganizationEmailsPaginatedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //bool? unreadOnly = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetOrganizationEmailsPaginated(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetRawEmailContents + /// + [Fact] + public void GetRawEmailContentsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.GetRawEmailContents(emailId); + //Assert.IsType(response); + } + + /// + /// Test GetRawEmailJson + /// + [Fact] + public void GetRawEmailJsonTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.GetRawEmailJson(emailId); + //Assert.IsType(response); + } + + /// + /// Test GetUnreadEmailCount + /// + [Fact] + public void GetUnreadEmailCountTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetUnreadEmailCount(); + //Assert.IsType(response); + } + + /// + /// Test MarkAsRead + /// + [Fact] + public void MarkAsReadTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //bool? read = null; + //var response = instance.MarkAsRead(emailId, read); + //Assert.IsType(response); + } + + /// + /// Test ReplyToEmail + /// + [Fact] + public void ReplyToEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //ReplyToEmailOptions replyToEmailOptions = null; + //var response = instance.ReplyToEmail(emailId, replyToEmailOptions); + //Assert.IsType(response); + } + + /// + /// Test SendEmailSourceOptional + /// + [Fact] + public void SendEmailSourceOptionalTest() + { + // TODO uncomment below to test the method and replace null with proper value + //SendEmailOptions sendEmailOptions = null; + //Guid? inboxId = null; + //bool? useDomainPool = null; + //bool? virtualSend = null; + //instance.SendEmailSourceOptional(sendEmailOptions, inboxId, useDomainPool, virtualSend); + } + + /// + /// Test ValidateEmail + /// + [Fact] + public void ValidateEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.ValidateEmail(emailId); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/EmailVerificationControllerApiTests.cs b/src/mailslurp.Test/Api/EmailVerificationControllerApiTests.cs new file mode 100644 index 00000000..e68d5064 --- /dev/null +++ b/src/mailslurp.Test/Api/EmailVerificationControllerApiTests.cs @@ -0,0 +1,88 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing EmailVerificationControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class EmailVerificationControllerApiTests : IDisposable + { + private EmailVerificationControllerApi instance; + + public EmailVerificationControllerApiTests() + { + instance = new EmailVerificationControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailVerificationControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' EmailVerificationControllerApi + //Assert.IsType(instance); + } + + /// + /// Test GetValidationRequests + /// + [Fact] + public void GetValidationRequestsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //bool? isValid = null; + //var response = instance.GetValidationRequests(page, size, sort, searchFilter, since, before, isValid); + //Assert.IsType(response); + } + + /// + /// Test ValidateEmailAddressList + /// + [Fact] + public void ValidateEmailAddressListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //ValidateEmailAddressListOptions validateEmailAddressListOptions = null; + //var response = instance.ValidateEmailAddressList(validateEmailAddressListOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/ExpiredControllerApiTests.cs b/src/mailslurp.Test/Api/ExpiredControllerApiTests.cs new file mode 100644 index 00000000..ad193051 --- /dev/null +++ b/src/mailslurp.Test/Api/ExpiredControllerApiTests.cs @@ -0,0 +1,109 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing ExpiredControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class ExpiredControllerApiTests : IDisposable + { + private ExpiredControllerApi instance; + + public ExpiredControllerApiTests() + { + instance = new ExpiredControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExpiredControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' ExpiredControllerApi + //Assert.IsType(instance); + } + + /// + /// Test GetExpirationDefaults + /// + [Fact] + public void GetExpirationDefaultsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetExpirationDefaults(); + //Assert.IsType(response); + } + + /// + /// Test GetExpiredInboxByInboxId + /// + [Fact] + public void GetExpiredInboxByInboxIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //var response = instance.GetExpiredInboxByInboxId(inboxId); + //Assert.IsType(response); + } + + /// + /// Test GetExpiredInboxRecord + /// + [Fact] + public void GetExpiredInboxRecordTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid expiredId = null; + //var response = instance.GetExpiredInboxRecord(expiredId); + //Assert.IsType(response); + } + + /// + /// Test GetExpiredInboxes + /// + [Fact] + public void GetExpiredInboxesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetExpiredInboxes(page, size, sort, since, before); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/ExportControllerApiTests.cs b/src/mailslurp.Test/Api/ExportControllerApiTests.cs new file mode 100644 index 00000000..b9255d14 --- /dev/null +++ b/src/mailslurp.Test/Api/ExportControllerApiTests.cs @@ -0,0 +1,91 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing ExportControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class ExportControllerApiTests : IDisposable + { + private ExportControllerApi instance; + + public ExportControllerApiTests() + { + instance = new ExportControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExportControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' ExportControllerApi + //Assert.IsType(instance); + } + + /// + /// Test ExportEntities + /// + [Fact] + public void ExportEntitiesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string exportType = null; + //string apiKey = null; + //string outputFormat = null; + //string filter = null; + //string listSeparatorToken = null; + //bool? excludePreviouslyExported = null; + //DateTime? createdEarliestTime = null; + //DateTime? createdOldestTime = null; + //var response = instance.ExportEntities(exportType, apiKey, outputFormat, filter, listSeparatorToken, excludePreviouslyExported, createdEarliestTime, createdOldestTime); + //Assert.IsType>(response); + } + + /// + /// Test GetExportLink + /// + [Fact] + public void GetExportLinkTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string exportType = null; + //ExportOptions exportOptions = null; + //string apiKey = null; + //var response = instance.GetExportLink(exportType, exportOptions, apiKey); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/FormControllerApiTests.cs b/src/mailslurp.Test/Api/FormControllerApiTests.cs new file mode 100644 index 00000000..78841059 --- /dev/null +++ b/src/mailslurp.Test/Api/FormControllerApiTests.cs @@ -0,0 +1,74 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing FormControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class FormControllerApiTests : IDisposable + { + private FormControllerApi instance; + + public FormControllerApiTests() + { + instance = new FormControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FormControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' FormControllerApi + //Assert.IsType(instance); + } + + /// + /// Test SubmitForm + /// + [Fact] + public void SubmitFormTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string to = null; + //string subject = null; + //string redirectTo = null; + //string emailAddress = null; + //string successMessage = null; + //string spamCheck = null; + //string otherParameters = null; + //var response = instance.SubmitForm(to, subject, redirectTo, emailAddress, successMessage, spamCheck, otherParameters); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/GroupControllerApiTests.cs b/src/mailslurp.Test/Api/GroupControllerApiTests.cs new file mode 100644 index 00000000..0ec5a5c7 --- /dev/null +++ b/src/mailslurp.Test/Api/GroupControllerApiTests.cs @@ -0,0 +1,175 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing GroupControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class GroupControllerApiTests : IDisposable + { + private GroupControllerApi instance; + + public GroupControllerApiTests() + { + instance = new GroupControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GroupControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' GroupControllerApi + //Assert.IsType(instance); + } + + /// + /// Test AddContactsToGroup + /// + [Fact] + public void AddContactsToGroupTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid groupId = null; + //UpdateGroupContacts updateGroupContacts = null; + //var response = instance.AddContactsToGroup(groupId, updateGroupContacts); + //Assert.IsType(response); + } + + /// + /// Test CreateGroup + /// + [Fact] + public void CreateGroupTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateGroupOptions createGroupOptions = null; + //var response = instance.CreateGroup(createGroupOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteGroup + /// + [Fact] + public void DeleteGroupTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid groupId = null; + //instance.DeleteGroup(groupId); + } + + /// + /// Test GetAllGroups + /// + [Fact] + public void GetAllGroupsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAllGroups(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetGroup + /// + [Fact] + public void GetGroupTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid groupId = null; + //var response = instance.GetGroup(groupId); + //Assert.IsType(response); + } + + /// + /// Test GetGroupWithContacts + /// + [Fact] + public void GetGroupWithContactsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid groupId = null; + //var response = instance.GetGroupWithContacts(groupId); + //Assert.IsType(response); + } + + /// + /// Test GetGroupWithContactsPaginated + /// + [Fact] + public void GetGroupWithContactsPaginatedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid groupId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetGroupWithContactsPaginated(groupId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetGroups + /// + [Fact] + public void GetGroupsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetGroups(); + //Assert.IsType>(response); + } + + /// + /// Test RemoveContactsFromGroup + /// + [Fact] + public void RemoveContactsFromGroupTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid groupId = null; + //UpdateGroupContacts updateGroupContacts = null; + //var response = instance.RemoveContactsFromGroup(groupId, updateGroupContacts); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/InboxControllerApiTests.cs b/src/mailslurp.Test/Api/InboxControllerApiTests.cs new file mode 100644 index 00000000..42c86823 --- /dev/null +++ b/src/mailslurp.Test/Api/InboxControllerApiTests.cs @@ -0,0 +1,604 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing InboxControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class InboxControllerApiTests : IDisposable + { + private InboxControllerApi instance; + + public InboxControllerApiTests() + { + instance = new InboxControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' InboxControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CancelScheduledJob + /// + [Fact] + public void CancelScheduledJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid jobId = null; + //var response = instance.CancelScheduledJob(jobId); + //Assert.IsType(response); + } + + /// + /// Test CreateInbox + /// + [Fact] + public void CreateInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string emailAddress = null; + //List tags = null; + //string name = null; + //string description = null; + //bool? useDomainPool = null; + //bool? favourite = null; + //DateTime? expiresAt = null; + //long? expiresIn = null; + //bool? allowTeamAccess = null; + //string inboxType = null; + //bool? virtualInbox = null; + //bool? useShortAddress = null; + //var response = instance.CreateInbox(emailAddress, tags, name, description, useDomainPool, favourite, expiresAt, expiresIn, allowTeamAccess, inboxType, virtualInbox, useShortAddress); + //Assert.IsType(response); + } + + /// + /// Test CreateInboxRuleset + /// + [Fact] + public void CreateInboxRulesetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //CreateInboxRulesetOptions createInboxRulesetOptions = null; + //var response = instance.CreateInboxRuleset(inboxId, createInboxRulesetOptions); + //Assert.IsType(response); + } + + /// + /// Test CreateInboxWithDefaults + /// + [Fact] + public void CreateInboxWithDefaultsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.CreateInboxWithDefaults(); + //Assert.IsType(response); + } + + /// + /// Test CreateInboxWithOptions + /// + [Fact] + public void CreateInboxWithOptionsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateInboxDto createInboxDto = null; + //var response = instance.CreateInboxWithOptions(createInboxDto); + //Assert.IsType(response); + } + + /// + /// Test DeleteAllInboxEmails + /// + [Fact] + public void DeleteAllInboxEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //instance.DeleteAllInboxEmails(inboxId); + } + + /// + /// Test DeleteAllInboxes + /// + [Fact] + public void DeleteAllInboxesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.DeleteAllInboxes(); + } + + /// + /// Test DeleteInbox + /// + [Fact] + public void DeleteInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //instance.DeleteInbox(inboxId); + } + + /// + /// Test DoesInboxExist + /// + [Fact] + public void DoesInboxExistTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string emailAddress = null; + //bool? allowCatchAll = null; + //var response = instance.DoesInboxExist(emailAddress, allowCatchAll); + //Assert.IsType(response); + } + + /// + /// Test FlushExpired + /// + [Fact] + public void FlushExpiredTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DateTime? before = null; + //var response = instance.FlushExpired(before); + //Assert.IsType(response); + } + + /// + /// Test GetAllInboxes + /// + [Fact] + public void GetAllInboxesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //bool? favourite = null; + //string search = null; + //string tag = null; + //bool? teamAccess = null; + //DateTime? since = null; + //DateTime? before = null; + //string inboxType = null; + //Guid? domainId = null; + //var response = instance.GetAllInboxes(page, size, sort, favourite, search, tag, teamAccess, since, before, inboxType, domainId); + //Assert.IsType(response); + } + + /// + /// Test GetAllScheduledJobs + /// + [Fact] + public void GetAllScheduledJobsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAllScheduledJobs(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetDeliveryStatusesByInboxId + /// + [Fact] + public void GetDeliveryStatusesByInboxIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetDeliveryStatusesByInboxId(inboxId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetEmails + /// + [Fact] + public void GetEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? size = null; + //int? limit = null; + //string sort = null; + //long? retryTimeout = null; + //long? delayTimeout = null; + //long? minCount = null; + //bool? unreadOnly = null; + //DateTime? before = null; + //DateTime? since = null; + //var response = instance.GetEmails(inboxId, size, limit, sort, retryTimeout, delayTimeout, minCount, unreadOnly, before, since); + //Assert.IsType>(response); + } + + /// + /// Test GetImapSmtpAccess + /// + [Fact] + public void GetImapSmtpAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //var response = instance.GetImapSmtpAccess(inboxId); + //Assert.IsType(response); + } + + /// + /// Test GetInbox + /// + [Fact] + public void GetInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //var response = instance.GetInbox(inboxId); + //Assert.IsType(response); + } + + /// + /// Test GetInboxByEmailAddress + /// + [Fact] + public void GetInboxByEmailAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string emailAddress = null; + //var response = instance.GetInboxByEmailAddress(emailAddress); + //Assert.IsType(response); + } + + /// + /// Test GetInboxByName + /// + [Fact] + public void GetInboxByNameTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string name = null; + //var response = instance.GetInboxByName(name); + //Assert.IsType(response); + } + + /// + /// Test GetInboxCount + /// + [Fact] + public void GetInboxCountTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetInboxCount(); + //Assert.IsType(response); + } + + /// + /// Test GetInboxEmailCount + /// + [Fact] + public void GetInboxEmailCountTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //var response = instance.GetInboxEmailCount(inboxId); + //Assert.IsType(response); + } + + /// + /// Test GetInboxEmailsPaginated + /// + [Fact] + public void GetInboxEmailsPaginatedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetInboxEmailsPaginated(inboxId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetInboxIds + /// + [Fact] + public void GetInboxIdsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetInboxIds(); + //Assert.IsType(response); + } + + /// + /// Test GetInboxSentEmails + /// + [Fact] + public void GetInboxSentEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetInboxSentEmails(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetInboxTags + /// + [Fact] + public void GetInboxTagsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetInboxTags(); + //Assert.IsType>(response); + } + + /// + /// Test GetInboxes + /// + [Fact] + public void GetInboxesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetInboxes(size, sort, since, before); + //Assert.IsType>(response); + } + + /// + /// Test GetLatestEmailInInbox + /// + [Fact] + public void GetLatestEmailInInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //long timeoutMillis = null; + //var response = instance.GetLatestEmailInInbox(inboxId, timeoutMillis); + //Assert.IsType(response); + } + + /// + /// Test GetOrganizationInboxes + /// + [Fact] + public void GetOrganizationInboxesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetOrganizationInboxes(page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetScheduledJob + /// + [Fact] + public void GetScheduledJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid jobId = null; + //var response = instance.GetScheduledJob(jobId); + //Assert.IsType(response); + } + + /// + /// Test GetScheduledJobsByInboxId + /// + [Fact] + public void GetScheduledJobsByInboxIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetScheduledJobsByInboxId(inboxId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test ListInboxRulesets + /// + [Fact] + public void ListInboxRulesetsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.ListInboxRulesets(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test ListInboxTrackingPixels + /// + [Fact] + public void ListInboxTrackingPixelsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.ListInboxTrackingPixels(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test SendEmail + /// + [Fact] + public void SendEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //SendEmailOptions sendEmailOptions = null; + //instance.SendEmail(inboxId, sendEmailOptions); + } + + /// + /// Test SendEmailAndConfirm + /// + [Fact] + public void SendEmailAndConfirmTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //SendEmailOptions sendEmailOptions = null; + //var response = instance.SendEmailAndConfirm(inboxId, sendEmailOptions); + //Assert.IsType(response); + } + + /// + /// Test SendEmailWithQueue + /// + [Fact] + public void SendEmailWithQueueTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //bool validateBeforeEnqueue = null; + //SendEmailOptions sendEmailOptions = null; + //instance.SendEmailWithQueue(inboxId, validateBeforeEnqueue, sendEmailOptions); + } + + /// + /// Test SendSmtpEnvelope + /// + [Fact] + public void SendSmtpEnvelopeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions = null; + //var response = instance.SendSmtpEnvelope(inboxId, sendSMTPEnvelopeOptions); + //Assert.IsType(response); + } + + /// + /// Test SendTestEmail + /// + [Fact] + public void SendTestEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //instance.SendTestEmail(inboxId); + } + + /// + /// Test SendWithSchedule + /// + [Fact] + public void SendWithScheduleTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //SendEmailOptions sendEmailOptions = null; + //DateTime? sendAtTimestamp = null; + //long? sendAtNowPlusSeconds = null; + //bool? validateBeforeEnqueue = null; + //var response = instance.SendWithSchedule(inboxId, sendEmailOptions, sendAtTimestamp, sendAtNowPlusSeconds, validateBeforeEnqueue); + //Assert.IsType(response); + } + + /// + /// Test SetInboxFavourited + /// + [Fact] + public void SetInboxFavouritedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //SetInboxFavouritedOptions setInboxFavouritedOptions = null; + //var response = instance.SetInboxFavourited(inboxId, setInboxFavouritedOptions); + //Assert.IsType(response); + } + + /// + /// Test UpdateInbox + /// + [Fact] + public void UpdateInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //UpdateInboxOptions updateInboxOptions = null; + //var response = instance.UpdateInbox(inboxId, updateInboxOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/InboxForwarderControllerApiTests.cs b/src/mailslurp.Test/Api/InboxForwarderControllerApiTests.cs new file mode 100644 index 00000000..382ae688 --- /dev/null +++ b/src/mailslurp.Test/Api/InboxForwarderControllerApiTests.cs @@ -0,0 +1,189 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing InboxForwarderControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class InboxForwarderControllerApiTests : IDisposable + { + private InboxForwarderControllerApi instance; + + public InboxForwarderControllerApiTests() + { + instance = new InboxForwarderControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxForwarderControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' InboxForwarderControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateNewInboxForwarder + /// + [Fact] + public void CreateNewInboxForwarderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //CreateInboxForwarderOptions createInboxForwarderOptions = null; + //var response = instance.CreateNewInboxForwarder(inboxId, createInboxForwarderOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteInboxForwarder + /// + [Fact] + public void DeleteInboxForwarderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //instance.DeleteInboxForwarder(id); + } + + /// + /// Test DeleteInboxForwarders + /// + [Fact] + public void DeleteInboxForwardersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //instance.DeleteInboxForwarders(inboxId); + } + + /// + /// Test GetInboxForwarder + /// + [Fact] + public void GetInboxForwarderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetInboxForwarder(id); + //Assert.IsType(response); + } + + /// + /// Test GetInboxForwarderEvents + /// + [Fact] + public void GetInboxForwarderEventsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //int? page = null; + //int? size = null; + //string sort = null; + //var response = instance.GetInboxForwarderEvents(id, page, size, sort); + //Assert.IsType(response); + } + + /// + /// Test GetInboxForwarders + /// + [Fact] + public void GetInboxForwardersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetInboxForwarders(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test TestInboxForwarder + /// + [Fact] + public void TestInboxForwarderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //InboxForwarderTestOptions inboxForwarderTestOptions = null; + //var response = instance.TestInboxForwarder(id, inboxForwarderTestOptions); + //Assert.IsType(response); + } + + /// + /// Test TestInboxForwardersForInbox + /// + [Fact] + public void TestInboxForwardersForInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //InboxForwarderTestOptions inboxForwarderTestOptions = null; + //var response = instance.TestInboxForwardersForInbox(inboxId, inboxForwarderTestOptions); + //Assert.IsType(response); + } + + /// + /// Test TestNewInboxForwarder + /// + [Fact] + public void TestNewInboxForwarderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TestNewInboxForwarderOptions testNewInboxForwarderOptions = null; + //var response = instance.TestNewInboxForwarder(testNewInboxForwarderOptions); + //Assert.IsType(response); + } + + /// + /// Test UpdateInboxForwarder + /// + [Fact] + public void UpdateInboxForwarderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //CreateInboxForwarderOptions createInboxForwarderOptions = null; + //var response = instance.UpdateInboxForwarder(id, createInboxForwarderOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/InboxRulesetControllerApiTests.cs b/src/mailslurp.Test/Api/InboxRulesetControllerApiTests.cs new file mode 100644 index 00000000..e95ddb28 --- /dev/null +++ b/src/mailslurp.Test/Api/InboxRulesetControllerApiTests.cs @@ -0,0 +1,161 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing InboxRulesetControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class InboxRulesetControllerApiTests : IDisposable + { + private InboxRulesetControllerApi instance; + + public InboxRulesetControllerApiTests() + { + instance = new InboxRulesetControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxRulesetControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' InboxRulesetControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateNewInboxRuleset + /// + [Fact] + public void CreateNewInboxRulesetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //CreateInboxRulesetOptions createInboxRulesetOptions = null; + //var response = instance.CreateNewInboxRuleset(inboxId, createInboxRulesetOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteInboxRuleset + /// + [Fact] + public void DeleteInboxRulesetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //instance.DeleteInboxRuleset(id); + } + + /// + /// Test DeleteInboxRulesets + /// + [Fact] + public void DeleteInboxRulesetsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //instance.DeleteInboxRulesets(inboxId); + } + + /// + /// Test GetInboxRuleset + /// + [Fact] + public void GetInboxRulesetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetInboxRuleset(id); + //Assert.IsType(response); + } + + /// + /// Test GetInboxRulesets + /// + [Fact] + public void GetInboxRulesetsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetInboxRulesets(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test TestInboxRuleset + /// + [Fact] + public void TestInboxRulesetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //InboxRulesetTestOptions inboxRulesetTestOptions = null; + //var response = instance.TestInboxRuleset(id, inboxRulesetTestOptions); + //Assert.IsType(response); + } + + /// + /// Test TestInboxRulesetsForInbox + /// + [Fact] + public void TestInboxRulesetsForInboxTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //InboxRulesetTestOptions inboxRulesetTestOptions = null; + //var response = instance.TestInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions); + //Assert.IsType(response); + } + + /// + /// Test TestNewInboxRuleset + /// + [Fact] + public void TestNewInboxRulesetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TestNewInboxRulesetOptions testNewInboxRulesetOptions = null; + //var response = instance.TestNewInboxRuleset(testNewInboxRulesetOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/MailServerControllerApiTests.cs b/src/mailslurp.Test/Api/MailServerControllerApiTests.cs new file mode 100644 index 00000000..70a537ca --- /dev/null +++ b/src/mailslurp.Test/Api/MailServerControllerApiTests.cs @@ -0,0 +1,106 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing MailServerControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class MailServerControllerApiTests : IDisposable + { + private MailServerControllerApi instance; + + public MailServerControllerApiTests() + { + instance = new MailServerControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MailServerControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' MailServerControllerApi + //Assert.IsType(instance); + } + + /// + /// Test DescribeMailServerDomain + /// + [Fact] + public void DescribeMailServerDomainTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DescribeDomainOptions describeDomainOptions = null; + //var response = instance.DescribeMailServerDomain(describeDomainOptions); + //Assert.IsType(response); + } + + /// + /// Test GetDnsLookup + /// + [Fact] + public void GetDnsLookupTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DNSLookupOptions dNSLookupOptions = null; + //var response = instance.GetDnsLookup(dNSLookupOptions); + //Assert.IsType(response); + } + + /// + /// Test GetIpAddress + /// + [Fact] + public void GetIpAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string name = null; + //var response = instance.GetIpAddress(name); + //Assert.IsType(response); + } + + /// + /// Test VerifyEmailAddress + /// + [Fact] + public void VerifyEmailAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //VerifyEmailAddressOptions verifyEmailAddressOptions = null; + //var response = instance.VerifyEmailAddress(verifyEmailAddressOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/MissedEmailControllerApiTests.cs b/src/mailslurp.Test/Api/MissedEmailControllerApiTests.cs new file mode 100644 index 00000000..9747410a --- /dev/null +++ b/src/mailslurp.Test/Api/MissedEmailControllerApiTests.cs @@ -0,0 +1,132 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing MissedEmailControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class MissedEmailControllerApiTests : IDisposable + { + private MissedEmailControllerApi instance; + + public MissedEmailControllerApiTests() + { + instance = new MissedEmailControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MissedEmailControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' MissedEmailControllerApi + //Assert.IsType(instance); + } + + /// + /// Test GetAllMissedEmails + /// + [Fact] + public void GetAllMissedEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //Guid? inboxId = null; + //var response = instance.GetAllMissedEmails(page, size, sort, searchFilter, since, before, inboxId); + //Assert.IsType(response); + } + + /// + /// Test GetAllUnknownMissedEmails + /// + [Fact] + public void GetAllUnknownMissedEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //Guid? inboxId = null; + //var response = instance.GetAllUnknownMissedEmails(page, size, sort, searchFilter, since, before, inboxId); + //Assert.IsType(response); + } + + /// + /// Test GetMissedEmail + /// + [Fact] + public void GetMissedEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid missedEmailId = null; + //var response = instance.GetMissedEmail(missedEmailId); + //Assert.IsType(response); + } + + /// + /// Test RestoreMissedEmails + /// + [Fact] + public void RestoreMissedEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.RestoreMissedEmails(); + } + + /// + /// Test WaitForNthMissedEmail + /// + [Fact] + public void WaitForNthMissedEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int index = null; + //Guid? inboxId = null; + //long? timeout = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.WaitForNthMissedEmail(index, inboxId, timeout, since, before); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/PhoneControllerApiTests.cs b/src/mailslurp.Test/Api/PhoneControllerApiTests.cs new file mode 100644 index 00000000..058fe53f --- /dev/null +++ b/src/mailslurp.Test/Api/PhoneControllerApiTests.cs @@ -0,0 +1,169 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing PhoneControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class PhoneControllerApiTests : IDisposable + { + private PhoneControllerApi instance; + + public PhoneControllerApiTests() + { + instance = new PhoneControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PhoneControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' PhoneControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateEmergencyAddress + /// + [Fact] + public void CreateEmergencyAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateEmergencyAddressOptions createEmergencyAddressOptions = null; + //var response = instance.CreateEmergencyAddress(createEmergencyAddressOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteEmergencyAddress + /// + [Fact] + public void DeleteEmergencyAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid addressId = null; + //var response = instance.DeleteEmergencyAddress(addressId); + //Assert.IsType(response); + } + + /// + /// Test DeletePhoneNumber + /// + [Fact] + public void DeletePhoneNumberTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid phoneNumberId = null; + //instance.DeletePhoneNumber(phoneNumberId); + } + + /// + /// Test GetEmergencyAddress + /// + [Fact] + public void GetEmergencyAddressTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid addressId = null; + //var response = instance.GetEmergencyAddress(addressId); + //Assert.IsType(response); + } + + /// + /// Test GetEmergencyAddresses + /// + [Fact] + public void GetEmergencyAddressesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetEmergencyAddresses(); + //Assert.IsType>(response); + } + + /// + /// Test GetPhoneNumber + /// + [Fact] + public void GetPhoneNumberTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid phoneNumberId = null; + //var response = instance.GetPhoneNumber(phoneNumberId); + //Assert.IsType(response); + } + + /// + /// Test GetPhoneNumbers + /// + [Fact] + public void GetPhoneNumbersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string phoneCountry = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetPhoneNumbers(phoneCountry, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetPhonePlans + /// + [Fact] + public void GetPhonePlansTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetPhonePlans(); + //Assert.IsType>(response); + } + + /// + /// Test TestPhoneNumberSendSms + /// + [Fact] + public void TestPhoneNumberSendSmsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid phoneNumberId = null; + //TestPhoneNumberOptions testPhoneNumberOptions = null; + //string xTestId = null; + //instance.TestPhoneNumberSendSms(phoneNumberId, testPhoneNumberOptions, xTestId); + } + } +} diff --git a/src/mailslurp.Test/Api/SentEmailsControllerApiTests.cs b/src/mailslurp.Test/Api/SentEmailsControllerApiTests.cs new file mode 100644 index 00000000..fe689844 --- /dev/null +++ b/src/mailslurp.Test/Api/SentEmailsControllerApiTests.cs @@ -0,0 +1,288 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing SentEmailsControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class SentEmailsControllerApiTests : IDisposable + { + private SentEmailsControllerApi instance; + + public SentEmailsControllerApiTests() + { + instance = new SentEmailsControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SentEmailsControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' SentEmailsControllerApi + //Assert.IsType(instance); + } + + /// + /// Test DeleteAllSentEmails + /// + [Fact] + public void DeleteAllSentEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.DeleteAllSentEmails(); + } + + /// + /// Test DeleteSentEmail + /// + [Fact] + public void DeleteSentEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //instance.DeleteSentEmail(id); + } + + /// + /// Test GetAllSentTrackingPixels + /// + [Fact] + public void GetAllSentTrackingPixelsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAllSentTrackingPixels(page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetRawSentEmailContents + /// + [Fact] + public void GetRawSentEmailContentsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.GetRawSentEmailContents(emailId); + //Assert.IsType(response); + } + + /// + /// Test GetRawSentEmailJson + /// + [Fact] + public void GetRawSentEmailJsonTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid emailId = null; + //var response = instance.GetRawSentEmailJson(emailId); + //Assert.IsType(response); + } + + /// + /// Test GetSentDeliveryStatus + /// + [Fact] + public void GetSentDeliveryStatusTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid deliveryId = null; + //var response = instance.GetSentDeliveryStatus(deliveryId); + //Assert.IsType(response); + } + + /// + /// Test GetSentDeliveryStatuses + /// + [Fact] + public void GetSentDeliveryStatusesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetSentDeliveryStatuses(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetSentDeliveryStatusesBySentId + /// + [Fact] + public void GetSentDeliveryStatusesBySentIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid sentId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetSentDeliveryStatusesBySentId(sentId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetSentEmail + /// + [Fact] + public void GetSentEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetSentEmail(id); + //Assert.IsType(response); + } + + /// + /// Test GetSentEmailHTMLContent + /// + [Fact] + public void GetSentEmailHTMLContentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetSentEmailHTMLContent(id); + //Assert.IsType(response); + } + + /// + /// Test GetSentEmailPreviewURLs + /// + [Fact] + public void GetSentEmailPreviewURLsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetSentEmailPreviewURLs(id); + //Assert.IsType(response); + } + + /// + /// Test GetSentEmailTrackingPixels + /// + [Fact] + public void GetSentEmailTrackingPixelsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetSentEmailTrackingPixels(id, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetSentEmails + /// + [Fact] + public void GetSentEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetSentEmails(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetSentEmailsWithQueueResults + /// + [Fact] + public void GetSentEmailsWithQueueResultsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetSentEmailsWithQueueResults(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetSentOrganizationEmails + /// + [Fact] + public void GetSentOrganizationEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetSentOrganizationEmails(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test WaitForDeliveryStatuses + /// + [Fact] + public void WaitForDeliveryStatusesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? sentId = null; + //Guid? inboxId = null; + //long? timeout = null; + //int? index = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.WaitForDeliveryStatuses(sentId, inboxId, timeout, index, since, before); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/SmsControllerApiTests.cs b/src/mailslurp.Test/Api/SmsControllerApiTests.cs new file mode 100644 index 00000000..924d04f2 --- /dev/null +++ b/src/mailslurp.Test/Api/SmsControllerApiTests.cs @@ -0,0 +1,110 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing SmsControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class SmsControllerApiTests : IDisposable + { + private SmsControllerApi instance; + + public SmsControllerApiTests() + { + instance = new SmsControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SmsControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' SmsControllerApi + //Assert.IsType(instance); + } + + /// + /// Test DeleteSmsMessage + /// + [Fact] + public void DeleteSmsMessageTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid smsId = null; + //instance.DeleteSmsMessage(smsId); + } + + /// + /// Test DeleteSmsMessages + /// + [Fact] + public void DeleteSmsMessagesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? phoneNumberId = null; + //instance.DeleteSmsMessages(phoneNumberId); + } + + /// + /// Test GetSmsMessage + /// + [Fact] + public void GetSmsMessageTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid smsId = null; + //var response = instance.GetSmsMessage(smsId); + //Assert.IsType(response); + } + + /// + /// Test GetSmsMessagesPaginated + /// + [Fact] + public void GetSmsMessagesPaginatedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? phoneNumber = null; + //int? page = null; + //int? size = null; + //string sort = null; + //bool? unreadOnly = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetSmsMessagesPaginated(phoneNumber, page, size, sort, unreadOnly, since, before); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/TemplateControllerApiTests.cs b/src/mailslurp.Test/Api/TemplateControllerApiTests.cs new file mode 100644 index 00000000..e112a52d --- /dev/null +++ b/src/mailslurp.Test/Api/TemplateControllerApiTests.cs @@ -0,0 +1,157 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing TemplateControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class TemplateControllerApiTests : IDisposable + { + private TemplateControllerApi instance; + + public TemplateControllerApiTests() + { + instance = new TemplateControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TemplateControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' TemplateControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateTemplate + /// + [Fact] + public void CreateTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateTemplateOptions createTemplateOptions = null; + //var response = instance.CreateTemplate(createTemplateOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteTemplate + /// + [Fact] + public void DeleteTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid templateId = null; + //instance.DeleteTemplate(templateId); + } + + /// + /// Test GetAllTemplates + /// + [Fact] + public void GetAllTemplatesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAllTemplates(page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetTemplate + /// + [Fact] + public void GetTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid templateId = null; + //var response = instance.GetTemplate(templateId); + //Assert.IsType(response); + } + + /// + /// Test GetTemplatePreviewHtml + /// + [Fact] + public void GetTemplatePreviewHtmlTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid templateId = null; + //var response = instance.GetTemplatePreviewHtml(templateId); + //Assert.IsType(response); + } + + /// + /// Test GetTemplatePreviewJson + /// + [Fact] + public void GetTemplatePreviewJsonTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid templateId = null; + //var response = instance.GetTemplatePreviewJson(templateId); + //Assert.IsType(response); + } + + /// + /// Test GetTemplates + /// + [Fact] + public void GetTemplatesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTemplates(); + //Assert.IsType>(response); + } + + /// + /// Test UpdateTemplate + /// + [Fact] + public void UpdateTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid templateId = null; + //CreateTemplateOptions createTemplateOptions = null; + //var response = instance.UpdateTemplate(templateId, createTemplateOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/TrackingControllerApiTests.cs b/src/mailslurp.Test/Api/TrackingControllerApiTests.cs new file mode 100644 index 00000000..ee21c270 --- /dev/null +++ b/src/mailslurp.Test/Api/TrackingControllerApiTests.cs @@ -0,0 +1,99 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing TrackingControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class TrackingControllerApiTests : IDisposable + { + private TrackingControllerApi instance; + + public TrackingControllerApiTests() + { + instance = new TrackingControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TrackingControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' TrackingControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateTrackingPixel + /// + [Fact] + public void CreateTrackingPixelTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateTrackingPixelOptions createTrackingPixelOptions = null; + //var response = instance.CreateTrackingPixel(createTrackingPixelOptions); + //Assert.IsType(response); + } + + /// + /// Test GetAllTrackingPixels + /// + [Fact] + public void GetAllTrackingPixelsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAllTrackingPixels(page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetTrackingPixel + /// + [Fact] + public void GetTrackingPixelTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid id = null; + //var response = instance.GetTrackingPixel(id); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Api/WaitForControllerApiTests.cs b/src/mailslurp.Test/Api/WaitForControllerApiTests.cs new file mode 100644 index 00000000..01a2829a --- /dev/null +++ b/src/mailslurp.Test/Api/WaitForControllerApiTests.cs @@ -0,0 +1,189 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing WaitForControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class WaitForControllerApiTests : IDisposable + { + private WaitForControllerApi instance; + + public WaitForControllerApiTests() + { + instance = new WaitForControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WaitForControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' WaitForControllerApi + //Assert.IsType(instance); + } + + /// + /// Test WaitFor + /// + [Fact] + public void WaitForTest() + { + // TODO uncomment below to test the method and replace null with proper value + //WaitForConditions waitForConditions = null; + //var response = instance.WaitFor(waitForConditions); + //Assert.IsType>(response); + } + + /// + /// Test WaitForEmailCount + /// + [Fact] + public void WaitForEmailCountTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int count = null; + //long? timeout = null; + //bool? unreadOnly = null; + //DateTime? before = null; + //DateTime? since = null; + //string sort = null; + //long? delay = null; + //var response = instance.WaitForEmailCount(inboxId, count, timeout, unreadOnly, before, since, sort, delay); + //Assert.IsType>(response); + } + + /// + /// Test WaitForLatestEmail + /// + [Fact] + public void WaitForLatestEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //long? timeout = null; + //bool? unreadOnly = null; + //DateTime? before = null; + //DateTime? since = null; + //string sort = null; + //long? delay = null; + //var response = instance.WaitForLatestEmail(inboxId, timeout, unreadOnly, before, since, sort, delay); + //Assert.IsType(response); + } + + /// + /// Test WaitForLatestSms + /// + [Fact] + public void WaitForLatestSmsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //WaitForSingleSmsOptions waitForSingleSmsOptions = null; + //var response = instance.WaitForLatestSms(waitForSingleSmsOptions); + //Assert.IsType(response); + } + + /// + /// Test WaitForMatchingEmails + /// + [Fact] + public void WaitForMatchingEmailsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int count = null; + //MatchOptions matchOptions = null; + //DateTime? before = null; + //DateTime? since = null; + //string sort = null; + //long? delay = null; + //long? timeout = null; + //bool? unreadOnly = null; + //var response = instance.WaitForMatchingEmails(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly); + //Assert.IsType>(response); + } + + /// + /// Test WaitForMatchingFirstEmail + /// + [Fact] + public void WaitForMatchingFirstEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //MatchOptions matchOptions = null; + //long? timeout = null; + //bool? unreadOnly = null; + //DateTime? since = null; + //DateTime? before = null; + //string sort = null; + //long? delay = null; + //var response = instance.WaitForMatchingFirstEmail(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay); + //Assert.IsType(response); + } + + /// + /// Test WaitForNthEmail + /// + [Fact] + public void WaitForNthEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid? inboxId = null; + //int? index = null; + //long? timeout = null; + //bool? unreadOnly = null; + //DateTime? since = null; + //DateTime? before = null; + //string sort = null; + //long? delay = null; + //var response = instance.WaitForNthEmail(inboxId, index, timeout, unreadOnly, since, before, sort, delay); + //Assert.IsType(response); + } + + /// + /// Test WaitForSms + /// + [Fact] + public void WaitForSmsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //WaitForSmsConditions waitForSmsConditions = null; + //var response = instance.WaitForSms(waitForSmsConditions); + //Assert.IsType>(response); + } + } +} diff --git a/src/mailslurp.Test/Api/WebhookControllerApiTests.cs b/src/mailslurp.Test/Api/WebhookControllerApiTests.cs new file mode 100644 index 00000000..1dccd6c4 --- /dev/null +++ b/src/mailslurp.Test/Api/WebhookControllerApiTests.cs @@ -0,0 +1,481 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using mailslurp.Client; +using mailslurp.Api; +// uncomment below to import models +//using mailslurp.Model; + +namespace mailslurp.Test.Api +{ + /// + /// Class for testing WebhookControllerApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class WebhookControllerApiTests : IDisposable + { + private WebhookControllerApi instance; + + public WebhookControllerApiTests() + { + instance = new WebhookControllerApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookControllerApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' WebhookControllerApi + //Assert.IsType(instance); + } + + /// + /// Test CreateAccountWebhook + /// + [Fact] + public void CreateAccountWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateWebhookOptions createWebhookOptions = null; + //var response = instance.CreateAccountWebhook(createWebhookOptions); + //Assert.IsType(response); + } + + /// + /// Test CreateWebhook + /// + [Fact] + public void CreateWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //CreateWebhookOptions createWebhookOptions = null; + //var response = instance.CreateWebhook(inboxId, createWebhookOptions); + //Assert.IsType(response); + } + + /// + /// Test CreateWebhookForPhoneNumber + /// + [Fact] + public void CreateWebhookForPhoneNumberTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid phoneNumberId = null; + //CreateWebhookOptions createWebhookOptions = null; + //var response = instance.CreateWebhookForPhoneNumber(phoneNumberId, createWebhookOptions); + //Assert.IsType(response); + } + + /// + /// Test DeleteAllWebhooks + /// + [Fact] + public void DeleteAllWebhooksTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DateTime? before = null; + //instance.DeleteAllWebhooks(before); + } + + /// + /// Test DeleteWebhook + /// + [Fact] + public void DeleteWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //Guid webhookId = null; + //instance.DeleteWebhook(inboxId, webhookId); + } + + /// + /// Test DeleteWebhookById + /// + [Fact] + public void DeleteWebhookByIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookId = null; + //instance.DeleteWebhookById(webhookId); + } + + /// + /// Test GetAllAccountWebhooks + /// + [Fact] + public void GetAllAccountWebhooksTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string eventType = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetAllAccountWebhooks(page, size, sort, eventType, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetAllWebhookResults + /// + [Fact] + public void GetAllWebhookResultsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //bool? unseenOnly = null; + //var response = instance.GetAllWebhookResults(page, size, sort, searchFilter, since, before, unseenOnly); + //Assert.IsType(response); + } + + /// + /// Test GetAllWebhooks + /// + [Fact] + public void GetAllWebhooksTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //Guid? inboxId = null; + //Guid? phoneId = null; + //DateTime? before = null; + //var response = instance.GetAllWebhooks(page, size, sort, searchFilter, since, inboxId, phoneId, before); + //Assert.IsType(response); + } + + /// + /// Test GetInboxWebhooksPaginated + /// + [Fact] + public void GetInboxWebhooksPaginatedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetInboxWebhooksPaginated(inboxId, page, size, sort, searchFilter, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetJsonSchemaForWebhookEvent + /// + [Fact] + public void GetJsonSchemaForWebhookEventTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string _event = null; + //var response = instance.GetJsonSchemaForWebhookEvent(_event); + //Assert.IsType(response); + } + + /// + /// Test GetJsonSchemaForWebhookPayload + /// + [Fact] + public void GetJsonSchemaForWebhookPayloadTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookId = null; + //var response = instance.GetJsonSchemaForWebhookPayload(webhookId); + //Assert.IsType(response); + } + + /// + /// Test GetPhoneNumberWebhooksPaginated + /// + [Fact] + public void GetPhoneNumberWebhooksPaginatedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid phoneId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //DateTime? since = null; + //DateTime? before = null; + //var response = instance.GetPhoneNumberWebhooksPaginated(phoneId, page, size, sort, since, before); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayload + /// + [Fact] + public void GetTestWebhookPayloadTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string eventName = null; + //var response = instance.GetTestWebhookPayload(eventName); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadBounce + /// + [Fact] + public void GetTestWebhookPayloadBounceTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadBounce(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadBounceRecipient + /// + [Fact] + public void GetTestWebhookPayloadBounceRecipientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadBounceRecipient(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadDeliveryStatus + /// + [Fact] + public void GetTestWebhookPayloadDeliveryStatusTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadDeliveryStatus(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadEmailOpened + /// + [Fact] + public void GetTestWebhookPayloadEmailOpenedTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadEmailOpened(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadEmailRead + /// + [Fact] + public void GetTestWebhookPayloadEmailReadTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadEmailRead(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadForWebhook + /// + [Fact] + public void GetTestWebhookPayloadForWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookId = null; + //var response = instance.GetTestWebhookPayloadForWebhook(webhookId); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadNewAttachment + /// + [Fact] + public void GetTestWebhookPayloadNewAttachmentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadNewAttachment(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadNewContact + /// + [Fact] + public void GetTestWebhookPayloadNewContactTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadNewContact(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadNewEmail + /// + [Fact] + public void GetTestWebhookPayloadNewEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadNewEmail(); + //Assert.IsType(response); + } + + /// + /// Test GetTestWebhookPayloadNewSms + /// + [Fact] + public void GetTestWebhookPayloadNewSmsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetTestWebhookPayloadNewSms(); + //Assert.IsType(response); + } + + /// + /// Test GetWebhook + /// + [Fact] + public void GetWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookId = null; + //var response = instance.GetWebhook(webhookId); + //Assert.IsType(response); + } + + /// + /// Test GetWebhookResult + /// + [Fact] + public void GetWebhookResultTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookResultId = null; + //var response = instance.GetWebhookResult(webhookResultId); + //Assert.IsType(response); + } + + /// + /// Test GetWebhookResults + /// + [Fact] + public void GetWebhookResultsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookId = null; + //int? page = null; + //int? size = null; + //string sort = null; + //string searchFilter = null; + //DateTime? since = null; + //DateTime? before = null; + //bool? unseenOnly = null; + //var response = instance.GetWebhookResults(webhookId, page, size, sort, searchFilter, since, before, unseenOnly); + //Assert.IsType(response); + } + + /// + /// Test GetWebhookResultsUnseenErrorCount + /// + [Fact] + public void GetWebhookResultsUnseenErrorCountTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetWebhookResultsUnseenErrorCount(); + //Assert.IsType(response); + } + + /// + /// Test GetWebhooks + /// + [Fact] + public void GetWebhooksTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid inboxId = null; + //var response = instance.GetWebhooks(inboxId); + //Assert.IsType>(response); + } + + /// + /// Test RedriveWebhookResult + /// + [Fact] + public void RedriveWebhookResultTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookResultId = null; + //var response = instance.RedriveWebhookResult(webhookResultId); + //Assert.IsType(response); + } + + /// + /// Test SendTestData + /// + [Fact] + public void SendTestDataTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookId = null; + //var response = instance.SendTestData(webhookId); + //Assert.IsType(response); + } + + /// + /// Test UpdateWebhookHeaders + /// + [Fact] + public void UpdateWebhookHeadersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid webhookId = null; + //WebhookHeaders webhookHeaders = null; + //var response = instance.UpdateWebhookHeaders(webhookId, webhookHeaders); + //Assert.IsType(response); + } + + /// + /// Test VerifyWebhookSignature + /// + [Fact] + public void VerifyWebhookSignatureTest() + { + // TODO uncomment below to test the method and replace null with proper value + //VerifyWebhookSignatureOptions verifyWebhookSignatureOptions = null; + //var response = instance.VerifyWebhookSignature(verifyWebhookSignatureOptions); + //Assert.IsType(response); + } + } +} diff --git a/src/mailslurp.Test/Model/AbstractWebhookPayloadTests.cs b/src/mailslurp.Test/Model/AbstractWebhookPayloadTests.cs new file mode 100644 index 00000000..f9507453 --- /dev/null +++ b/src/mailslurp.Test/Model/AbstractWebhookPayloadTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing AbstractWebhookPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AbstractWebhookPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AbstractWebhookPayload + //private AbstractWebhookPayload instance; + + public AbstractWebhookPayloadTests() + { + // TODO uncomment below to create an instance of AbstractWebhookPayload + //instance = new AbstractWebhookPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AbstractWebhookPayload + /// + [Fact] + public void AbstractWebhookPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" AbstractWebhookPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + + } + +} diff --git a/src/mailslurp.Test/Model/AliasDtoTests.cs b/src/mailslurp.Test/Model/AliasDtoTests.cs new file mode 100644 index 00000000..2a7020b2 --- /dev/null +++ b/src/mailslurp.Test/Model/AliasDtoTests.cs @@ -0,0 +1,143 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing AliasDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AliasDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AliasDto + //private AliasDto instance; + + public AliasDtoTests() + { + // TODO uncomment below to create an instance of AliasDto + //instance = new AliasDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AliasDto + /// + [Fact] + public void AliasDtoInstanceTest() + { + // TODO uncomment below to test "IsType" AliasDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'MaskedEmailAddress' + /// + [Fact] + public void MaskedEmailAddressTest() + { + // TODO unit test for the property 'MaskedEmailAddress' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'UseThreads' + /// + [Fact] + public void UseThreadsTest() + { + // TODO unit test for the property 'UseThreads' + } + /// + /// Test the property 'IsVerified' + /// + [Fact] + public void IsVerifiedTest() + { + // TODO unit test for the property 'IsVerified' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/AliasProjectionTests.cs b/src/mailslurp.Test/Model/AliasProjectionTests.cs new file mode 100644 index 00000000..65a9477d --- /dev/null +++ b/src/mailslurp.Test/Model/AliasProjectionTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing AliasProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AliasProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AliasProjection + //private AliasProjection instance; + + public AliasProjectionTests() + { + // TODO uncomment below to create an instance of AliasProjection + //instance = new AliasProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AliasProjection + /// + [Fact] + public void AliasProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" AliasProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'UseThreads' + /// + [Fact] + public void UseThreadsTest() + { + // TODO unit test for the property 'UseThreads' + } + + } + +} diff --git a/src/mailslurp.Test/Model/AttachmentEntityTests.cs b/src/mailslurp.Test/Model/AttachmentEntityTests.cs new file mode 100644 index 00000000..e06c6f93 --- /dev/null +++ b/src/mailslurp.Test/Model/AttachmentEntityTests.cs @@ -0,0 +1,135 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing AttachmentEntity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AttachmentEntityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AttachmentEntity + //private AttachmentEntity instance; + + public AttachmentEntityTests() + { + // TODO uncomment below to create an instance of AttachmentEntity + //instance = new AttachmentEntity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AttachmentEntity + /// + [Fact] + public void AttachmentEntityInstanceTest() + { + // TODO uncomment below to test "IsType" AttachmentEntity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'AttachmentId' + /// + [Fact] + public void AttachmentIdTest() + { + // TODO unit test for the property 'AttachmentId' + } + /// + /// Test the property 'Bucket' + /// + [Fact] + public void BucketTest() + { + // TODO unit test for the property 'Bucket' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'ContentType' + /// + [Fact] + public void ContentTypeTest() + { + // TODO unit test for the property 'ContentType' + } + /// + /// Test the property 'ContentLength' + /// + [Fact] + public void ContentLengthTest() + { + // TODO unit test for the property 'ContentLength' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/AttachmentMetaDataTests.cs b/src/mailslurp.Test/Model/AttachmentMetaDataTests.cs new file mode 100644 index 00000000..81eb7675 --- /dev/null +++ b/src/mailslurp.Test/Model/AttachmentMetaDataTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing AttachmentMetaData + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AttachmentMetaDataTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AttachmentMetaData + //private AttachmentMetaData instance; + + public AttachmentMetaDataTests() + { + // TODO uncomment below to create an instance of AttachmentMetaData + //instance = new AttachmentMetaData(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AttachmentMetaData + /// + [Fact] + public void AttachmentMetaDataInstanceTest() + { + // TODO uncomment below to test "IsType" AttachmentMetaData + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'ContentType' + /// + [Fact] + public void ContentTypeTest() + { + // TODO unit test for the property 'ContentType' + } + /// + /// Test the property 'ContentLength' + /// + [Fact] + public void ContentLengthTest() + { + // TODO unit test for the property 'ContentLength' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + + } + +} diff --git a/src/mailslurp.Test/Model/AttachmentProjectionTests.cs b/src/mailslurp.Test/Model/AttachmentProjectionTests.cs new file mode 100644 index 00000000..2b917e45 --- /dev/null +++ b/src/mailslurp.Test/Model/AttachmentProjectionTests.cs @@ -0,0 +1,119 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing AttachmentProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AttachmentProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AttachmentProjection + //private AttachmentProjection instance; + + public AttachmentProjectionTests() + { + // TODO uncomment below to create an instance of AttachmentProjection + //instance = new AttachmentProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AttachmentProjection + /// + [Fact] + public void AttachmentProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" AttachmentProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'ContentLength' + /// + [Fact] + public void ContentLengthTest() + { + // TODO unit test for the property 'ContentLength' + } + /// + /// Test the property 'ContentType' + /// + [Fact] + public void ContentTypeTest() + { + // TODO unit test for the property 'ContentType' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'AttachmentId' + /// + [Fact] + public void AttachmentIdTest() + { + // TODO unit test for the property 'AttachmentId' + } + + } + +} diff --git a/src/mailslurp.Test/Model/BasicAuthOptionsTests.cs b/src/mailslurp.Test/Model/BasicAuthOptionsTests.cs new file mode 100644 index 00000000..0efda117 --- /dev/null +++ b/src/mailslurp.Test/Model/BasicAuthOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing BasicAuthOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BasicAuthOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BasicAuthOptions + //private BasicAuthOptions instance; + + public BasicAuthOptionsTests() + { + // TODO uncomment below to create an instance of BasicAuthOptions + //instance = new BasicAuthOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BasicAuthOptions + /// + [Fact] + public void BasicAuthOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" BasicAuthOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Username' + /// + [Fact] + public void UsernameTest() + { + // TODO unit test for the property 'Username' + } + /// + /// Test the property 'Password' + /// + [Fact] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + + } + +} diff --git a/src/mailslurp.Test/Model/BounceProjectionTests.cs b/src/mailslurp.Test/Model/BounceProjectionTests.cs new file mode 100644 index 00000000..128756af --- /dev/null +++ b/src/mailslurp.Test/Model/BounceProjectionTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing BounceProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BounceProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BounceProjection + //private BounceProjection instance; + + public BounceProjectionTests() + { + // TODO uncomment below to create an instance of BounceProjection + //instance = new BounceProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BounceProjection + /// + [Fact] + public void BounceProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" BounceProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Sender' + /// + [Fact] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'BounceType' + /// + [Fact] + public void BounceTypeTest() + { + // TODO unit test for the property 'BounceType' + } + /// + /// Test the property 'BounceMta' + /// + [Fact] + public void BounceMtaTest() + { + // TODO unit test for the property 'BounceMta' + } + + } + +} diff --git a/src/mailslurp.Test/Model/BounceRecipientProjectionTests.cs b/src/mailslurp.Test/Model/BounceRecipientProjectionTests.cs new file mode 100644 index 00000000..5da63463 --- /dev/null +++ b/src/mailslurp.Test/Model/BounceRecipientProjectionTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing BounceRecipientProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BounceRecipientProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BounceRecipientProjection + //private BounceRecipientProjection instance; + + public BounceRecipientProjectionTests() + { + // TODO uncomment below to create an instance of BounceRecipientProjection + //instance = new BounceRecipientProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BounceRecipientProjection + /// + [Fact] + public void BounceRecipientProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" BounceRecipientProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'SentEmailId' + /// + [Fact] + public void SentEmailIdTest() + { + // TODO unit test for the property 'SentEmailId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'Recipient' + /// + [Fact] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + /// + /// Test the property 'Action' + /// + [Fact] + public void ActionTest() + { + // TODO unit test for the property 'Action' + } + + } + +} diff --git a/src/mailslurp.Test/Model/BouncedEmailDtoTests.cs b/src/mailslurp.Test/Model/BouncedEmailDtoTests.cs new file mode 100644 index 00000000..93e43a3a --- /dev/null +++ b/src/mailslurp.Test/Model/BouncedEmailDtoTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing BouncedEmailDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BouncedEmailDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BouncedEmailDto + //private BouncedEmailDto instance; + + public BouncedEmailDtoTests() + { + // TODO uncomment below to create an instance of BouncedEmailDto + //instance = new BouncedEmailDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BouncedEmailDto + /// + [Fact] + public void BouncedEmailDtoInstanceTest() + { + // TODO uncomment below to test "IsType" BouncedEmailDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'NotificationType' + /// + [Fact] + public void NotificationTypeTest() + { + // TODO unit test for the property 'NotificationType' + } + /// + /// Test the property 'SentToRecipients' + /// + [Fact] + public void SentToRecipientsTest() + { + // TODO unit test for the property 'SentToRecipients' + } + /// + /// Test the property 'Sender' + /// + [Fact] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'BounceMta' + /// + [Fact] + public void BounceMtaTest() + { + // TODO unit test for the property 'BounceMta' + } + /// + /// Test the property 'BounceType' + /// + [Fact] + public void BounceTypeTest() + { + // TODO unit test for the property 'BounceType' + } + /// + /// Test the property 'BounceRecipients' + /// + [Fact] + public void BounceRecipientsTest() + { + // TODO unit test for the property 'BounceRecipients' + } + /// + /// Test the property 'BounceSubType' + /// + [Fact] + public void BounceSubTypeTest() + { + // TODO unit test for the property 'BounceSubType' + } + /// + /// Test the property 'SentEmailId' + /// + [Fact] + public void SentEmailIdTest() + { + // TODO unit test for the property 'SentEmailId' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/BouncedRecipientDtoTests.cs b/src/mailslurp.Test/Model/BouncedRecipientDtoTests.cs new file mode 100644 index 00000000..2e135583 --- /dev/null +++ b/src/mailslurp.Test/Model/BouncedRecipientDtoTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing BouncedRecipientDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BouncedRecipientDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BouncedRecipientDto + //private BouncedRecipientDto instance; + + public BouncedRecipientDtoTests() + { + // TODO uncomment below to create an instance of BouncedRecipientDto + //instance = new BouncedRecipientDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BouncedRecipientDto + /// + [Fact] + public void BouncedRecipientDtoInstanceTest() + { + // TODO uncomment below to test "IsType" BouncedRecipientDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'SentEmailId' + /// + [Fact] + public void SentEmailIdTest() + { + // TODO unit test for the property 'SentEmailId' + } + /// + /// Test the property 'Recipient' + /// + [Fact] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + /// + /// Test the property 'DiagnosticCode' + /// + [Fact] + public void DiagnosticCodeTest() + { + // TODO unit test for the property 'DiagnosticCode' + } + /// + /// Test the property 'Action' + /// + [Fact] + public void ActionTest() + { + // TODO unit test for the property 'Action' + } + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/BulkSendEmailOptionsTests.cs b/src/mailslurp.Test/Model/BulkSendEmailOptionsTests.cs new file mode 100644 index 00000000..1c1c4d43 --- /dev/null +++ b/src/mailslurp.Test/Model/BulkSendEmailOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing BulkSendEmailOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BulkSendEmailOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BulkSendEmailOptions + //private BulkSendEmailOptions instance; + + public BulkSendEmailOptionsTests() + { + // TODO uncomment below to create an instance of BulkSendEmailOptions + //instance = new BulkSendEmailOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BulkSendEmailOptions + /// + [Fact] + public void BulkSendEmailOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" BulkSendEmailOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxIds' + /// + [Fact] + public void InboxIdsTest() + { + // TODO unit test for the property 'InboxIds' + } + /// + /// Test the property 'SendEmailOptions' + /// + [Fact] + public void SendEmailOptionsTest() + { + // TODO unit test for the property 'SendEmailOptions' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ComplaintTests.cs b/src/mailslurp.Test/Model/ComplaintTests.cs new file mode 100644 index 00000000..ca2d7e5e --- /dev/null +++ b/src/mailslurp.Test/Model/ComplaintTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing Complaint + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ComplaintTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Complaint + //private Complaint instance; + + public ComplaintTests() + { + // TODO uncomment below to create an instance of Complaint + //instance = new Complaint(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Complaint + /// + [Fact] + public void ComplaintInstanceTest() + { + // TODO uncomment below to test "IsType" Complaint + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'EventType' + /// + [Fact] + public void EventTypeTest() + { + // TODO unit test for the property 'EventType' + } + /// + /// Test the property 'MailSource' + /// + [Fact] + public void MailSourceTest() + { + // TODO unit test for the property 'MailSource' + } + /// + /// Test the property 'MailMessageId' + /// + [Fact] + public void MailMessageIdTest() + { + // TODO unit test for the property 'MailMessageId' + } + /// + /// Test the property 'ComplaintRecipient' + /// + [Fact] + public void ComplaintRecipientTest() + { + // TODO unit test for the property 'ComplaintRecipient' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ConditionOptionTests.cs b/src/mailslurp.Test/Model/ConditionOptionTests.cs new file mode 100644 index 00000000..f92dd5ee --- /dev/null +++ b/src/mailslurp.Test/Model/ConditionOptionTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ConditionOption + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ConditionOptionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ConditionOption + //private ConditionOption instance; + + public ConditionOptionTests() + { + // TODO uncomment below to create an instance of ConditionOption + //instance = new ConditionOption(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ConditionOption + /// + [Fact] + public void ConditionOptionInstanceTest() + { + // TODO uncomment below to test "IsType" ConditionOption + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Condition' + /// + [Fact] + public void ConditionTest() + { + // TODO unit test for the property 'Condition' + } + /// + /// Test the property 'Value' + /// + [Fact] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ContactDtoTests.cs b/src/mailslurp.Test/Model/ContactDtoTests.cs new file mode 100644 index 00000000..e41a3b0d --- /dev/null +++ b/src/mailslurp.Test/Model/ContactDtoTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ContactDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ContactDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ContactDto + //private ContactDto instance; + + public ContactDtoTests() + { + // TODO uncomment below to create an instance of ContactDto + //instance = new ContactDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ContactDto + /// + [Fact] + public void ContactDtoInstanceTest() + { + // TODO uncomment below to test "IsType" ContactDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'GroupId' + /// + [Fact] + public void GroupIdTest() + { + // TODO unit test for the property 'GroupId' + } + /// + /// Test the property 'FirstName' + /// + [Fact] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Fact] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'Company' + /// + [Fact] + public void CompanyTest() + { + // TODO unit test for the property 'Company' + } + /// + /// Test the property 'EmailAddresses' + /// + [Fact] + public void EmailAddressesTest() + { + // TODO unit test for the property 'EmailAddresses' + } + /// + /// Test the property 'PrimaryEmailAddress' + /// + [Fact] + public void PrimaryEmailAddressTest() + { + // TODO unit test for the property 'PrimaryEmailAddress' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'MetaData' + /// + [Fact] + public void MetaDataTest() + { + // TODO unit test for the property 'MetaData' + } + /// + /// Test the property 'OptOut' + /// + [Fact] + public void OptOutTest() + { + // TODO unit test for the property 'OptOut' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ContactProjectionTests.cs b/src/mailslurp.Test/Model/ContactProjectionTests.cs new file mode 100644 index 00000000..15c73ebc --- /dev/null +++ b/src/mailslurp.Test/Model/ContactProjectionTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ContactProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ContactProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ContactProjection + //private ContactProjection instance; + + public ContactProjectionTests() + { + // TODO uncomment below to create an instance of ContactProjection + //instance = new ContactProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ContactProjection + /// + [Fact] + public void ContactProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" ContactProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'GroupId' + /// + [Fact] + public void GroupIdTest() + { + // TODO unit test for the property 'GroupId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'FirstName' + /// + [Fact] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Fact] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'Company' + /// + [Fact] + public void CompanyTest() + { + // TODO unit test for the property 'Company' + } + /// + /// Test the property 'EmailAddresses' + /// + [Fact] + public void EmailAddressesTest() + { + // TODO unit test for the property 'EmailAddresses' + } + /// + /// Test the property 'OptOut' + /// + [Fact] + public void OptOutTest() + { + // TODO unit test for the property 'OptOut' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ContentMatchOptionsTests.cs b/src/mailslurp.Test/Model/ContentMatchOptionsTests.cs new file mode 100644 index 00000000..91d6c5b3 --- /dev/null +++ b/src/mailslurp.Test/Model/ContentMatchOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ContentMatchOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ContentMatchOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ContentMatchOptions + //private ContentMatchOptions instance; + + public ContentMatchOptionsTests() + { + // TODO uncomment below to create an instance of ContentMatchOptions + //instance = new ContentMatchOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ContentMatchOptions + /// + [Fact] + public void ContentMatchOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" ContentMatchOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Pattern' + /// + [Fact] + public void PatternTest() + { + // TODO unit test for the property 'Pattern' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CountDtoTests.cs b/src/mailslurp.Test/Model/CountDtoTests.cs new file mode 100644 index 00000000..54e5ac8c --- /dev/null +++ b/src/mailslurp.Test/Model/CountDtoTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CountDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CountDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CountDto + //private CountDto instance; + + public CountDtoTests() + { + // TODO uncomment below to create an instance of CountDto + //instance = new CountDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CountDto + /// + [Fact] + public void CountDtoInstanceTest() + { + // TODO uncomment below to test "IsType" CountDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateAliasOptionsTests.cs b/src/mailslurp.Test/Model/CreateAliasOptionsTests.cs new file mode 100644 index 00000000..4ec811a6 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateAliasOptionsTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateAliasOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateAliasOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateAliasOptions + //private CreateAliasOptions instance; + + public CreateAliasOptionsTests() + { + // TODO uncomment below to create an instance of CreateAliasOptions + //instance = new CreateAliasOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateAliasOptions + /// + [Fact] + public void CreateAliasOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateAliasOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'UseThreads' + /// + [Fact] + public void UseThreadsTest() + { + // TODO unit test for the property 'UseThreads' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateContactOptionsTests.cs b/src/mailslurp.Test/Model/CreateContactOptionsTests.cs new file mode 100644 index 00000000..e055dac0 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateContactOptionsTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateContactOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateContactOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateContactOptions + //private CreateContactOptions instance; + + public CreateContactOptionsTests() + { + // TODO uncomment below to create an instance of CreateContactOptions + //instance = new CreateContactOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateContactOptions + /// + [Fact] + public void CreateContactOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateContactOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'FirstName' + /// + [Fact] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Fact] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'Company' + /// + [Fact] + public void CompanyTest() + { + // TODO unit test for the property 'Company' + } + /// + /// Test the property 'EmailAddresses' + /// + [Fact] + public void EmailAddressesTest() + { + // TODO unit test for the property 'EmailAddresses' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'MetaData' + /// + [Fact] + public void MetaDataTest() + { + // TODO unit test for the property 'MetaData' + } + /// + /// Test the property 'OptOut' + /// + [Fact] + public void OptOutTest() + { + // TODO unit test for the property 'OptOut' + } + /// + /// Test the property 'GroupId' + /// + [Fact] + public void GroupIdTest() + { + // TODO unit test for the property 'GroupId' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateDomainOptionsTests.cs b/src/mailslurp.Test/Model/CreateDomainOptionsTests.cs new file mode 100644 index 00000000..c57ebd4a --- /dev/null +++ b/src/mailslurp.Test/Model/CreateDomainOptionsTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateDomainOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateDomainOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateDomainOptions + //private CreateDomainOptions instance; + + public CreateDomainOptionsTests() + { + // TODO uncomment below to create an instance of CreateDomainOptions + //instance = new CreateDomainOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateDomainOptions + /// + [Fact] + public void CreateDomainOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateDomainOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Domain' + /// + [Fact] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'CreatedCatchAllInbox' + /// + [Fact] + public void CreatedCatchAllInboxTest() + { + // TODO unit test for the property 'CreatedCatchAllInbox' + } + /// + /// Test the property 'DomainType' + /// + [Fact] + public void DomainTypeTest() + { + // TODO unit test for the property 'DomainType' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateEmergencyAddressOptionsTests.cs b/src/mailslurp.Test/Model/CreateEmergencyAddressOptionsTests.cs new file mode 100644 index 00000000..4699a699 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateEmergencyAddressOptionsTests.cs @@ -0,0 +1,119 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateEmergencyAddressOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateEmergencyAddressOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateEmergencyAddressOptions + //private CreateEmergencyAddressOptions instance; + + public CreateEmergencyAddressOptionsTests() + { + // TODO uncomment below to create an instance of CreateEmergencyAddressOptions + //instance = new CreateEmergencyAddressOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateEmergencyAddressOptions + /// + [Fact] + public void CreateEmergencyAddressOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateEmergencyAddressOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'CustomerName' + /// + [Fact] + public void CustomerNameTest() + { + // TODO unit test for the property 'CustomerName' + } + /// + /// Test the property 'Address1' + /// + [Fact] + public void Address1Test() + { + // TODO unit test for the property 'Address1' + } + /// + /// Test the property 'City' + /// + [Fact] + public void CityTest() + { + // TODO unit test for the property 'City' + } + /// + /// Test the property 'Region' + /// + [Fact] + public void RegionTest() + { + // TODO unit test for the property 'Region' + } + /// + /// Test the property 'PostalCode' + /// + [Fact] + public void PostalCodeTest() + { + // TODO unit test for the property 'PostalCode' + } + /// + /// Test the property 'IsoCountryCode' + /// + [Fact] + public void IsoCountryCodeTest() + { + // TODO unit test for the property 'IsoCountryCode' + } + /// + /// Test the property 'DisplayName' + /// + [Fact] + public void DisplayNameTest() + { + // TODO unit test for the property 'DisplayName' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateGroupOptionsTests.cs b/src/mailslurp.Test/Model/CreateGroupOptionsTests.cs new file mode 100644 index 00000000..f5b04934 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateGroupOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateGroupOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateGroupOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateGroupOptions + //private CreateGroupOptions instance; + + public CreateGroupOptionsTests() + { + // TODO uncomment below to create an instance of CreateGroupOptions + //instance = new CreateGroupOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateGroupOptions + /// + [Fact] + public void CreateGroupOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateGroupOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateInboxDtoTests.cs b/src/mailslurp.Test/Model/CreateInboxDtoTests.cs new file mode 100644 index 00000000..1ce5f8b2 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateInboxDtoTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateInboxDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateInboxDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateInboxDto + //private CreateInboxDto instance; + + public CreateInboxDtoTests() + { + // TODO uncomment below to create an instance of CreateInboxDto + //instance = new CreateInboxDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateInboxDto + /// + [Fact] + public void CreateInboxDtoInstanceTest() + { + // TODO uncomment below to test "IsType" CreateInboxDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'UseDomainPool' + /// + [Fact] + public void UseDomainPoolTest() + { + // TODO unit test for the property 'UseDomainPool' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'ExpiresAt' + /// + [Fact] + public void ExpiresAtTest() + { + // TODO unit test for the property 'ExpiresAt' + } + /// + /// Test the property 'Favourite' + /// + [Fact] + public void FavouriteTest() + { + // TODO unit test for the property 'Favourite' + } + /// + /// Test the property 'ExpiresIn' + /// + [Fact] + public void ExpiresInTest() + { + // TODO unit test for the property 'ExpiresIn' + } + /// + /// Test the property 'AllowTeamAccess' + /// + [Fact] + public void AllowTeamAccessTest() + { + // TODO unit test for the property 'AllowTeamAccess' + } + /// + /// Test the property 'InboxType' + /// + [Fact] + public void InboxTypeTest() + { + // TODO unit test for the property 'InboxType' + } + /// + /// Test the property 'VirtualInbox' + /// + [Fact] + public void VirtualInboxTest() + { + // TODO unit test for the property 'VirtualInbox' + } + /// + /// Test the property 'UseShortAddress' + /// + [Fact] + public void UseShortAddressTest() + { + // TODO unit test for the property 'UseShortAddress' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateInboxForwarderOptionsTests.cs b/src/mailslurp.Test/Model/CreateInboxForwarderOptionsTests.cs new file mode 100644 index 00000000..3bf45e36 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateInboxForwarderOptionsTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateInboxForwarderOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateInboxForwarderOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateInboxForwarderOptions + //private CreateInboxForwarderOptions instance; + + public CreateInboxForwarderOptionsTests() + { + // TODO uncomment below to create an instance of CreateInboxForwarderOptions + //instance = new CreateInboxForwarderOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateInboxForwarderOptions + /// + [Fact] + public void CreateInboxForwarderOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateInboxForwarderOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Field' + /// + [Fact] + public void FieldTest() + { + // TODO unit test for the property 'Field' + } + /// + /// Test the property 'Match' + /// + [Fact] + public void MatchTest() + { + // TODO unit test for the property 'Match' + } + /// + /// Test the property 'ForwardToRecipients' + /// + [Fact] + public void ForwardToRecipientsTest() + { + // TODO unit test for the property 'ForwardToRecipients' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateInboxRulesetOptionsTests.cs b/src/mailslurp.Test/Model/CreateInboxRulesetOptionsTests.cs new file mode 100644 index 00000000..a3328495 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateInboxRulesetOptionsTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateInboxRulesetOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateInboxRulesetOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateInboxRulesetOptions + //private CreateInboxRulesetOptions instance; + + public CreateInboxRulesetOptionsTests() + { + // TODO uncomment below to create an instance of CreateInboxRulesetOptions + //instance = new CreateInboxRulesetOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateInboxRulesetOptions + /// + [Fact] + public void CreateInboxRulesetOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateInboxRulesetOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Scope' + /// + [Fact] + public void ScopeTest() + { + // TODO unit test for the property 'Scope' + } + /// + /// Test the property 'Action' + /// + [Fact] + public void ActionTest() + { + // TODO unit test for the property 'Action' + } + /// + /// Test the property 'Target' + /// + [Fact] + public void TargetTest() + { + // TODO unit test for the property 'Target' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateTemplateOptionsTests.cs b/src/mailslurp.Test/Model/CreateTemplateOptionsTests.cs new file mode 100644 index 00000000..9797633d --- /dev/null +++ b/src/mailslurp.Test/Model/CreateTemplateOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateTemplateOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateTemplateOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateTemplateOptions + //private CreateTemplateOptions instance; + + public CreateTemplateOptionsTests() + { + // TODO uncomment below to create an instance of CreateTemplateOptions + //instance = new CreateTemplateOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateTemplateOptions + /// + [Fact] + public void CreateTemplateOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateTemplateOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateTrackingPixelOptionsTests.cs b/src/mailslurp.Test/Model/CreateTrackingPixelOptionsTests.cs new file mode 100644 index 00000000..7b39b101 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateTrackingPixelOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateTrackingPixelOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateTrackingPixelOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateTrackingPixelOptions + //private CreateTrackingPixelOptions instance; + + public CreateTrackingPixelOptionsTests() + { + // TODO uncomment below to create an instance of CreateTrackingPixelOptions + //instance = new CreateTrackingPixelOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateTrackingPixelOptions + /// + [Fact] + public void CreateTrackingPixelOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateTrackingPixelOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Recipient' + /// + [Fact] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + + } + +} diff --git a/src/mailslurp.Test/Model/CreateWebhookOptionsTests.cs b/src/mailslurp.Test/Model/CreateWebhookOptionsTests.cs new file mode 100644 index 00000000..6735f488 --- /dev/null +++ b/src/mailslurp.Test/Model/CreateWebhookOptionsTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing CreateWebhookOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateWebhookOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateWebhookOptions + //private CreateWebhookOptions instance; + + public CreateWebhookOptionsTests() + { + // TODO uncomment below to create an instance of CreateWebhookOptions + //instance = new CreateWebhookOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateWebhookOptions + /// + [Fact] + public void CreateWebhookOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" CreateWebhookOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Url' + /// + [Fact] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'BasicAuth' + /// + [Fact] + public void BasicAuthTest() + { + // TODO unit test for the property 'BasicAuth' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'IncludeHeaders' + /// + [Fact] + public void IncludeHeadersTest() + { + // TODO unit test for the property 'IncludeHeaders' + } + /// + /// Test the property 'RequestBodyTemplate' + /// + [Fact] + public void RequestBodyTemplateTest() + { + // TODO unit test for the property 'RequestBodyTemplate' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DNSLookupOptionsTests.cs b/src/mailslurp.Test/Model/DNSLookupOptionsTests.cs new file mode 100644 index 00000000..5b020693 --- /dev/null +++ b/src/mailslurp.Test/Model/DNSLookupOptionsTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DNSLookupOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DNSLookupOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DNSLookupOptions + //private DNSLookupOptions instance; + + public DNSLookupOptionsTests() + { + // TODO uncomment below to create an instance of DNSLookupOptions + //instance = new DNSLookupOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DNSLookupOptions + /// + [Fact] + public void DNSLookupOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" DNSLookupOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Hostname' + /// + [Fact] + public void HostnameTest() + { + // TODO unit test for the property 'Hostname' + } + /// + /// Test the property 'RecordTypes' + /// + [Fact] + public void RecordTypesTest() + { + // TODO unit test for the property 'RecordTypes' + } + /// + /// Test the property 'OmitFinalDNSDot' + /// + [Fact] + public void OmitFinalDNSDotTest() + { + // TODO unit test for the property 'OmitFinalDNSDot' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DNSLookupResultTests.cs b/src/mailslurp.Test/Model/DNSLookupResultTests.cs new file mode 100644 index 00000000..fa1d38f5 --- /dev/null +++ b/src/mailslurp.Test/Model/DNSLookupResultTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DNSLookupResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DNSLookupResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DNSLookupResult + //private DNSLookupResult instance; + + public DNSLookupResultTests() + { + // TODO uncomment below to create an instance of DNSLookupResult + //instance = new DNSLookupResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DNSLookupResult + /// + [Fact] + public void DNSLookupResultInstanceTest() + { + // TODO uncomment below to test "IsType" DNSLookupResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'RecordType' + /// + [Fact] + public void RecordTypeTest() + { + // TODO unit test for the property 'RecordType' + } + /// + /// Test the property 'Ttl' + /// + [Fact] + public void TtlTest() + { + // TODO unit test for the property 'Ttl' + } + /// + /// Test the property 'RecordEntries' + /// + [Fact] + public void RecordEntriesTest() + { + // TODO unit test for the property 'RecordEntries' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DNSLookupResultsTests.cs b/src/mailslurp.Test/Model/DNSLookupResultsTests.cs new file mode 100644 index 00000000..c9bbed67 --- /dev/null +++ b/src/mailslurp.Test/Model/DNSLookupResultsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DNSLookupResults + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DNSLookupResultsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DNSLookupResults + //private DNSLookupResults instance; + + public DNSLookupResultsTests() + { + // TODO uncomment below to create an instance of DNSLookupResults + //instance = new DNSLookupResults(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DNSLookupResults + /// + [Fact] + public void DNSLookupResultsInstanceTest() + { + // TODO uncomment below to test "IsType" DNSLookupResults + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Results' + /// + [Fact] + public void ResultsTest() + { + // TODO unit test for the property 'Results' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DeliveryStatusDtoTests.cs b/src/mailslurp.Test/Model/DeliveryStatusDtoTests.cs new file mode 100644 index 00000000..3b35d50e --- /dev/null +++ b/src/mailslurp.Test/Model/DeliveryStatusDtoTests.cs @@ -0,0 +1,175 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DeliveryStatusDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DeliveryStatusDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DeliveryStatusDto + //private DeliveryStatusDto instance; + + public DeliveryStatusDtoTests() + { + // TODO uncomment below to create an instance of DeliveryStatusDto + //instance = new DeliveryStatusDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DeliveryStatusDto + /// + [Fact] + public void DeliveryStatusDtoInstanceTest() + { + // TODO uncomment below to test "IsType" DeliveryStatusDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'SentId' + /// + [Fact] + public void SentIdTest() + { + // TODO unit test for the property 'SentId' + } + /// + /// Test the property 'RemoteMtaIp' + /// + [Fact] + public void RemoteMtaIpTest() + { + // TODO unit test for the property 'RemoteMtaIp' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'ReportingMta' + /// + [Fact] + public void ReportingMtaTest() + { + // TODO unit test for the property 'ReportingMta' + } + /// + /// Test the property 'Recipients' + /// + [Fact] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'SmtpResponse' + /// + [Fact] + public void SmtpResponseTest() + { + // TODO unit test for the property 'SmtpResponse' + } + /// + /// Test the property 'SmtpStatusCode' + /// + [Fact] + public void SmtpStatusCodeTest() + { + // TODO unit test for the property 'SmtpStatusCode' + } + /// + /// Test the property 'ProcessingTimeMillis' + /// + [Fact] + public void ProcessingTimeMillisTest() + { + // TODO unit test for the property 'ProcessingTimeMillis' + } + /// + /// Test the property 'Received' + /// + [Fact] + public void ReceivedTest() + { + // TODO unit test for the property 'Received' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DescribeDomainOptionsTests.cs b/src/mailslurp.Test/Model/DescribeDomainOptionsTests.cs new file mode 100644 index 00000000..76c7f698 --- /dev/null +++ b/src/mailslurp.Test/Model/DescribeDomainOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DescribeDomainOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DescribeDomainOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DescribeDomainOptions + //private DescribeDomainOptions instance; + + public DescribeDomainOptionsTests() + { + // TODO uncomment below to create an instance of DescribeDomainOptions + //instance = new DescribeDomainOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DescribeDomainOptions + /// + [Fact] + public void DescribeDomainOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" DescribeDomainOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Domain' + /// + [Fact] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DescribeMailServerDomainResultTests.cs b/src/mailslurp.Test/Model/DescribeMailServerDomainResultTests.cs new file mode 100644 index 00000000..1ea9df04 --- /dev/null +++ b/src/mailslurp.Test/Model/DescribeMailServerDomainResultTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DescribeMailServerDomainResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DescribeMailServerDomainResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DescribeMailServerDomainResult + //private DescribeMailServerDomainResult instance; + + public DescribeMailServerDomainResultTests() + { + // TODO uncomment below to create an instance of DescribeMailServerDomainResult + //instance = new DescribeMailServerDomainResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DescribeMailServerDomainResult + /// + [Fact] + public void DescribeMailServerDomainResultInstanceTest() + { + // TODO uncomment below to test "IsType" DescribeMailServerDomainResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MxRecords' + /// + [Fact] + public void MxRecordsTest() + { + // TODO unit test for the property 'MxRecords' + } + /// + /// Test the property 'Domain' + /// + [Fact] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DomainDtoTests.cs b/src/mailslurp.Test/Model/DomainDtoTests.cs new file mode 100644 index 00000000..7287c2fc --- /dev/null +++ b/src/mailslurp.Test/Model/DomainDtoTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DomainDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DomainDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DomainDto + //private DomainDto instance; + + public DomainDtoTests() + { + // TODO uncomment below to create an instance of DomainDto + //instance = new DomainDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DomainDto + /// + [Fact] + public void DomainDtoInstanceTest() + { + // TODO uncomment below to test "IsType" DomainDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Domain' + /// + [Fact] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + /// + /// Test the property 'VerificationToken' + /// + [Fact] + public void VerificationTokenTest() + { + // TODO unit test for the property 'VerificationToken' + } + /// + /// Test the property 'DkimTokens' + /// + [Fact] + public void DkimTokensTest() + { + // TODO unit test for the property 'DkimTokens' + } + /// + /// Test the property 'IsVerified' + /// + [Fact] + public void IsVerifiedTest() + { + // TODO unit test for the property 'IsVerified' + } + /// + /// Test the property 'DomainNameRecords' + /// + [Fact] + public void DomainNameRecordsTest() + { + // TODO unit test for the property 'DomainNameRecords' + } + /// + /// Test the property 'CatchAllInboxId' + /// + [Fact] + public void CatchAllInboxIdTest() + { + // TODO unit test for the property 'CatchAllInboxId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'DomainType' + /// + [Fact] + public void DomainTypeTest() + { + // TODO unit test for the property 'DomainType' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DomainNameRecordTests.cs b/src/mailslurp.Test/Model/DomainNameRecordTests.cs new file mode 100644 index 00000000..3b994a0c --- /dev/null +++ b/src/mailslurp.Test/Model/DomainNameRecordTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DomainNameRecord + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DomainNameRecordTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DomainNameRecord + //private DomainNameRecord instance; + + public DomainNameRecordTests() + { + // TODO uncomment below to create an instance of DomainNameRecord + //instance = new DomainNameRecord(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DomainNameRecord + /// + [Fact] + public void DomainNameRecordInstanceTest() + { + // TODO uncomment below to test "IsType" DomainNameRecord + //Assert.IsType(instance); + } + + + /// + /// Test the property 'RecordType' + /// + [Fact] + public void RecordTypeTest() + { + // TODO unit test for the property 'RecordType' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'RecordEntries' + /// + [Fact] + public void RecordEntriesTest() + { + // TODO unit test for the property 'RecordEntries' + } + /// + /// Test the property 'Ttl' + /// + [Fact] + public void TtlTest() + { + // TODO unit test for the property 'Ttl' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DomainPreviewTests.cs b/src/mailslurp.Test/Model/DomainPreviewTests.cs new file mode 100644 index 00000000..b6120207 --- /dev/null +++ b/src/mailslurp.Test/Model/DomainPreviewTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DomainPreview + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DomainPreviewTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DomainPreview + //private DomainPreview instance; + + public DomainPreviewTests() + { + // TODO uncomment below to create an instance of DomainPreview + //instance = new DomainPreview(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DomainPreview + /// + [Fact] + public void DomainPreviewInstanceTest() + { + // TODO uncomment below to test "IsType" DomainPreview + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Domain' + /// + [Fact] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + /// + /// Test the property 'CatchAllInboxId' + /// + [Fact] + public void CatchAllInboxIdTest() + { + // TODO unit test for the property 'CatchAllInboxId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'DomainType' + /// + [Fact] + public void DomainTypeTest() + { + // TODO unit test for the property 'DomainType' + } + /// + /// Test the property 'IsVerified' + /// + [Fact] + public void IsVerifiedTest() + { + // TODO unit test for the property 'IsVerified' + } + + } + +} diff --git a/src/mailslurp.Test/Model/DownloadAttachmentDtoTests.cs b/src/mailslurp.Test/Model/DownloadAttachmentDtoTests.cs new file mode 100644 index 00000000..88db9e49 --- /dev/null +++ b/src/mailslurp.Test/Model/DownloadAttachmentDtoTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing DownloadAttachmentDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DownloadAttachmentDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DownloadAttachmentDto + //private DownloadAttachmentDto instance; + + public DownloadAttachmentDtoTests() + { + // TODO uncomment below to create an instance of DownloadAttachmentDto + //instance = new DownloadAttachmentDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DownloadAttachmentDto + /// + [Fact] + public void DownloadAttachmentDtoInstanceTest() + { + // TODO uncomment below to test "IsType" DownloadAttachmentDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Base64FileContents' + /// + [Fact] + public void Base64FileContentsTest() + { + // TODO unit test for the property 'Base64FileContents' + } + /// + /// Test the property 'ContentType' + /// + [Fact] + public void ContentTypeTest() + { + // TODO unit test for the property 'ContentType' + } + /// + /// Test the property 'SizeBytes' + /// + [Fact] + public void SizeBytesTest() + { + // TODO unit test for the property 'SizeBytes' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailAnalysisTests.cs b/src/mailslurp.Test/Model/EmailAnalysisTests.cs new file mode 100644 index 00000000..aa104595 --- /dev/null +++ b/src/mailslurp.Test/Model/EmailAnalysisTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailAnalysis + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailAnalysisTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailAnalysis + //private EmailAnalysis instance; + + public EmailAnalysisTests() + { + // TODO uncomment below to create an instance of EmailAnalysis + //instance = new EmailAnalysis(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailAnalysis + /// + [Fact] + public void EmailAnalysisInstanceTest() + { + // TODO uncomment below to test "IsType" EmailAnalysis + //Assert.IsType(instance); + } + + + /// + /// Test the property 'SpamVerdict' + /// + [Fact] + public void SpamVerdictTest() + { + // TODO unit test for the property 'SpamVerdict' + } + /// + /// Test the property 'VirusVerdict' + /// + [Fact] + public void VirusVerdictTest() + { + // TODO unit test for the property 'VirusVerdict' + } + /// + /// Test the property 'SpfVerdict' + /// + [Fact] + public void SpfVerdictTest() + { + // TODO unit test for the property 'SpfVerdict' + } + /// + /// Test the property 'DkimVerdict' + /// + [Fact] + public void DkimVerdictTest() + { + // TODO unit test for the property 'DkimVerdict' + } + /// + /// Test the property 'DmarcVerdict' + /// + [Fact] + public void DmarcVerdictTest() + { + // TODO unit test for the property 'DmarcVerdict' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailContentMatchResultTests.cs b/src/mailslurp.Test/Model/EmailContentMatchResultTests.cs new file mode 100644 index 00000000..39be87cb --- /dev/null +++ b/src/mailslurp.Test/Model/EmailContentMatchResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailContentMatchResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailContentMatchResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailContentMatchResult + //private EmailContentMatchResult instance; + + public EmailContentMatchResultTests() + { + // TODO uncomment below to create an instance of EmailContentMatchResult + //instance = new EmailContentMatchResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailContentMatchResult + /// + [Fact] + public void EmailContentMatchResultInstanceTest() + { + // TODO uncomment below to test "IsType" EmailContentMatchResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Pattern' + /// + [Fact] + public void PatternTest() + { + // TODO unit test for the property 'Pattern' + } + /// + /// Test the property 'Matches' + /// + [Fact] + public void MatchesTest() + { + // TODO unit test for the property 'Matches' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailHtmlDtoTests.cs b/src/mailslurp.Test/Model/EmailHtmlDtoTests.cs new file mode 100644 index 00000000..4b404994 --- /dev/null +++ b/src/mailslurp.Test/Model/EmailHtmlDtoTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailHtmlDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailHtmlDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailHtmlDto + //private EmailHtmlDto instance; + + public EmailHtmlDtoTests() + { + // TODO uncomment below to create an instance of EmailHtmlDto + //instance = new EmailHtmlDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailHtmlDto + /// + [Fact] + public void EmailHtmlDtoInstanceTest() + { + // TODO uncomment below to test "IsType" EmailHtmlDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailLinksResultTests.cs b/src/mailslurp.Test/Model/EmailLinksResultTests.cs new file mode 100644 index 00000000..411360dd --- /dev/null +++ b/src/mailslurp.Test/Model/EmailLinksResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailLinksResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailLinksResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailLinksResult + //private EmailLinksResult instance; + + public EmailLinksResultTests() + { + // TODO uncomment below to create an instance of EmailLinksResult + //instance = new EmailLinksResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailLinksResult + /// + [Fact] + public void EmailLinksResultInstanceTest() + { + // TODO uncomment below to test "IsType" EmailLinksResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Links' + /// + [Fact] + public void LinksTest() + { + // TODO unit test for the property 'Links' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailPreviewTests.cs b/src/mailslurp.Test/Model/EmailPreviewTests.cs new file mode 100644 index 00000000..d0e39149 --- /dev/null +++ b/src/mailslurp.Test/Model/EmailPreviewTests.cs @@ -0,0 +1,143 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailPreview + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailPreviewTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailPreview + //private EmailPreview instance; + + public EmailPreviewTests() + { + // TODO uncomment below to create an instance of EmailPreview + //instance = new EmailPreview(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailPreview + /// + [Fact] + public void EmailPreviewInstanceTest() + { + // TODO uncomment below to test "IsType" EmailPreview + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'Read' + /// + [Fact] + public void ReadTest() + { + // TODO unit test for the property 'Read' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailPreviewUrlsTests.cs b/src/mailslurp.Test/Model/EmailPreviewUrlsTests.cs new file mode 100644 index 00000000..31d55134 --- /dev/null +++ b/src/mailslurp.Test/Model/EmailPreviewUrlsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailPreviewUrls + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailPreviewUrlsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailPreviewUrls + //private EmailPreviewUrls instance; + + public EmailPreviewUrlsTests() + { + // TODO uncomment below to create an instance of EmailPreviewUrls + //instance = new EmailPreviewUrls(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailPreviewUrls + /// + [Fact] + public void EmailPreviewUrlsInstanceTest() + { + // TODO uncomment below to test "IsType" EmailPreviewUrls + //Assert.IsType(instance); + } + + + /// + /// Test the property 'RawSmtpMessageUrl' + /// + [Fact] + public void RawSmtpMessageUrlTest() + { + // TODO unit test for the property 'RawSmtpMessageUrl' + } + /// + /// Test the property 'PlainHtmlBodyUrl' + /// + [Fact] + public void PlainHtmlBodyUrlTest() + { + // TODO unit test for the property 'PlainHtmlBodyUrl' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailProjectionTests.cs b/src/mailslurp.Test/Model/EmailProjectionTests.cs new file mode 100644 index 00000000..f370aaa7 --- /dev/null +++ b/src/mailslurp.Test/Model/EmailProjectionTests.cs @@ -0,0 +1,175 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailProjection + //private EmailProjection instance; + + public EmailProjectionTests() + { + // TODO uncomment below to create an instance of EmailProjection + //instance = new EmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailProjection + /// + [Fact] + public void EmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" EmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'Read' + /// + [Fact] + public void ReadTest() + { + // TODO unit test for the property 'Read' + } + /// + /// Test the property 'BodyExcerpt' + /// + [Fact] + public void BodyExcerptTest() + { + // TODO unit test for the property 'BodyExcerpt' + } + /// + /// Test the property 'TeamAccess' + /// + [Fact] + public void TeamAccessTest() + { + // TODO unit test for the property 'TeamAccess' + } + /// + /// Test the property 'BodyMD5Hash' + /// + [Fact] + public void BodyMD5HashTest() + { + // TODO unit test for the property 'BodyMD5Hash' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailRecipientsTests.cs b/src/mailslurp.Test/Model/EmailRecipientsTests.cs new file mode 100644 index 00000000..97a76bc5 --- /dev/null +++ b/src/mailslurp.Test/Model/EmailRecipientsTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailRecipients + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailRecipientsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailRecipients + //private EmailRecipients instance; + + public EmailRecipientsTests() + { + // TODO uncomment below to create an instance of EmailRecipients + //instance = new EmailRecipients(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailRecipients + /// + [Fact] + public void EmailRecipientsInstanceTest() + { + // TODO uncomment below to test "IsType" EmailRecipients + //Assert.IsType(instance); + } + + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailTests.cs b/src/mailslurp.Test/Model/EmailTests.cs new file mode 100644 index 00000000..97bf522b --- /dev/null +++ b/src/mailslurp.Test/Model/EmailTests.cs @@ -0,0 +1,263 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing Email + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Email + //private Email instance; + + public EmailTests() + { + // TODO uncomment below to create an instance of Email + //instance = new Email(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Email + /// + [Fact] + public void EmailInstanceTest() + { + // TODO uncomment below to test "IsType" Email + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'Sender' + /// + [Fact] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'Recipients' + /// + [Fact] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'ReplyTo' + /// + [Fact] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Headers' + /// + [Fact] + public void HeadersTest() + { + // TODO unit test for the property 'Headers' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'BodyExcerpt' + /// + [Fact] + public void BodyExcerptTest() + { + // TODO unit test for the property 'BodyExcerpt' + } + /// + /// Test the property 'BodyMD5Hash' + /// + [Fact] + public void BodyMD5HashTest() + { + // TODO unit test for the property 'BodyMD5Hash' + } + /// + /// Test the property 'IsHTML' + /// + [Fact] + public void IsHTMLTest() + { + // TODO unit test for the property 'IsHTML' + } + /// + /// Test the property 'Charset' + /// + [Fact] + public void CharsetTest() + { + // TODO unit test for the property 'Charset' + } + /// + /// Test the property 'Analysis' + /// + [Fact] + public void AnalysisTest() + { + // TODO unit test for the property 'Analysis' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'Read' + /// + [Fact] + public void ReadTest() + { + // TODO unit test for the property 'Read' + } + /// + /// Test the property 'TeamAccess' + /// + [Fact] + public void TeamAccessTest() + { + // TODO unit test for the property 'TeamAccess' + } + /// + /// Test the property 'Html' + /// + [Fact] + public void HtmlTest() + { + // TODO unit test for the property 'Html' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailTextLinesResultTests.cs b/src/mailslurp.Test/Model/EmailTextLinesResultTests.cs new file mode 100644 index 00000000..47f5e79f --- /dev/null +++ b/src/mailslurp.Test/Model/EmailTextLinesResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailTextLinesResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailTextLinesResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailTextLinesResult + //private EmailTextLinesResult instance; + + public EmailTextLinesResultTests() + { + // TODO uncomment below to create an instance of EmailTextLinesResult + //instance = new EmailTextLinesResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailTextLinesResult + /// + [Fact] + public void EmailTextLinesResultInstanceTest() + { + // TODO uncomment below to test "IsType" EmailTextLinesResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Lines' + /// + [Fact] + public void LinesTest() + { + // TODO unit test for the property 'Lines' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailValidationRequestDtoTests.cs b/src/mailslurp.Test/Model/EmailValidationRequestDtoTests.cs new file mode 100644 index 00000000..6b59c36e --- /dev/null +++ b/src/mailslurp.Test/Model/EmailValidationRequestDtoTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailValidationRequestDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailValidationRequestDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailValidationRequestDto + //private EmailValidationRequestDto instance; + + public EmailValidationRequestDtoTests() + { + // TODO uncomment below to create an instance of EmailValidationRequestDto + //instance = new EmailValidationRequestDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailValidationRequestDto + /// + [Fact] + public void EmailValidationRequestDtoInstanceTest() + { + // TODO uncomment below to test "IsType" EmailValidationRequestDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'IsValid' + /// + [Fact] + public void IsValidTest() + { + // TODO unit test for the property 'IsValid' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmailVerificationResultTests.cs b/src/mailslurp.Test/Model/EmailVerificationResultTests.cs new file mode 100644 index 00000000..61cb187d --- /dev/null +++ b/src/mailslurp.Test/Model/EmailVerificationResultTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmailVerificationResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmailVerificationResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmailVerificationResult + //private EmailVerificationResult instance; + + public EmailVerificationResultTests() + { + // TODO uncomment below to create an instance of EmailVerificationResult + //instance = new EmailVerificationResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmailVerificationResult + /// + [Fact] + public void EmailVerificationResultInstanceTest() + { + // TODO uncomment below to test "IsType" EmailVerificationResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'DomainName' + /// + [Fact] + public void DomainNameTest() + { + // TODO unit test for the property 'DomainName' + } + /// + /// Test the property 'Port' + /// + [Fact] + public void PortTest() + { + // TODO unit test for the property 'Port' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'IsValid' + /// + [Fact] + public void IsValidTest() + { + // TODO unit test for the property 'IsValid' + } + /// + /// Test the property 'Error' + /// + [Fact] + public void ErrorTest() + { + // TODO unit test for the property 'Error' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmergencyAddressDtoTests.cs b/src/mailslurp.Test/Model/EmergencyAddressDtoTests.cs new file mode 100644 index 00000000..0440c7a7 --- /dev/null +++ b/src/mailslurp.Test/Model/EmergencyAddressDtoTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmergencyAddressDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmergencyAddressDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmergencyAddressDto + //private EmergencyAddressDto instance; + + public EmergencyAddressDtoTests() + { + // TODO uncomment below to create an instance of EmergencyAddressDto + //instance = new EmergencyAddressDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmergencyAddressDto + /// + [Fact] + public void EmergencyAddressDtoInstanceTest() + { + // TODO uncomment below to test "IsType" EmergencyAddressDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Address1' + /// + [Fact] + public void Address1Test() + { + // TODO unit test for the property 'Address1' + } + /// + /// Test the property 'PhoneCountry' + /// + [Fact] + public void PhoneCountryTest() + { + // TODO unit test for the property 'PhoneCountry' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmergencyAddressTests.cs b/src/mailslurp.Test/Model/EmergencyAddressTests.cs new file mode 100644 index 00000000..a6db66b0 --- /dev/null +++ b/src/mailslurp.Test/Model/EmergencyAddressTests.cs @@ -0,0 +1,167 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmergencyAddress + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmergencyAddressTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmergencyAddress + //private EmergencyAddress instance; + + public EmergencyAddressTests() + { + // TODO uncomment below to create an instance of EmergencyAddress + //instance = new EmergencyAddress(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmergencyAddress + /// + [Fact] + public void EmergencyAddressInstanceTest() + { + // TODO uncomment below to test "IsType" EmergencyAddress + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Sid' + /// + [Fact] + public void SidTest() + { + // TODO unit test for the property 'Sid' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'DisplayName' + /// + [Fact] + public void DisplayNameTest() + { + // TODO unit test for the property 'DisplayName' + } + /// + /// Test the property 'CustomerName' + /// + [Fact] + public void CustomerNameTest() + { + // TODO unit test for the property 'CustomerName' + } + /// + /// Test the property 'Address1' + /// + [Fact] + public void Address1Test() + { + // TODO unit test for the property 'Address1' + } + /// + /// Test the property 'City' + /// + [Fact] + public void CityTest() + { + // TODO unit test for the property 'City' + } + /// + /// Test the property 'Region' + /// + [Fact] + public void RegionTest() + { + // TODO unit test for the property 'Region' + } + /// + /// Test the property 'PostalCode' + /// + [Fact] + public void PostalCodeTest() + { + // TODO unit test for the property 'PostalCode' + } + /// + /// Test the property 'PhoneCountry' + /// + [Fact] + public void PhoneCountryTest() + { + // TODO unit test for the property 'PhoneCountry' + } + /// + /// Test the property 'AccountSid' + /// + [Fact] + public void AccountSidTest() + { + // TODO unit test for the property 'AccountSid' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/EmptyResponseDtoTests.cs b/src/mailslurp.Test/Model/EmptyResponseDtoTests.cs new file mode 100644 index 00000000..2d929465 --- /dev/null +++ b/src/mailslurp.Test/Model/EmptyResponseDtoTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing EmptyResponseDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EmptyResponseDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EmptyResponseDto + //private EmptyResponseDto instance; + + public EmptyResponseDtoTests() + { + // TODO uncomment below to create an instance of EmptyResponseDto + //instance = new EmptyResponseDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EmptyResponseDto + /// + [Fact] + public void EmptyResponseDtoInstanceTest() + { + // TODO uncomment below to test "IsType" EmptyResponseDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ExpirationDefaultsTests.cs b/src/mailslurp.Test/Model/ExpirationDefaultsTests.cs new file mode 100644 index 00000000..77e03d7d --- /dev/null +++ b/src/mailslurp.Test/Model/ExpirationDefaultsTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ExpirationDefaults + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExpirationDefaultsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExpirationDefaults + //private ExpirationDefaults instance; + + public ExpirationDefaultsTests() + { + // TODO uncomment below to create an instance of ExpirationDefaults + //instance = new ExpirationDefaults(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExpirationDefaults + /// + [Fact] + public void ExpirationDefaultsInstanceTest() + { + // TODO uncomment below to test "IsType" ExpirationDefaults + //Assert.IsType(instance); + } + + + /// + /// Test the property 'DefaultExpirationMillis' + /// + [Fact] + public void DefaultExpirationMillisTest() + { + // TODO unit test for the property 'DefaultExpirationMillis' + } + /// + /// Test the property 'MaxExpirationMillis' + /// + [Fact] + public void MaxExpirationMillisTest() + { + // TODO unit test for the property 'MaxExpirationMillis' + } + /// + /// Test the property 'DefaultExpiresAt' + /// + [Fact] + public void DefaultExpiresAtTest() + { + // TODO unit test for the property 'DefaultExpiresAt' + } + /// + /// Test the property 'CanPermanentInbox' + /// + [Fact] + public void CanPermanentInboxTest() + { + // TODO unit test for the property 'CanPermanentInbox' + } + /// + /// Test the property 'NextInboxAllowsPermanent' + /// + [Fact] + public void NextInboxAllowsPermanentTest() + { + // TODO unit test for the property 'NextInboxAllowsPermanent' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ExpiredInboxDtoTests.cs b/src/mailslurp.Test/Model/ExpiredInboxDtoTests.cs new file mode 100644 index 00000000..b4c396f0 --- /dev/null +++ b/src/mailslurp.Test/Model/ExpiredInboxDtoTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ExpiredInboxDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExpiredInboxDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExpiredInboxDto + //private ExpiredInboxDto instance; + + public ExpiredInboxDtoTests() + { + // TODO uncomment below to create an instance of ExpiredInboxDto + //instance = new ExpiredInboxDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExpiredInboxDto + /// + [Fact] + public void ExpiredInboxDtoInstanceTest() + { + // TODO uncomment below to test "IsType" ExpiredInboxDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ExpiredInboxRecordProjectionTests.cs b/src/mailslurp.Test/Model/ExpiredInboxRecordProjectionTests.cs new file mode 100644 index 00000000..289f43fa --- /dev/null +++ b/src/mailslurp.Test/Model/ExpiredInboxRecordProjectionTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ExpiredInboxRecordProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExpiredInboxRecordProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExpiredInboxRecordProjection + //private ExpiredInboxRecordProjection instance; + + public ExpiredInboxRecordProjectionTests() + { + // TODO uncomment below to create an instance of ExpiredInboxRecordProjection + //instance = new ExpiredInboxRecordProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExpiredInboxRecordProjection + /// + [Fact] + public void ExpiredInboxRecordProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" ExpiredInboxRecordProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ExportLinkTests.cs b/src/mailslurp.Test/Model/ExportLinkTests.cs new file mode 100644 index 00000000..2441d00c --- /dev/null +++ b/src/mailslurp.Test/Model/ExportLinkTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ExportLink + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExportLinkTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExportLink + //private ExportLink instance; + + public ExportLinkTests() + { + // TODO uncomment below to create an instance of ExportLink + //instance = new ExportLink(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExportLink + /// + [Fact] + public void ExportLinkInstanceTest() + { + // TODO uncomment below to test "IsType" ExportLink + //Assert.IsType(instance); + } + + + /// + /// Test the property 'DownloadLink' + /// + [Fact] + public void DownloadLinkTest() + { + // TODO unit test for the property 'DownloadLink' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ExportOptionsTests.cs b/src/mailslurp.Test/Model/ExportOptionsTests.cs new file mode 100644 index 00000000..1e01eb03 --- /dev/null +++ b/src/mailslurp.Test/Model/ExportOptionsTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ExportOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExportOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExportOptions + //private ExportOptions instance; + + public ExportOptionsTests() + { + // TODO uncomment below to create an instance of ExportOptions + //instance = new ExportOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExportOptions + /// + [Fact] + public void ExportOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" ExportOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'OutputFormat' + /// + [Fact] + public void OutputFormatTest() + { + // TODO unit test for the property 'OutputFormat' + } + /// + /// Test the property 'ExcludePreviouslyExported' + /// + [Fact] + public void ExcludePreviouslyExportedTest() + { + // TODO unit test for the property 'ExcludePreviouslyExported' + } + /// + /// Test the property 'CreatedEarliestTime' + /// + [Fact] + public void CreatedEarliestTimeTest() + { + // TODO unit test for the property 'CreatedEarliestTime' + } + /// + /// Test the property 'CreatedOldestTime' + /// + [Fact] + public void CreatedOldestTimeTest() + { + // TODO unit test for the property 'CreatedOldestTime' + } + /// + /// Test the property 'Filter' + /// + [Fact] + public void FilterTest() + { + // TODO unit test for the property 'Filter' + } + /// + /// Test the property 'ListSeparatorToken' + /// + [Fact] + public void ListSeparatorTokenTest() + { + // TODO unit test for the property 'ListSeparatorToken' + } + + } + +} diff --git a/src/mailslurp.Test/Model/FilterBouncedRecipientsOptionsTests.cs b/src/mailslurp.Test/Model/FilterBouncedRecipientsOptionsTests.cs new file mode 100644 index 00000000..e10dcbd9 --- /dev/null +++ b/src/mailslurp.Test/Model/FilterBouncedRecipientsOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing FilterBouncedRecipientsOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FilterBouncedRecipientsOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for FilterBouncedRecipientsOptions + //private FilterBouncedRecipientsOptions instance; + + public FilterBouncedRecipientsOptionsTests() + { + // TODO uncomment below to create an instance of FilterBouncedRecipientsOptions + //instance = new FilterBouncedRecipientsOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FilterBouncedRecipientsOptions + /// + [Fact] + public void FilterBouncedRecipientsOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" FilterBouncedRecipientsOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'EmailRecipients' + /// + [Fact] + public void EmailRecipientsTest() + { + // TODO unit test for the property 'EmailRecipients' + } + + } + +} diff --git a/src/mailslurp.Test/Model/FilterBouncedRecipientsResultTests.cs b/src/mailslurp.Test/Model/FilterBouncedRecipientsResultTests.cs new file mode 100644 index 00000000..af72219d --- /dev/null +++ b/src/mailslurp.Test/Model/FilterBouncedRecipientsResultTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing FilterBouncedRecipientsResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FilterBouncedRecipientsResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for FilterBouncedRecipientsResult + //private FilterBouncedRecipientsResult instance; + + public FilterBouncedRecipientsResultTests() + { + // TODO uncomment below to create an instance of FilterBouncedRecipientsResult + //instance = new FilterBouncedRecipientsResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FilterBouncedRecipientsResult + /// + [Fact] + public void FilterBouncedRecipientsResultInstanceTest() + { + // TODO uncomment below to test "IsType" FilterBouncedRecipientsResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'FilteredRecipients' + /// + [Fact] + public void FilteredRecipientsTest() + { + // TODO unit test for the property 'FilteredRecipients' + } + + } + +} diff --git a/src/mailslurp.Test/Model/FlushExpiredInboxesResultTests.cs b/src/mailslurp.Test/Model/FlushExpiredInboxesResultTests.cs new file mode 100644 index 00000000..73ae24fe --- /dev/null +++ b/src/mailslurp.Test/Model/FlushExpiredInboxesResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing FlushExpiredInboxesResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FlushExpiredInboxesResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for FlushExpiredInboxesResult + //private FlushExpiredInboxesResult instance; + + public FlushExpiredInboxesResultTests() + { + // TODO uncomment below to create an instance of FlushExpiredInboxesResult + //instance = new FlushExpiredInboxesResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FlushExpiredInboxesResult + /// + [Fact] + public void FlushExpiredInboxesResultInstanceTest() + { + // TODO uncomment below to test "IsType" FlushExpiredInboxesResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxIds' + /// + [Fact] + public void InboxIdsTest() + { + // TODO unit test for the property 'InboxIds' + } + /// + /// Test the property 'ExpireBefore' + /// + [Fact] + public void ExpireBeforeTest() + { + // TODO unit test for the property 'ExpireBefore' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ForwardEmailOptionsTests.cs b/src/mailslurp.Test/Model/ForwardEmailOptionsTests.cs new file mode 100644 index 00000000..3a0e5a9a --- /dev/null +++ b/src/mailslurp.Test/Model/ForwardEmailOptionsTests.cs @@ -0,0 +1,119 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ForwardEmailOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ForwardEmailOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ForwardEmailOptions + //private ForwardEmailOptions instance; + + public ForwardEmailOptionsTests() + { + // TODO uncomment below to create an instance of ForwardEmailOptions + //instance = new ForwardEmailOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ForwardEmailOptions + /// + [Fact] + public void ForwardEmailOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" ForwardEmailOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'UseInboxName' + /// + [Fact] + public void UseInboxNameTest() + { + // TODO unit test for the property 'UseInboxName' + } + /// + /// Test the property 'FilterBouncedRecipients' + /// + [Fact] + public void FilterBouncedRecipientsTest() + { + // TODO unit test for the property 'FilterBouncedRecipients' + } + + } + +} diff --git a/src/mailslurp.Test/Model/GravatarUrlTests.cs b/src/mailslurp.Test/Model/GravatarUrlTests.cs new file mode 100644 index 00000000..82f19b42 --- /dev/null +++ b/src/mailslurp.Test/Model/GravatarUrlTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing GravatarUrl + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class GravatarUrlTests : IDisposable + { + // TODO uncomment below to declare an instance variable for GravatarUrl + //private GravatarUrl instance; + + public GravatarUrlTests() + { + // TODO uncomment below to create an instance of GravatarUrl + //instance = new GravatarUrl(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GravatarUrl + /// + [Fact] + public void GravatarUrlInstanceTest() + { + // TODO uncomment below to test "IsType" GravatarUrl + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Url' + /// + [Fact] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'Hash' + /// + [Fact] + public void HashTest() + { + // TODO unit test for the property 'Hash' + } + + } + +} diff --git a/src/mailslurp.Test/Model/GroupContactsDtoTests.cs b/src/mailslurp.Test/Model/GroupContactsDtoTests.cs new file mode 100644 index 00000000..5365d027 --- /dev/null +++ b/src/mailslurp.Test/Model/GroupContactsDtoTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing GroupContactsDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class GroupContactsDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for GroupContactsDto + //private GroupContactsDto instance; + + public GroupContactsDtoTests() + { + // TODO uncomment below to create an instance of GroupContactsDto + //instance = new GroupContactsDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GroupContactsDto + /// + [Fact] + public void GroupContactsDtoInstanceTest() + { + // TODO uncomment below to test "IsType" GroupContactsDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Group' + /// + [Fact] + public void GroupTest() + { + // TODO unit test for the property 'Group' + } + /// + /// Test the property 'Contacts' + /// + [Fact] + public void ContactsTest() + { + // TODO unit test for the property 'Contacts' + } + + } + +} diff --git a/src/mailslurp.Test/Model/GroupDtoTests.cs b/src/mailslurp.Test/Model/GroupDtoTests.cs new file mode 100644 index 00000000..313f712c --- /dev/null +++ b/src/mailslurp.Test/Model/GroupDtoTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing GroupDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class GroupDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for GroupDto + //private GroupDto instance; + + public GroupDtoTests() + { + // TODO uncomment below to create an instance of GroupDto + //instance = new GroupDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GroupDto + /// + [Fact] + public void GroupDtoInstanceTest() + { + // TODO uncomment below to test "IsType" GroupDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/GroupProjectionTests.cs b/src/mailslurp.Test/Model/GroupProjectionTests.cs new file mode 100644 index 00000000..9b442032 --- /dev/null +++ b/src/mailslurp.Test/Model/GroupProjectionTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing GroupProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class GroupProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for GroupProjection + //private GroupProjection instance; + + public GroupProjectionTests() + { + // TODO uncomment below to create an instance of GroupProjection + //instance = new GroupProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GroupProjection + /// + [Fact] + public void GroupProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" GroupProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/HTMLValidationResultTests.cs b/src/mailslurp.Test/Model/HTMLValidationResultTests.cs new file mode 100644 index 00000000..368dcf18 --- /dev/null +++ b/src/mailslurp.Test/Model/HTMLValidationResultTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing HTMLValidationResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HTMLValidationResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HTMLValidationResult + //private HTMLValidationResult instance; + + public HTMLValidationResultTests() + { + // TODO uncomment below to create an instance of HTMLValidationResult + //instance = new HTMLValidationResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HTMLValidationResult + /// + [Fact] + public void HTMLValidationResultInstanceTest() + { + // TODO uncomment below to test "IsType" HTMLValidationResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'IsValid' + /// + [Fact] + public void IsValidTest() + { + // TODO unit test for the property 'IsValid' + } + /// + /// Test the property 'Errors' + /// + [Fact] + public void ErrorsTest() + { + // TODO unit test for the property 'Errors' + } + /// + /// Test the property 'Warnings' + /// + [Fact] + public void WarningsTest() + { + // TODO unit test for the property 'Warnings' + } + + } + +} diff --git a/src/mailslurp.Test/Model/IPAddressResultTests.cs b/src/mailslurp.Test/Model/IPAddressResultTests.cs new file mode 100644 index 00000000..02d9da79 --- /dev/null +++ b/src/mailslurp.Test/Model/IPAddressResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing IPAddressResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class IPAddressResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for IPAddressResult + //private IPAddressResult instance; + + public IPAddressResultTests() + { + // TODO uncomment below to create an instance of IPAddressResult + //instance = new IPAddressResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of IPAddressResult + /// + [Fact] + public void IPAddressResultInstanceTest() + { + // TODO uncomment below to test "IsType" IPAddressResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Address' + /// + [Fact] + public void AddressTest() + { + // TODO unit test for the property 'Address' + } + /// + /// Test the property 'Hostname' + /// + [Fact] + public void HostnameTest() + { + // TODO unit test for the property 'Hostname' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ImapFlagOperationOptionsTests.cs b/src/mailslurp.Test/Model/ImapFlagOperationOptionsTests.cs new file mode 100644 index 00000000..8f141a7c --- /dev/null +++ b/src/mailslurp.Test/Model/ImapFlagOperationOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ImapFlagOperationOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ImapFlagOperationOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ImapFlagOperationOptions + //private ImapFlagOperationOptions instance; + + public ImapFlagOperationOptionsTests() + { + // TODO uncomment below to create an instance of ImapFlagOperationOptions + //instance = new ImapFlagOperationOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ImapFlagOperationOptions + /// + [Fact] + public void ImapFlagOperationOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" ImapFlagOperationOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'FlagOperation' + /// + [Fact] + public void FlagOperationTest() + { + // TODO unit test for the property 'FlagOperation' + } + /// + /// Test the property 'Flags' + /// + [Fact] + public void FlagsTest() + { + // TODO unit test for the property 'Flags' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ImapSmtpAccessDetailsTests.cs b/src/mailslurp.Test/Model/ImapSmtpAccessDetailsTests.cs new file mode 100644 index 00000000..91a84204 --- /dev/null +++ b/src/mailslurp.Test/Model/ImapSmtpAccessDetailsTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ImapSmtpAccessDetails + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ImapSmtpAccessDetailsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ImapSmtpAccessDetails + //private ImapSmtpAccessDetails instance; + + public ImapSmtpAccessDetailsTests() + { + // TODO uncomment below to create an instance of ImapSmtpAccessDetails + //instance = new ImapSmtpAccessDetails(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ImapSmtpAccessDetails + /// + [Fact] + public void ImapSmtpAccessDetailsInstanceTest() + { + // TODO uncomment below to test "IsType" ImapSmtpAccessDetails + //Assert.IsType(instance); + } + + + /// + /// Test the property 'SecureSmtpServerHost' + /// + [Fact] + public void SecureSmtpServerHostTest() + { + // TODO unit test for the property 'SecureSmtpServerHost' + } + /// + /// Test the property 'SecureSmtpServerPort' + /// + [Fact] + public void SecureSmtpServerPortTest() + { + // TODO unit test for the property 'SecureSmtpServerPort' + } + /// + /// Test the property 'SecureSmtpUsername' + /// + [Fact] + public void SecureSmtpUsernameTest() + { + // TODO unit test for the property 'SecureSmtpUsername' + } + /// + /// Test the property 'SecureSmtpPassword' + /// + [Fact] + public void SecureSmtpPasswordTest() + { + // TODO unit test for the property 'SecureSmtpPassword' + } + /// + /// Test the property 'SmtpServerHost' + /// + [Fact] + public void SmtpServerHostTest() + { + // TODO unit test for the property 'SmtpServerHost' + } + /// + /// Test the property 'SmtpServerPort' + /// + [Fact] + public void SmtpServerPortTest() + { + // TODO unit test for the property 'SmtpServerPort' + } + /// + /// Test the property 'SmtpUsername' + /// + [Fact] + public void SmtpUsernameTest() + { + // TODO unit test for the property 'SmtpUsername' + } + /// + /// Test the property 'SmtpPassword' + /// + [Fact] + public void SmtpPasswordTest() + { + // TODO unit test for the property 'SmtpPassword' + } + /// + /// Test the property 'ImapServerHost' + /// + [Fact] + public void ImapServerHostTest() + { + // TODO unit test for the property 'ImapServerHost' + } + /// + /// Test the property 'ImapServerPort' + /// + [Fact] + public void ImapServerPortTest() + { + // TODO unit test for the property 'ImapServerPort' + } + /// + /// Test the property 'ImapUsername' + /// + [Fact] + public void ImapUsernameTest() + { + // TODO unit test for the property 'ImapUsername' + } + /// + /// Test the property 'ImapPassword' + /// + [Fact] + public void ImapPasswordTest() + { + // TODO unit test for the property 'ImapPassword' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxByEmailAddressResultTests.cs b/src/mailslurp.Test/Model/InboxByEmailAddressResultTests.cs new file mode 100644 index 00000000..60a2ee6b --- /dev/null +++ b/src/mailslurp.Test/Model/InboxByEmailAddressResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxByEmailAddressResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxByEmailAddressResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxByEmailAddressResult + //private InboxByEmailAddressResult instance; + + public InboxByEmailAddressResultTests() + { + // TODO uncomment below to create an instance of InboxByEmailAddressResult + //instance = new InboxByEmailAddressResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxByEmailAddressResult + /// + [Fact] + public void InboxByEmailAddressResultInstanceTest() + { + // TODO uncomment below to test "IsType" InboxByEmailAddressResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Exists' + /// + [Fact] + public void ExistsTest() + { + // TODO unit test for the property 'Exists' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxByNameResultTests.cs b/src/mailslurp.Test/Model/InboxByNameResultTests.cs new file mode 100644 index 00000000..ba16aac9 --- /dev/null +++ b/src/mailslurp.Test/Model/InboxByNameResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxByNameResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxByNameResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxByNameResult + //private InboxByNameResult instance; + + public InboxByNameResultTests() + { + // TODO uncomment below to create an instance of InboxByNameResult + //instance = new InboxByNameResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxByNameResult + /// + [Fact] + public void InboxByNameResultInstanceTest() + { + // TODO uncomment below to test "IsType" InboxByNameResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Exists' + /// + [Fact] + public void ExistsTest() + { + // TODO unit test for the property 'Exists' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxDtoTests.cs b/src/mailslurp.Test/Model/InboxDtoTests.cs new file mode 100644 index 00000000..df61324f --- /dev/null +++ b/src/mailslurp.Test/Model/InboxDtoTests.cs @@ -0,0 +1,167 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxDto + //private InboxDto instance; + + public InboxDtoTests() + { + // TODO uncomment below to create an instance of InboxDto + //instance = new InboxDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxDto + /// + [Fact] + public void InboxDtoInstanceTest() + { + // TODO uncomment below to test "IsType" InboxDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'ExpiresAt' + /// + [Fact] + public void ExpiresAtTest() + { + // TODO unit test for the property 'ExpiresAt' + } + /// + /// Test the property 'Favourite' + /// + [Fact] + public void FavouriteTest() + { + // TODO unit test for the property 'Favourite' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'InboxType' + /// + [Fact] + public void InboxTypeTest() + { + // TODO unit test for the property 'InboxType' + } + /// + /// Test the property 'ReadOnly' + /// + [Fact] + public void ReadOnlyTest() + { + // TODO unit test for the property 'ReadOnly' + } + /// + /// Test the property 'VirtualInbox' + /// + [Fact] + public void VirtualInboxTest() + { + // TODO unit test for the property 'VirtualInbox' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxExistsDtoTests.cs b/src/mailslurp.Test/Model/InboxExistsDtoTests.cs new file mode 100644 index 00000000..8e32774e --- /dev/null +++ b/src/mailslurp.Test/Model/InboxExistsDtoTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxExistsDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxExistsDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxExistsDto + //private InboxExistsDto instance; + + public InboxExistsDtoTests() + { + // TODO uncomment below to create an instance of InboxExistsDto + //instance = new InboxExistsDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxExistsDto + /// + [Fact] + public void InboxExistsDtoInstanceTest() + { + // TODO uncomment below to test "IsType" InboxExistsDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Exists' + /// + [Fact] + public void ExistsTest() + { + // TODO unit test for the property 'Exists' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxForwarderDtoTests.cs b/src/mailslurp.Test/Model/InboxForwarderDtoTests.cs new file mode 100644 index 00000000..94cf81c7 --- /dev/null +++ b/src/mailslurp.Test/Model/InboxForwarderDtoTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxForwarderDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxForwarderDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxForwarderDto + //private InboxForwarderDto instance; + + public InboxForwarderDtoTests() + { + // TODO uncomment below to create an instance of InboxForwarderDto + //instance = new InboxForwarderDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxForwarderDto + /// + [Fact] + public void InboxForwarderDtoInstanceTest() + { + // TODO uncomment below to test "IsType" InboxForwarderDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Field' + /// + [Fact] + public void FieldTest() + { + // TODO unit test for the property 'Field' + } + /// + /// Test the property 'Match' + /// + [Fact] + public void MatchTest() + { + // TODO unit test for the property 'Match' + } + /// + /// Test the property 'ForwardToRecipients' + /// + [Fact] + public void ForwardToRecipientsTest() + { + // TODO unit test for the property 'ForwardToRecipients' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxForwarderEventProjectionTests.cs b/src/mailslurp.Test/Model/InboxForwarderEventProjectionTests.cs new file mode 100644 index 00000000..5391ceec --- /dev/null +++ b/src/mailslurp.Test/Model/InboxForwarderEventProjectionTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxForwarderEventProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxForwarderEventProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxForwarderEventProjection + //private InboxForwarderEventProjection instance; + + public InboxForwarderEventProjectionTests() + { + // TODO uncomment below to create an instance of InboxForwarderEventProjection + //instance = new InboxForwarderEventProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxForwarderEventProjection + /// + [Fact] + public void InboxForwarderEventProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" InboxForwarderEventProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'EmailId' + /// + [Fact] + public void EmailIdTest() + { + // TODO unit test for the property 'EmailId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ForwarderId' + /// + [Fact] + public void ForwarderIdTest() + { + // TODO unit test for the property 'ForwarderId' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxForwarderTestOptionsTests.cs b/src/mailslurp.Test/Model/InboxForwarderTestOptionsTests.cs new file mode 100644 index 00000000..c037848c --- /dev/null +++ b/src/mailslurp.Test/Model/InboxForwarderTestOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxForwarderTestOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxForwarderTestOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxForwarderTestOptions + //private InboxForwarderTestOptions instance; + + public InboxForwarderTestOptionsTests() + { + // TODO uncomment below to create an instance of InboxForwarderTestOptions + //instance = new InboxForwarderTestOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxForwarderTestOptions + /// + [Fact] + public void InboxForwarderTestOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" InboxForwarderTestOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'TestValue' + /// + [Fact] + public void TestValueTest() + { + // TODO unit test for the property 'TestValue' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxForwarderTestResultTests.cs b/src/mailslurp.Test/Model/InboxForwarderTestResultTests.cs new file mode 100644 index 00000000..208db310 --- /dev/null +++ b/src/mailslurp.Test/Model/InboxForwarderTestResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxForwarderTestResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxForwarderTestResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxForwarderTestResult + //private InboxForwarderTestResult instance; + + public InboxForwarderTestResultTests() + { + // TODO uncomment below to create an instance of InboxForwarderTestResult + //instance = new InboxForwarderTestResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxForwarderTestResult + /// + [Fact] + public void InboxForwarderTestResultInstanceTest() + { + // TODO uncomment below to test "IsType" InboxForwarderTestResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Matches' + /// + [Fact] + public void MatchesTest() + { + // TODO unit test for the property 'Matches' + } + /// + /// Test the property 'DoesMatch' + /// + [Fact] + public void DoesMatchTest() + { + // TODO unit test for the property 'DoesMatch' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxIdItemTests.cs b/src/mailslurp.Test/Model/InboxIdItemTests.cs new file mode 100644 index 00000000..27f95877 --- /dev/null +++ b/src/mailslurp.Test/Model/InboxIdItemTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxIdItem + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxIdItemTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxIdItem + //private InboxIdItem instance; + + public InboxIdItemTests() + { + // TODO uncomment below to create an instance of InboxIdItem + //instance = new InboxIdItem(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxIdItem + /// + [Fact] + public void InboxIdItemInstanceTest() + { + // TODO uncomment below to test "IsType" InboxIdItem + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxIdsResultTests.cs b/src/mailslurp.Test/Model/InboxIdsResultTests.cs new file mode 100644 index 00000000..c56c60eb --- /dev/null +++ b/src/mailslurp.Test/Model/InboxIdsResultTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxIdsResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxIdsResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxIdsResult + //private InboxIdsResult instance; + + public InboxIdsResultTests() + { + // TODO uncomment below to create an instance of InboxIdsResult + //instance = new InboxIdsResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxIdsResult + /// + [Fact] + public void InboxIdsResultInstanceTest() + { + // TODO uncomment below to test "IsType" InboxIdsResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxIds' + /// + [Fact] + public void InboxIdsTest() + { + // TODO unit test for the property 'InboxIds' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxPreviewTests.cs b/src/mailslurp.Test/Model/InboxPreviewTests.cs new file mode 100644 index 00000000..81588db3 --- /dev/null +++ b/src/mailslurp.Test/Model/InboxPreviewTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxPreview + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxPreviewTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxPreview + //private InboxPreview instance; + + public InboxPreviewTests() + { + // TODO uncomment below to create an instance of InboxPreview + //instance = new InboxPreview(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxPreview + /// + [Fact] + public void InboxPreviewInstanceTest() + { + // TODO uncomment below to test "IsType" InboxPreview + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'Favourite' + /// + [Fact] + public void FavouriteTest() + { + // TODO unit test for the property 'Favourite' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'TeamAccess' + /// + [Fact] + public void TeamAccessTest() + { + // TODO unit test for the property 'TeamAccess' + } + /// + /// Test the property 'InboxType' + /// + [Fact] + public void InboxTypeTest() + { + // TODO unit test for the property 'InboxType' + } + /// + /// Test the property 'VirtualInbox' + /// + [Fact] + public void VirtualInboxTest() + { + // TODO unit test for the property 'VirtualInbox' + } + /// + /// Test the property 'ExpiresAt' + /// + [Fact] + public void ExpiresAtTest() + { + // TODO unit test for the property 'ExpiresAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxRulesetDtoTests.cs b/src/mailslurp.Test/Model/InboxRulesetDtoTests.cs new file mode 100644 index 00000000..537bfbe2 --- /dev/null +++ b/src/mailslurp.Test/Model/InboxRulesetDtoTests.cs @@ -0,0 +1,119 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxRulesetDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxRulesetDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxRulesetDto + //private InboxRulesetDto instance; + + public InboxRulesetDtoTests() + { + // TODO uncomment below to create an instance of InboxRulesetDto + //instance = new InboxRulesetDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxRulesetDto + /// + [Fact] + public void InboxRulesetDtoInstanceTest() + { + // TODO uncomment below to test "IsType" InboxRulesetDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Scope' + /// + [Fact] + public void ScopeTest() + { + // TODO unit test for the property 'Scope' + } + /// + /// Test the property 'Action' + /// + [Fact] + public void ActionTest() + { + // TODO unit test for the property 'Action' + } + /// + /// Test the property 'Target' + /// + [Fact] + public void TargetTest() + { + // TODO unit test for the property 'Target' + } + /// + /// Test the property 'Handler' + /// + [Fact] + public void HandlerTest() + { + // TODO unit test for the property 'Handler' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxRulesetTestOptionsTests.cs b/src/mailslurp.Test/Model/InboxRulesetTestOptionsTests.cs new file mode 100644 index 00000000..6362216b --- /dev/null +++ b/src/mailslurp.Test/Model/InboxRulesetTestOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxRulesetTestOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxRulesetTestOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxRulesetTestOptions + //private InboxRulesetTestOptions instance; + + public InboxRulesetTestOptionsTests() + { + // TODO uncomment below to create an instance of InboxRulesetTestOptions + //instance = new InboxRulesetTestOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxRulesetTestOptions + /// + [Fact] + public void InboxRulesetTestOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" InboxRulesetTestOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'TestTarget' + /// + [Fact] + public void TestTargetTest() + { + // TODO unit test for the property 'TestTarget' + } + + } + +} diff --git a/src/mailslurp.Test/Model/InboxRulesetTestResultTests.cs b/src/mailslurp.Test/Model/InboxRulesetTestResultTests.cs new file mode 100644 index 00000000..1d7f1773 --- /dev/null +++ b/src/mailslurp.Test/Model/InboxRulesetTestResultTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing InboxRulesetTestResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboxRulesetTestResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InboxRulesetTestResult + //private InboxRulesetTestResult instance; + + public InboxRulesetTestResultTests() + { + // TODO uncomment below to create an instance of InboxRulesetTestResult + //instance = new InboxRulesetTestResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboxRulesetTestResult + /// + [Fact] + public void InboxRulesetTestResultInstanceTest() + { + // TODO uncomment below to test "IsType" InboxRulesetTestResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'RulesetMatches' + /// + [Fact] + public void RulesetMatchesTest() + { + // TODO unit test for the property 'RulesetMatches' + } + /// + /// Test the property 'Matches' + /// + [Fact] + public void MatchesTest() + { + // TODO unit test for the property 'Matches' + } + + } + +} diff --git a/src/mailslurp.Test/Model/JSONSchemaDtoTests.cs b/src/mailslurp.Test/Model/JSONSchemaDtoTests.cs new file mode 100644 index 00000000..79876d06 --- /dev/null +++ b/src/mailslurp.Test/Model/JSONSchemaDtoTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing JSONSchemaDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class JSONSchemaDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for JSONSchemaDto + //private JSONSchemaDto instance; + + public JSONSchemaDtoTests() + { + // TODO uncomment below to create an instance of JSONSchemaDto + //instance = new JSONSchemaDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of JSONSchemaDto + /// + [Fact] + public void JSONSchemaDtoInstanceTest() + { + // TODO uncomment below to test "IsType" JSONSchemaDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Value' + /// + [Fact] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ListUnsubscribeRecipientProjectionTests.cs b/src/mailslurp.Test/Model/ListUnsubscribeRecipientProjectionTests.cs new file mode 100644 index 00000000..18babb02 --- /dev/null +++ b/src/mailslurp.Test/Model/ListUnsubscribeRecipientProjectionTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ListUnsubscribeRecipientProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ListUnsubscribeRecipientProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ListUnsubscribeRecipientProjection + //private ListUnsubscribeRecipientProjection instance; + + public ListUnsubscribeRecipientProjectionTests() + { + // TODO uncomment below to create an instance of ListUnsubscribeRecipientProjection + //instance = new ListUnsubscribeRecipientProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ListUnsubscribeRecipientProjection + /// + [Fact] + public void ListUnsubscribeRecipientProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" ListUnsubscribeRecipientProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + + } + +} diff --git a/src/mailslurp.Test/Model/MatchOptionTests.cs b/src/mailslurp.Test/Model/MatchOptionTests.cs new file mode 100644 index 00000000..61027947 --- /dev/null +++ b/src/mailslurp.Test/Model/MatchOptionTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing MatchOption + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MatchOptionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MatchOption + //private MatchOption instance; + + public MatchOptionTests() + { + // TODO uncomment below to create an instance of MatchOption + //instance = new MatchOption(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MatchOption + /// + [Fact] + public void MatchOptionInstanceTest() + { + // TODO uncomment below to test "IsType" MatchOption + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Field' + /// + [Fact] + public void FieldTest() + { + // TODO unit test for the property 'Field' + } + /// + /// Test the property 'Should' + /// + [Fact] + public void ShouldTest() + { + // TODO unit test for the property 'Should' + } + /// + /// Test the property 'Value' + /// + [Fact] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + + } + +} diff --git a/src/mailslurp.Test/Model/MatchOptionsTests.cs b/src/mailslurp.Test/Model/MatchOptionsTests.cs new file mode 100644 index 00000000..747e2b2a --- /dev/null +++ b/src/mailslurp.Test/Model/MatchOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing MatchOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MatchOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MatchOptions + //private MatchOptions instance; + + public MatchOptionsTests() + { + // TODO uncomment below to create an instance of MatchOptions + //instance = new MatchOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MatchOptions + /// + [Fact] + public void MatchOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" MatchOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Matches' + /// + [Fact] + public void MatchesTest() + { + // TODO unit test for the property 'Matches' + } + /// + /// Test the property 'Conditions' + /// + [Fact] + public void ConditionsTest() + { + // TODO unit test for the property 'Conditions' + } + + } + +} diff --git a/src/mailslurp.Test/Model/MissedEmailDtoTests.cs b/src/mailslurp.Test/Model/MissedEmailDtoTests.cs new file mode 100644 index 00000000..7b8e085d --- /dev/null +++ b/src/mailslurp.Test/Model/MissedEmailDtoTests.cs @@ -0,0 +1,191 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing MissedEmailDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MissedEmailDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MissedEmailDto + //private MissedEmailDto instance; + + public MissedEmailDtoTests() + { + // TODO uncomment below to create an instance of MissedEmailDto + //instance = new MissedEmailDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MissedEmailDto + /// + [Fact] + public void MissedEmailDtoInstanceTest() + { + // TODO uncomment below to test "IsType" MissedEmailDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'BodyExcerpt' + /// + [Fact] + public void BodyExcerptTest() + { + // TODO unit test for the property 'BodyExcerpt' + } + /// + /// Test the property 'AttachmentCount' + /// + [Fact] + public void AttachmentCountTest() + { + // TODO unit test for the property 'AttachmentCount' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'RawUrl' + /// + [Fact] + public void RawUrlTest() + { + // TODO unit test for the property 'RawUrl' + } + /// + /// Test the property 'RawKey' + /// + [Fact] + public void RawKeyTest() + { + // TODO unit test for the property 'RawKey' + } + /// + /// Test the property 'RawBucket' + /// + [Fact] + public void RawBucketTest() + { + // TODO unit test for the property 'RawBucket' + } + /// + /// Test the property 'CanRestore' + /// + [Fact] + public void CanRestoreTest() + { + // TODO unit test for the property 'CanRestore' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'InboxIds' + /// + [Fact] + public void InboxIdsTest() + { + // TODO unit test for the property 'InboxIds' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/MissedEmailProjectionTests.cs b/src/mailslurp.Test/Model/MissedEmailProjectionTests.cs new file mode 100644 index 00000000..2503da5e --- /dev/null +++ b/src/mailslurp.Test/Model/MissedEmailProjectionTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing MissedEmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MissedEmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MissedEmailProjection + //private MissedEmailProjection instance; + + public MissedEmailProjectionTests() + { + // TODO uncomment below to create an instance of MissedEmailProjection + //instance = new MissedEmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MissedEmailProjection + /// + [Fact] + public void MissedEmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" MissedEmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/NameServerRecordTests.cs b/src/mailslurp.Test/Model/NameServerRecordTests.cs new file mode 100644 index 00000000..66dd5476 --- /dev/null +++ b/src/mailslurp.Test/Model/NameServerRecordTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing NameServerRecord + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NameServerRecordTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NameServerRecord + //private NameServerRecord instance; + + public NameServerRecordTests() + { + // TODO uncomment below to create an instance of NameServerRecord + //instance = new NameServerRecord(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NameServerRecord + /// + [Fact] + public void NameServerRecordInstanceTest() + { + // TODO uncomment below to test "IsType" NameServerRecord + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Raw' + /// + [Fact] + public void RawTest() + { + // TODO unit test for the property 'Raw' + } + /// + /// Test the property 'RecordType' + /// + [Fact] + public void RecordTypeTest() + { + // TODO unit test for the property 'RecordType' + } + /// + /// Test the property 'Priority' + /// + [Fact] + public void PriorityTest() + { + // TODO unit test for the property 'Priority' + } + /// + /// Test the property 'Value' + /// + [Fact] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + + } + +} diff --git a/src/mailslurp.Test/Model/OrganizationInboxProjectionTests.cs b/src/mailslurp.Test/Model/OrganizationInboxProjectionTests.cs new file mode 100644 index 00000000..75b79c2e --- /dev/null +++ b/src/mailslurp.Test/Model/OrganizationInboxProjectionTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing OrganizationInboxProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OrganizationInboxProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OrganizationInboxProjection + //private OrganizationInboxProjection instance; + + public OrganizationInboxProjectionTests() + { + // TODO uncomment below to create an instance of OrganizationInboxProjection + //instance = new OrganizationInboxProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrganizationInboxProjection + /// + [Fact] + public void OrganizationInboxProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" OrganizationInboxProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'Favourite' + /// + [Fact] + public void FavouriteTest() + { + // TODO unit test for the property 'Favourite' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'TeamAccess' + /// + [Fact] + public void TeamAccessTest() + { + // TODO unit test for the property 'TeamAccess' + } + /// + /// Test the property 'InboxType' + /// + [Fact] + public void InboxTypeTest() + { + // TODO unit test for the property 'InboxType' + } + /// + /// Test the property 'ReadOnly' + /// + [Fact] + public void ReadOnlyTest() + { + // TODO unit test for the property 'ReadOnly' + } + /// + /// Test the property 'VirtualInbox' + /// + [Fact] + public void VirtualInboxTest() + { + // TODO unit test for the property 'VirtualInbox' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageAliasTests.cs b/src/mailslurp.Test/Model/PageAliasTests.cs new file mode 100644 index 00000000..36a924d3 --- /dev/null +++ b/src/mailslurp.Test/Model/PageAliasTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageAlias + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageAliasTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageAlias + //private PageAlias instance; + + public PageAliasTests() + { + // TODO uncomment below to create an instance of PageAlias + //instance = new PageAlias(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageAlias + /// + [Fact] + public void PageAliasInstanceTest() + { + // TODO uncomment below to test "IsType" PageAlias + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageAttachmentEntityTests.cs b/src/mailslurp.Test/Model/PageAttachmentEntityTests.cs new file mode 100644 index 00000000..584629b2 --- /dev/null +++ b/src/mailslurp.Test/Model/PageAttachmentEntityTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageAttachmentEntity + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageAttachmentEntityTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageAttachmentEntity + //private PageAttachmentEntity instance; + + public PageAttachmentEntityTests() + { + // TODO uncomment below to create an instance of PageAttachmentEntity + //instance = new PageAttachmentEntity(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageAttachmentEntity + /// + [Fact] + public void PageAttachmentEntityInstanceTest() + { + // TODO uncomment below to test "IsType" PageAttachmentEntity + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageBouncedEmailTests.cs b/src/mailslurp.Test/Model/PageBouncedEmailTests.cs new file mode 100644 index 00000000..512a1215 --- /dev/null +++ b/src/mailslurp.Test/Model/PageBouncedEmailTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageBouncedEmail + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageBouncedEmailTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageBouncedEmail + //private PageBouncedEmail instance; + + public PageBouncedEmailTests() + { + // TODO uncomment below to create an instance of PageBouncedEmail + //instance = new PageBouncedEmail(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageBouncedEmail + /// + [Fact] + public void PageBouncedEmailInstanceTest() + { + // TODO uncomment below to test "IsType" PageBouncedEmail + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageBouncedRecipientsTests.cs b/src/mailslurp.Test/Model/PageBouncedRecipientsTests.cs new file mode 100644 index 00000000..45a27259 --- /dev/null +++ b/src/mailslurp.Test/Model/PageBouncedRecipientsTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageBouncedRecipients + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageBouncedRecipientsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageBouncedRecipients + //private PageBouncedRecipients instance; + + public PageBouncedRecipientsTests() + { + // TODO uncomment below to create an instance of PageBouncedRecipients + //instance = new PageBouncedRecipients(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageBouncedRecipients + /// + [Fact] + public void PageBouncedRecipientsInstanceTest() + { + // TODO uncomment below to test "IsType" PageBouncedRecipients + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageComplaintTests.cs b/src/mailslurp.Test/Model/PageComplaintTests.cs new file mode 100644 index 00000000..a83df932 --- /dev/null +++ b/src/mailslurp.Test/Model/PageComplaintTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageComplaint + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageComplaintTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageComplaint + //private PageComplaint instance; + + public PageComplaintTests() + { + // TODO uncomment below to create an instance of PageComplaint + //instance = new PageComplaint(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageComplaint + /// + [Fact] + public void PageComplaintInstanceTest() + { + // TODO uncomment below to test "IsType" PageComplaint + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageContactProjectionTests.cs b/src/mailslurp.Test/Model/PageContactProjectionTests.cs new file mode 100644 index 00000000..be48e643 --- /dev/null +++ b/src/mailslurp.Test/Model/PageContactProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageContactProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageContactProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageContactProjection + //private PageContactProjection instance; + + public PageContactProjectionTests() + { + // TODO uncomment below to create an instance of PageContactProjection + //instance = new PageContactProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageContactProjection + /// + [Fact] + public void PageContactProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageContactProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageDeliveryStatusTests.cs b/src/mailslurp.Test/Model/PageDeliveryStatusTests.cs new file mode 100644 index 00000000..e09436a0 --- /dev/null +++ b/src/mailslurp.Test/Model/PageDeliveryStatusTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageDeliveryStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageDeliveryStatusTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageDeliveryStatus + //private PageDeliveryStatus instance; + + public PageDeliveryStatusTests() + { + // TODO uncomment below to create an instance of PageDeliveryStatus + //instance = new PageDeliveryStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageDeliveryStatus + /// + [Fact] + public void PageDeliveryStatusInstanceTest() + { + // TODO uncomment below to test "IsType" PageDeliveryStatus + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageEmailPreviewTests.cs b/src/mailslurp.Test/Model/PageEmailPreviewTests.cs new file mode 100644 index 00000000..b652df7b --- /dev/null +++ b/src/mailslurp.Test/Model/PageEmailPreviewTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageEmailPreview + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageEmailPreviewTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageEmailPreview + //private PageEmailPreview instance; + + public PageEmailPreviewTests() + { + // TODO uncomment below to create an instance of PageEmailPreview + //instance = new PageEmailPreview(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageEmailPreview + /// + [Fact] + public void PageEmailPreviewInstanceTest() + { + // TODO uncomment below to test "IsType" PageEmailPreview + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageEmailProjectionTests.cs b/src/mailslurp.Test/Model/PageEmailProjectionTests.cs new file mode 100644 index 00000000..d28fde58 --- /dev/null +++ b/src/mailslurp.Test/Model/PageEmailProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageEmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageEmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageEmailProjection + //private PageEmailProjection instance; + + public PageEmailProjectionTests() + { + // TODO uncomment below to create an instance of PageEmailProjection + //instance = new PageEmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageEmailProjection + /// + [Fact] + public void PageEmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageEmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageEmailValidationRequestTests.cs b/src/mailslurp.Test/Model/PageEmailValidationRequestTests.cs new file mode 100644 index 00000000..2898a459 --- /dev/null +++ b/src/mailslurp.Test/Model/PageEmailValidationRequestTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageEmailValidationRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageEmailValidationRequestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageEmailValidationRequest + //private PageEmailValidationRequest instance; + + public PageEmailValidationRequestTests() + { + // TODO uncomment below to create an instance of PageEmailValidationRequest + //instance = new PageEmailValidationRequest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageEmailValidationRequest + /// + [Fact] + public void PageEmailValidationRequestInstanceTest() + { + // TODO uncomment below to test "IsType" PageEmailValidationRequest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageExpiredInboxRecordProjectionTests.cs b/src/mailslurp.Test/Model/PageExpiredInboxRecordProjectionTests.cs new file mode 100644 index 00000000..6acfb235 --- /dev/null +++ b/src/mailslurp.Test/Model/PageExpiredInboxRecordProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageExpiredInboxRecordProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageExpiredInboxRecordProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageExpiredInboxRecordProjection + //private PageExpiredInboxRecordProjection instance; + + public PageExpiredInboxRecordProjectionTests() + { + // TODO uncomment below to create an instance of PageExpiredInboxRecordProjection + //instance = new PageExpiredInboxRecordProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageExpiredInboxRecordProjection + /// + [Fact] + public void PageExpiredInboxRecordProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageExpiredInboxRecordProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageGroupProjectionTests.cs b/src/mailslurp.Test/Model/PageGroupProjectionTests.cs new file mode 100644 index 00000000..fa69d8c8 --- /dev/null +++ b/src/mailslurp.Test/Model/PageGroupProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageGroupProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageGroupProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageGroupProjection + //private PageGroupProjection instance; + + public PageGroupProjectionTests() + { + // TODO uncomment below to create an instance of PageGroupProjection + //instance = new PageGroupProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageGroupProjection + /// + [Fact] + public void PageGroupProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageGroupProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageInboxForwarderDtoTests.cs b/src/mailslurp.Test/Model/PageInboxForwarderDtoTests.cs new file mode 100644 index 00000000..fcc7333d --- /dev/null +++ b/src/mailslurp.Test/Model/PageInboxForwarderDtoTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageInboxForwarderDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageInboxForwarderDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageInboxForwarderDto + //private PageInboxForwarderDto instance; + + public PageInboxForwarderDtoTests() + { + // TODO uncomment below to create an instance of PageInboxForwarderDto + //instance = new PageInboxForwarderDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageInboxForwarderDto + /// + [Fact] + public void PageInboxForwarderDtoInstanceTest() + { + // TODO uncomment below to test "IsType" PageInboxForwarderDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageInboxForwarderEventsTests.cs b/src/mailslurp.Test/Model/PageInboxForwarderEventsTests.cs new file mode 100644 index 00000000..2d11c336 --- /dev/null +++ b/src/mailslurp.Test/Model/PageInboxForwarderEventsTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageInboxForwarderEvents + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageInboxForwarderEventsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageInboxForwarderEvents + //private PageInboxForwarderEvents instance; + + public PageInboxForwarderEventsTests() + { + // TODO uncomment below to create an instance of PageInboxForwarderEvents + //instance = new PageInboxForwarderEvents(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageInboxForwarderEvents + /// + [Fact] + public void PageInboxForwarderEventsInstanceTest() + { + // TODO uncomment below to test "IsType" PageInboxForwarderEvents + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageInboxProjectionTests.cs b/src/mailslurp.Test/Model/PageInboxProjectionTests.cs new file mode 100644 index 00000000..1036274a --- /dev/null +++ b/src/mailslurp.Test/Model/PageInboxProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageInboxProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageInboxProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageInboxProjection + //private PageInboxProjection instance; + + public PageInboxProjectionTests() + { + // TODO uncomment below to create an instance of PageInboxProjection + //instance = new PageInboxProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageInboxProjection + /// + [Fact] + public void PageInboxProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageInboxProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageInboxRulesetDtoTests.cs b/src/mailslurp.Test/Model/PageInboxRulesetDtoTests.cs new file mode 100644 index 00000000..4c0406c9 --- /dev/null +++ b/src/mailslurp.Test/Model/PageInboxRulesetDtoTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageInboxRulesetDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageInboxRulesetDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageInboxRulesetDto + //private PageInboxRulesetDto instance; + + public PageInboxRulesetDtoTests() + { + // TODO uncomment below to create an instance of PageInboxRulesetDto + //instance = new PageInboxRulesetDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageInboxRulesetDto + /// + [Fact] + public void PageInboxRulesetDtoInstanceTest() + { + // TODO uncomment below to test "IsType" PageInboxRulesetDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageListUnsubscribeRecipientsTests.cs b/src/mailslurp.Test/Model/PageListUnsubscribeRecipientsTests.cs new file mode 100644 index 00000000..9e785fb6 --- /dev/null +++ b/src/mailslurp.Test/Model/PageListUnsubscribeRecipientsTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageListUnsubscribeRecipients + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageListUnsubscribeRecipientsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageListUnsubscribeRecipients + //private PageListUnsubscribeRecipients instance; + + public PageListUnsubscribeRecipientsTests() + { + // TODO uncomment below to create an instance of PageListUnsubscribeRecipients + //instance = new PageListUnsubscribeRecipients(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageListUnsubscribeRecipients + /// + [Fact] + public void PageListUnsubscribeRecipientsInstanceTest() + { + // TODO uncomment below to test "IsType" PageListUnsubscribeRecipients + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageMissedEmailProjectionTests.cs b/src/mailslurp.Test/Model/PageMissedEmailProjectionTests.cs new file mode 100644 index 00000000..589b7876 --- /dev/null +++ b/src/mailslurp.Test/Model/PageMissedEmailProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageMissedEmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageMissedEmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageMissedEmailProjection + //private PageMissedEmailProjection instance; + + public PageMissedEmailProjectionTests() + { + // TODO uncomment below to create an instance of PageMissedEmailProjection + //instance = new PageMissedEmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageMissedEmailProjection + /// + [Fact] + public void PageMissedEmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageMissedEmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageOrganizationInboxProjectionTests.cs b/src/mailslurp.Test/Model/PageOrganizationInboxProjectionTests.cs new file mode 100644 index 00000000..edc544f5 --- /dev/null +++ b/src/mailslurp.Test/Model/PageOrganizationInboxProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageOrganizationInboxProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageOrganizationInboxProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageOrganizationInboxProjection + //private PageOrganizationInboxProjection instance; + + public PageOrganizationInboxProjectionTests() + { + // TODO uncomment below to create an instance of PageOrganizationInboxProjection + //instance = new PageOrganizationInboxProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageOrganizationInboxProjection + /// + [Fact] + public void PageOrganizationInboxProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageOrganizationInboxProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PagePhoneNumberProjectionTests.cs b/src/mailslurp.Test/Model/PagePhoneNumberProjectionTests.cs new file mode 100644 index 00000000..65dd36c2 --- /dev/null +++ b/src/mailslurp.Test/Model/PagePhoneNumberProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PagePhoneNumberProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PagePhoneNumberProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PagePhoneNumberProjection + //private PagePhoneNumberProjection instance; + + public PagePhoneNumberProjectionTests() + { + // TODO uncomment below to create an instance of PagePhoneNumberProjection + //instance = new PagePhoneNumberProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PagePhoneNumberProjection + /// + [Fact] + public void PagePhoneNumberProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PagePhoneNumberProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageScheduledJobsTests.cs b/src/mailslurp.Test/Model/PageScheduledJobsTests.cs new file mode 100644 index 00000000..1ab6bc8d --- /dev/null +++ b/src/mailslurp.Test/Model/PageScheduledJobsTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageScheduledJobs + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageScheduledJobsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageScheduledJobs + //private PageScheduledJobs instance; + + public PageScheduledJobsTests() + { + // TODO uncomment below to create an instance of PageScheduledJobs + //instance = new PageScheduledJobs(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageScheduledJobs + /// + [Fact] + public void PageScheduledJobsInstanceTest() + { + // TODO uncomment below to test "IsType" PageScheduledJobs + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageSentEmailProjectionTests.cs b/src/mailslurp.Test/Model/PageSentEmailProjectionTests.cs new file mode 100644 index 00000000..5cda6917 --- /dev/null +++ b/src/mailslurp.Test/Model/PageSentEmailProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageSentEmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageSentEmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageSentEmailProjection + //private PageSentEmailProjection instance; + + public PageSentEmailProjectionTests() + { + // TODO uncomment below to create an instance of PageSentEmailProjection + //instance = new PageSentEmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageSentEmailProjection + /// + [Fact] + public void PageSentEmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageSentEmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageSentEmailWithQueueProjectionTests.cs b/src/mailslurp.Test/Model/PageSentEmailWithQueueProjectionTests.cs new file mode 100644 index 00000000..57670d62 --- /dev/null +++ b/src/mailslurp.Test/Model/PageSentEmailWithQueueProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageSentEmailWithQueueProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageSentEmailWithQueueProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageSentEmailWithQueueProjection + //private PageSentEmailWithQueueProjection instance; + + public PageSentEmailWithQueueProjectionTests() + { + // TODO uncomment below to create an instance of PageSentEmailWithQueueProjection + //instance = new PageSentEmailWithQueueProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageSentEmailWithQueueProjection + /// + [Fact] + public void PageSentEmailWithQueueProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageSentEmailWithQueueProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageSmsProjectionTests.cs b/src/mailslurp.Test/Model/PageSmsProjectionTests.cs new file mode 100644 index 00000000..a545e1a6 --- /dev/null +++ b/src/mailslurp.Test/Model/PageSmsProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageSmsProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageSmsProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageSmsProjection + //private PageSmsProjection instance; + + public PageSmsProjectionTests() + { + // TODO uncomment below to create an instance of PageSmsProjection + //instance = new PageSmsProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageSmsProjection + /// + [Fact] + public void PageSmsProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageSmsProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageTemplateProjectionTests.cs b/src/mailslurp.Test/Model/PageTemplateProjectionTests.cs new file mode 100644 index 00000000..38093852 --- /dev/null +++ b/src/mailslurp.Test/Model/PageTemplateProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageTemplateProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageTemplateProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageTemplateProjection + //private PageTemplateProjection instance; + + public PageTemplateProjectionTests() + { + // TODO uncomment below to create an instance of PageTemplateProjection + //instance = new PageTemplateProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageTemplateProjection + /// + [Fact] + public void PageTemplateProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageTemplateProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageThreadProjectionTests.cs b/src/mailslurp.Test/Model/PageThreadProjectionTests.cs new file mode 100644 index 00000000..03c737c5 --- /dev/null +++ b/src/mailslurp.Test/Model/PageThreadProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageThreadProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageThreadProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageThreadProjection + //private PageThreadProjection instance; + + public PageThreadProjectionTests() + { + // TODO uncomment below to create an instance of PageThreadProjection + //instance = new PageThreadProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageThreadProjection + /// + [Fact] + public void PageThreadProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageThreadProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageTrackingPixelProjectionTests.cs b/src/mailslurp.Test/Model/PageTrackingPixelProjectionTests.cs new file mode 100644 index 00000000..7a3fbfbe --- /dev/null +++ b/src/mailslurp.Test/Model/PageTrackingPixelProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageTrackingPixelProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageTrackingPixelProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageTrackingPixelProjection + //private PageTrackingPixelProjection instance; + + public PageTrackingPixelProjectionTests() + { + // TODO uncomment below to create an instance of PageTrackingPixelProjection + //instance = new PageTrackingPixelProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageTrackingPixelProjection + /// + [Fact] + public void PageTrackingPixelProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageTrackingPixelProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageUnknownMissedEmailProjectionTests.cs b/src/mailslurp.Test/Model/PageUnknownMissedEmailProjectionTests.cs new file mode 100644 index 00000000..094af7b1 --- /dev/null +++ b/src/mailslurp.Test/Model/PageUnknownMissedEmailProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageUnknownMissedEmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageUnknownMissedEmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageUnknownMissedEmailProjection + //private PageUnknownMissedEmailProjection instance; + + public PageUnknownMissedEmailProjectionTests() + { + // TODO uncomment below to create an instance of PageUnknownMissedEmailProjection + //instance = new PageUnknownMissedEmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageUnknownMissedEmailProjection + /// + [Fact] + public void PageUnknownMissedEmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageUnknownMissedEmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageWebhookProjectionTests.cs b/src/mailslurp.Test/Model/PageWebhookProjectionTests.cs new file mode 100644 index 00000000..f04cfdcf --- /dev/null +++ b/src/mailslurp.Test/Model/PageWebhookProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageWebhookProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageWebhookProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageWebhookProjection + //private PageWebhookProjection instance; + + public PageWebhookProjectionTests() + { + // TODO uncomment below to create an instance of PageWebhookProjection + //instance = new PageWebhookProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageWebhookProjection + /// + [Fact] + public void PageWebhookProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PageWebhookProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageWebhookResultTests.cs b/src/mailslurp.Test/Model/PageWebhookResultTests.cs new file mode 100644 index 00000000..e9b54c7a --- /dev/null +++ b/src/mailslurp.Test/Model/PageWebhookResultTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageWebhookResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageWebhookResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageWebhookResult + //private PageWebhookResult instance; + + public PageWebhookResultTests() + { + // TODO uncomment below to create an instance of PageWebhookResult + //instance = new PageWebhookResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageWebhookResult + /// + [Fact] + public void PageWebhookResultInstanceTest() + { + // TODO uncomment below to test "IsType" PageWebhookResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Pageable' + /// + [Fact] + public void PageableTest() + { + // TODO unit test for the property 'Pageable' + } + /// + /// Test the property 'Total' + /// + [Fact] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + /// + /// Test the property 'Last' + /// + [Fact] + public void LastTest() + { + // TODO unit test for the property 'Last' + } + /// + /// Test the property 'TotalElements' + /// + [Fact] + public void TotalElementsTest() + { + // TODO unit test for the property 'TotalElements' + } + /// + /// Test the property 'TotalPages' + /// + [Fact] + public void TotalPagesTest() + { + // TODO unit test for the property 'TotalPages' + } + /// + /// Test the property 'Size' + /// + [Fact] + public void SizeTest() + { + // TODO unit test for the property 'Size' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'First' + /// + [Fact] + public void FirstTest() + { + // TODO unit test for the property 'First' + } + /// + /// Test the property 'NumberOfElements' + /// + [Fact] + public void NumberOfElementsTest() + { + // TODO unit test for the property 'NumberOfElements' + } + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PageableObjectTests.cs b/src/mailslurp.Test/Model/PageableObjectTests.cs new file mode 100644 index 00000000..e493d0b9 --- /dev/null +++ b/src/mailslurp.Test/Model/PageableObjectTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PageableObject + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PageableObjectTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PageableObject + //private PageableObject instance; + + public PageableObjectTests() + { + // TODO uncomment below to create an instance of PageableObject + //instance = new PageableObject(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PageableObject + /// + [Fact] + public void PageableObjectInstanceTest() + { + // TODO uncomment below to test "IsType" PageableObject + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Offset' + /// + [Fact] + public void OffsetTest() + { + // TODO unit test for the property 'Offset' + } + /// + /// Test the property 'Sort' + /// + [Fact] + public void SortTest() + { + // TODO unit test for the property 'Sort' + } + /// + /// Test the property 'PageNumber' + /// + [Fact] + public void PageNumberTest() + { + // TODO unit test for the property 'PageNumber' + } + /// + /// Test the property 'PageSize' + /// + [Fact] + public void PageSizeTest() + { + // TODO unit test for the property 'PageSize' + } + /// + /// Test the property 'Paged' + /// + [Fact] + public void PagedTest() + { + // TODO unit test for the property 'Paged' + } + /// + /// Test the property 'Unpaged' + /// + [Fact] + public void UnpagedTest() + { + // TODO unit test for the property 'Unpaged' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PhoneNumberDtoTests.cs b/src/mailslurp.Test/Model/PhoneNumberDtoTests.cs new file mode 100644 index 00000000..709bf729 --- /dev/null +++ b/src/mailslurp.Test/Model/PhoneNumberDtoTests.cs @@ -0,0 +1,135 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PhoneNumberDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PhoneNumberDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PhoneNumberDto + //private PhoneNumberDto instance; + + public PhoneNumberDtoTests() + { + // TODO uncomment below to create an instance of PhoneNumberDto + //instance = new PhoneNumberDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PhoneNumberDto + /// + [Fact] + public void PhoneNumberDtoInstanceTest() + { + // TODO uncomment below to test "IsType" PhoneNumberDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'ComplianceAddress' + /// + [Fact] + public void ComplianceAddressTest() + { + // TODO unit test for the property 'ComplianceAddress' + } + /// + /// Test the property 'EmergencyAddress' + /// + [Fact] + public void EmergencyAddressTest() + { + // TODO unit test for the property 'EmergencyAddress' + } + /// + /// Test the property 'PhoneNumber' + /// + [Fact] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + /// + /// Test the property 'PhoneCountry' + /// + [Fact] + public void PhoneCountryTest() + { + // TODO unit test for the property 'PhoneCountry' + } + /// + /// Test the property 'PhonePlan' + /// + [Fact] + public void PhonePlanTest() + { + // TODO unit test for the property 'PhonePlan' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PhoneNumberProjectionTests.cs b/src/mailslurp.Test/Model/PhoneNumberProjectionTests.cs new file mode 100644 index 00000000..6c176ff2 --- /dev/null +++ b/src/mailslurp.Test/Model/PhoneNumberProjectionTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PhoneNumberProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PhoneNumberProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PhoneNumberProjection + //private PhoneNumberProjection instance; + + public PhoneNumberProjectionTests() + { + // TODO uncomment below to create an instance of PhoneNumberProjection + //instance = new PhoneNumberProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PhoneNumberProjection + /// + [Fact] + public void PhoneNumberProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" PhoneNumberProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'PhoneCountry' + /// + [Fact] + public void PhoneCountryTest() + { + // TODO unit test for the property 'PhoneCountry' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'PhoneNumber' + /// + [Fact] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + + } + +} diff --git a/src/mailslurp.Test/Model/PhonePlanDtoTests.cs b/src/mailslurp.Test/Model/PhonePlanDtoTests.cs new file mode 100644 index 00000000..481f7c6e --- /dev/null +++ b/src/mailslurp.Test/Model/PhonePlanDtoTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing PhonePlanDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PhonePlanDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PhonePlanDto + //private PhonePlanDto instance; + + public PhonePlanDtoTests() + { + // TODO uncomment below to create an instance of PhonePlanDto + //instance = new PhonePlanDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PhonePlanDto + /// + [Fact] + public void PhonePlanDtoInstanceTest() + { + // TODO uncomment below to test "IsType" PhonePlanDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'PhoneCountry' + /// + [Fact] + public void PhoneCountryTest() + { + // TODO unit test for the property 'PhoneCountry' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/RawEmailJsonTests.cs b/src/mailslurp.Test/Model/RawEmailJsonTests.cs new file mode 100644 index 00000000..67cf8af3 --- /dev/null +++ b/src/mailslurp.Test/Model/RawEmailJsonTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing RawEmailJson + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RawEmailJsonTests : IDisposable + { + // TODO uncomment below to declare an instance variable for RawEmailJson + //private RawEmailJson instance; + + public RawEmailJsonTests() + { + // TODO uncomment below to create an instance of RawEmailJson + //instance = new RawEmailJson(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RawEmailJson + /// + [Fact] + public void RawEmailJsonInstanceTest() + { + // TODO uncomment below to test "IsType" RawEmailJson + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + + } + +} diff --git a/src/mailslurp.Test/Model/RecipientTests.cs b/src/mailslurp.Test/Model/RecipientTests.cs new file mode 100644 index 00000000..d1ca13b3 --- /dev/null +++ b/src/mailslurp.Test/Model/RecipientTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing Recipient + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RecipientTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Recipient + //private Recipient instance; + + public RecipientTests() + { + // TODO uncomment below to create an instance of Recipient + //instance = new Recipient(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Recipient + /// + [Fact] + public void RecipientInstanceTest() + { + // TODO uncomment below to test "IsType" Recipient + //Assert.IsType(instance); + } + + + /// + /// Test the property 'RawValue' + /// + [Fact] + public void RawValueTest() + { + // TODO unit test for the property 'RawValue' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ReplyToAliasEmailOptionsTests.cs b/src/mailslurp.Test/Model/ReplyToAliasEmailOptionsTests.cs new file mode 100644 index 00000000..1880d657 --- /dev/null +++ b/src/mailslurp.Test/Model/ReplyToAliasEmailOptionsTests.cs @@ -0,0 +1,135 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ReplyToAliasEmailOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ReplyToAliasEmailOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ReplyToAliasEmailOptions + //private ReplyToAliasEmailOptions instance; + + public ReplyToAliasEmailOptionsTests() + { + // TODO uncomment below to create an instance of ReplyToAliasEmailOptions + //instance = new ReplyToAliasEmailOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ReplyToAliasEmailOptions + /// + [Fact] + public void ReplyToAliasEmailOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" ReplyToAliasEmailOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'IsHTML' + /// + [Fact] + public void IsHTMLTest() + { + // TODO unit test for the property 'IsHTML' + } + /// + /// Test the property 'Charset' + /// + [Fact] + public void CharsetTest() + { + // TODO unit test for the property 'Charset' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + /// + /// Test the property 'TemplateVariables' + /// + [Fact] + public void TemplateVariablesTest() + { + // TODO unit test for the property 'TemplateVariables' + } + /// + /// Test the property 'Template' + /// + [Fact] + public void TemplateTest() + { + // TODO unit test for the property 'Template' + } + /// + /// Test the property 'SendStrategy' + /// + [Fact] + public void SendStrategyTest() + { + // TODO unit test for the property 'SendStrategy' + } + /// + /// Test the property 'UseInboxName' + /// + [Fact] + public void UseInboxNameTest() + { + // TODO unit test for the property 'UseInboxName' + } + /// + /// Test the property 'Html' + /// + [Fact] + public void HtmlTest() + { + // TODO unit test for the property 'Html' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ReplyToEmailOptionsTests.cs b/src/mailslurp.Test/Model/ReplyToEmailOptionsTests.cs new file mode 100644 index 00000000..fa1700c5 --- /dev/null +++ b/src/mailslurp.Test/Model/ReplyToEmailOptionsTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ReplyToEmailOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ReplyToEmailOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ReplyToEmailOptions + //private ReplyToEmailOptions instance; + + public ReplyToEmailOptionsTests() + { + // TODO uncomment below to create an instance of ReplyToEmailOptions + //instance = new ReplyToEmailOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ReplyToEmailOptions + /// + [Fact] + public void ReplyToEmailOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" ReplyToEmailOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'IsHTML' + /// + [Fact] + public void IsHTMLTest() + { + // TODO unit test for the property 'IsHTML' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'ReplyTo' + /// + [Fact] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'Charset' + /// + [Fact] + public void CharsetTest() + { + // TODO unit test for the property 'Charset' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + /// + /// Test the property 'TemplateVariables' + /// + [Fact] + public void TemplateVariablesTest() + { + // TODO unit test for the property 'TemplateVariables' + } + /// + /// Test the property 'Template' + /// + [Fact] + public void TemplateTest() + { + // TODO unit test for the property 'Template' + } + /// + /// Test the property 'SendStrategy' + /// + [Fact] + public void SendStrategyTest() + { + // TODO unit test for the property 'SendStrategy' + } + /// + /// Test the property 'UseInboxName' + /// + [Fact] + public void UseInboxNameTest() + { + // TODO unit test for the property 'UseInboxName' + } + /// + /// Test the property 'Html' + /// + [Fact] + public void HtmlTest() + { + // TODO unit test for the property 'Html' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ScheduledJobDtoTests.cs b/src/mailslurp.Test/Model/ScheduledJobDtoTests.cs new file mode 100644 index 00000000..a4d6e8bd --- /dev/null +++ b/src/mailslurp.Test/Model/ScheduledJobDtoTests.cs @@ -0,0 +1,143 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ScheduledJobDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ScheduledJobDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ScheduledJobDto + //private ScheduledJobDto instance; + + public ScheduledJobDtoTests() + { + // TODO uncomment below to create an instance of ScheduledJobDto + //instance = new ScheduledJobDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ScheduledJobDto + /// + [Fact] + public void ScheduledJobDtoInstanceTest() + { + // TODO uncomment below to test "IsType" ScheduledJobDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'JobId' + /// + [Fact] + public void JobIdTest() + { + // TODO unit test for the property 'JobId' + } + /// + /// Test the property 'GroupId' + /// + [Fact] + public void GroupIdTest() + { + // TODO unit test for the property 'GroupId' + } + /// + /// Test the property 'TriggerId' + /// + [Fact] + public void TriggerIdTest() + { + // TODO unit test for the property 'TriggerId' + } + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'SendAtTimestamp' + /// + [Fact] + public void SendAtTimestampTest() + { + // TODO unit test for the property 'SendAtTimestamp' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ScheduledJobTests.cs b/src/mailslurp.Test/Model/ScheduledJobTests.cs new file mode 100644 index 00000000..c4751c2d --- /dev/null +++ b/src/mailslurp.Test/Model/ScheduledJobTests.cs @@ -0,0 +1,143 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ScheduledJob + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ScheduledJobTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ScheduledJob + //private ScheduledJob instance; + + public ScheduledJobTests() + { + // TODO uncomment below to create an instance of ScheduledJob + //instance = new ScheduledJob(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ScheduledJob + /// + [Fact] + public void ScheduledJobInstanceTest() + { + // TODO uncomment below to test "IsType" ScheduledJob + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'JobId' + /// + [Fact] + public void JobIdTest() + { + // TODO unit test for the property 'JobId' + } + /// + /// Test the property 'GroupId' + /// + [Fact] + public void GroupIdTest() + { + // TODO unit test for the property 'GroupId' + } + /// + /// Test the property 'TriggerId' + /// + [Fact] + public void TriggerIdTest() + { + // TODO unit test for the property 'TriggerId' + } + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'SendAtTimestamp' + /// + [Fact] + public void SendAtTimestampTest() + { + // TODO unit test for the property 'SendAtTimestamp' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SendEmailOptionsTests.cs b/src/mailslurp.Test/Model/SendEmailOptionsTests.cs new file mode 100644 index 00000000..011f3881 --- /dev/null +++ b/src/mailslurp.Test/Model/SendEmailOptionsTests.cs @@ -0,0 +1,223 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SendEmailOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SendEmailOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SendEmailOptions + //private SendEmailOptions instance; + + public SendEmailOptionsTests() + { + // TODO uncomment below to create an instance of SendEmailOptions + //instance = new SendEmailOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SendEmailOptions + /// + [Fact] + public void SendEmailOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" SendEmailOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ToContacts' + /// + [Fact] + public void ToContactsTest() + { + // TODO unit test for the property 'ToContacts' + } + /// + /// Test the property 'ToGroup' + /// + [Fact] + public void ToGroupTest() + { + // TODO unit test for the property 'ToGroup' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'ReplyTo' + /// + [Fact] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'Html' + /// + [Fact] + public void HtmlTest() + { + // TODO unit test for the property 'Html' + } + /// + /// Test the property 'IsHTML' + /// + [Fact] + public void IsHTMLTest() + { + // TODO unit test for the property 'IsHTML' + } + /// + /// Test the property 'Charset' + /// + [Fact] + public void CharsetTest() + { + // TODO unit test for the property 'Charset' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + /// + /// Test the property 'TemplateVariables' + /// + [Fact] + public void TemplateVariablesTest() + { + // TODO unit test for the property 'TemplateVariables' + } + /// + /// Test the property 'Template' + /// + [Fact] + public void TemplateTest() + { + // TODO unit test for the property 'Template' + } + /// + /// Test the property 'SendStrategy' + /// + [Fact] + public void SendStrategyTest() + { + // TODO unit test for the property 'SendStrategy' + } + /// + /// Test the property 'UseInboxName' + /// + [Fact] + public void UseInboxNameTest() + { + // TODO unit test for the property 'UseInboxName' + } + /// + /// Test the property 'AddTrackingPixel' + /// + [Fact] + public void AddTrackingPixelTest() + { + // TODO unit test for the property 'AddTrackingPixel' + } + /// + /// Test the property 'FilterBouncedRecipients' + /// + [Fact] + public void FilterBouncedRecipientsTest() + { + // TODO unit test for the property 'FilterBouncedRecipients' + } + /// + /// Test the property 'ValidateEmailAddresses' + /// + [Fact] + public void ValidateEmailAddressesTest() + { + // TODO unit test for the property 'ValidateEmailAddresses' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SendSMTPEnvelopeOptionsTests.cs b/src/mailslurp.Test/Model/SendSMTPEnvelopeOptionsTests.cs new file mode 100644 index 00000000..7df7b772 --- /dev/null +++ b/src/mailslurp.Test/Model/SendSMTPEnvelopeOptionsTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SendSMTPEnvelopeOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SendSMTPEnvelopeOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SendSMTPEnvelopeOptions + //private SendSMTPEnvelopeOptions instance; + + public SendSMTPEnvelopeOptionsTests() + { + // TODO uncomment below to create an instance of SendSMTPEnvelopeOptions + //instance = new SendSMTPEnvelopeOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SendSMTPEnvelopeOptions + /// + [Fact] + public void SendSMTPEnvelopeOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" SendSMTPEnvelopeOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'RcptTo' + /// + [Fact] + public void RcptToTest() + { + // TODO unit test for the property 'RcptTo' + } + /// + /// Test the property 'MailFrom' + /// + [Fact] + public void MailFromTest() + { + // TODO unit test for the property 'MailFrom' + } + /// + /// Test the property 'Data' + /// + [Fact] + public void DataTest() + { + // TODO unit test for the property 'Data' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SendWithQueueResultTests.cs b/src/mailslurp.Test/Model/SendWithQueueResultTests.cs new file mode 100644 index 00000000..946ebf73 --- /dev/null +++ b/src/mailslurp.Test/Model/SendWithQueueResultTests.cs @@ -0,0 +1,143 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SendWithQueueResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SendWithQueueResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SendWithQueueResult + //private SendWithQueueResult instance; + + public SendWithQueueResultTests() + { + // TODO uncomment below to create an instance of SendWithQueueResult + //instance = new SendWithQueueResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SendWithQueueResult + /// + [Fact] + public void SendWithQueueResultInstanceTest() + { + // TODO uncomment below to test "IsType" SendWithQueueResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'HeaderId' + /// + [Fact] + public void HeaderIdTest() + { + // TODO unit test for the property 'HeaderId' + } + /// + /// Test the property 'Delivered' + /// + [Fact] + public void DeliveredTest() + { + // TODO unit test for the property 'Delivered' + } + /// + /// Test the property 'ExceptionName' + /// + [Fact] + public void ExceptionNameTest() + { + // TODO unit test for the property 'ExceptionName' + } + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SenderTests.cs b/src/mailslurp.Test/Model/SenderTests.cs new file mode 100644 index 00000000..50dffd4b --- /dev/null +++ b/src/mailslurp.Test/Model/SenderTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing Sender + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SenderTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Sender + //private Sender instance; + + public SenderTests() + { + // TODO uncomment below to create an instance of Sender + //instance = new Sender(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Sender + /// + [Fact] + public void SenderInstanceTest() + { + // TODO uncomment below to test "IsType" Sender + //Assert.IsType(instance); + } + + + /// + /// Test the property 'RawValue' + /// + [Fact] + public void RawValueTest() + { + // TODO unit test for the property 'RawValue' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SentEmailDtoTests.cs b/src/mailslurp.Test/Model/SentEmailDtoTests.cs new file mode 100644 index 00000000..40eb302e --- /dev/null +++ b/src/mailslurp.Test/Model/SentEmailDtoTests.cs @@ -0,0 +1,263 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SentEmailDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SentEmailDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SentEmailDto + //private SentEmailDto instance; + + public SentEmailDtoTests() + { + // TODO uncomment below to create an instance of SentEmailDto + //instance = new SentEmailDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SentEmailDto + /// + [Fact] + public void SentEmailDtoInstanceTest() + { + // TODO uncomment below to test "IsType" SentEmailDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'ReplyTo' + /// + [Fact] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'BodyMD5Hash' + /// + [Fact] + public void BodyMD5HashTest() + { + // TODO unit test for the property 'BodyMD5Hash' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'ToContacts' + /// + [Fact] + public void ToContactsTest() + { + // TODO unit test for the property 'ToContacts' + } + /// + /// Test the property 'ToGroup' + /// + [Fact] + public void ToGroupTest() + { + // TODO unit test for the property 'ToGroup' + } + /// + /// Test the property 'Charset' + /// + [Fact] + public void CharsetTest() + { + // TODO unit test for the property 'Charset' + } + /// + /// Test the property 'IsHTML' + /// + [Fact] + public void IsHTMLTest() + { + // TODO unit test for the property 'IsHTML' + } + /// + /// Test the property 'SentAt' + /// + [Fact] + public void SentAtTest() + { + // TODO unit test for the property 'SentAt' + } + /// + /// Test the property 'PixelIds' + /// + [Fact] + public void PixelIdsTest() + { + // TODO unit test for the property 'PixelIds' + } + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'MessageIds' + /// + [Fact] + public void MessageIdsTest() + { + // TODO unit test for the property 'MessageIds' + } + /// + /// Test the property 'VirtualSend' + /// + [Fact] + public void VirtualSendTest() + { + // TODO unit test for the property 'VirtualSend' + } + /// + /// Test the property 'TemplateId' + /// + [Fact] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + /// + /// Test the property 'TemplateVariables' + /// + [Fact] + public void TemplateVariablesTest() + { + // TODO unit test for the property 'TemplateVariables' + } + /// + /// Test the property 'Html' + /// + [Fact] + public void HtmlTest() + { + // TODO unit test for the property 'Html' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SentEmailProjectionTests.cs b/src/mailslurp.Test/Model/SentEmailProjectionTests.cs new file mode 100644 index 00000000..08a40bf3 --- /dev/null +++ b/src/mailslurp.Test/Model/SentEmailProjectionTests.cs @@ -0,0 +1,159 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SentEmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SentEmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SentEmailProjection + //private SentEmailProjection instance; + + public SentEmailProjectionTests() + { + // TODO uncomment below to create an instance of SentEmailProjection + //instance = new SentEmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SentEmailProjection + /// + [Fact] + public void SentEmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" SentEmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Attachments' + /// + [Fact] + public void AttachmentsTest() + { + // TODO unit test for the property 'Attachments' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'BodyMD5Hash' + /// + [Fact] + public void BodyMD5HashTest() + { + // TODO unit test for the property 'BodyMD5Hash' + } + /// + /// Test the property 'VirtualSend' + /// + [Fact] + public void VirtualSendTest() + { + // TODO unit test for the property 'VirtualSend' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SetInboxFavouritedOptionsTests.cs b/src/mailslurp.Test/Model/SetInboxFavouritedOptionsTests.cs new file mode 100644 index 00000000..333586d9 --- /dev/null +++ b/src/mailslurp.Test/Model/SetInboxFavouritedOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SetInboxFavouritedOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SetInboxFavouritedOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SetInboxFavouritedOptions + //private SetInboxFavouritedOptions instance; + + public SetInboxFavouritedOptionsTests() + { + // TODO uncomment below to create an instance of SetInboxFavouritedOptions + //instance = new SetInboxFavouritedOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SetInboxFavouritedOptions + /// + [Fact] + public void SetInboxFavouritedOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" SetInboxFavouritedOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'State' + /// + [Fact] + public void StateTest() + { + // TODO unit test for the property 'State' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SimpleSendEmailOptionsTests.cs b/src/mailslurp.Test/Model/SimpleSendEmailOptionsTests.cs new file mode 100644 index 00000000..cf831ae3 --- /dev/null +++ b/src/mailslurp.Test/Model/SimpleSendEmailOptionsTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SimpleSendEmailOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SimpleSendEmailOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SimpleSendEmailOptions + //private SimpleSendEmailOptions instance; + + public SimpleSendEmailOptionsTests() + { + // TODO uncomment below to create an instance of SimpleSendEmailOptions + //instance = new SimpleSendEmailOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SimpleSendEmailOptions + /// + [Fact] + public void SimpleSendEmailOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" SimpleSendEmailOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'SenderId' + /// + [Fact] + public void SenderIdTest() + { + // TODO unit test for the property 'SenderId' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SmsDtoTests.cs b/src/mailslurp.Test/Model/SmsDtoTests.cs new file mode 100644 index 00000000..e101ec96 --- /dev/null +++ b/src/mailslurp.Test/Model/SmsDtoTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SmsDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SmsDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SmsDto + //private SmsDto instance; + + public SmsDtoTests() + { + // TODO uncomment below to create an instance of SmsDto + //instance = new SmsDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SmsDto + /// + [Fact] + public void SmsDtoInstanceTest() + { + // TODO uncomment below to test "IsType" SmsDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'PhoneNumber' + /// + [Fact] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + /// + /// Test the property 'FromNumber' + /// + [Fact] + public void FromNumberTest() + { + // TODO unit test for the property 'FromNumber' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'Read' + /// + [Fact] + public void ReadTest() + { + // TODO unit test for the property 'Read' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SmsMatchOptionTests.cs b/src/mailslurp.Test/Model/SmsMatchOptionTests.cs new file mode 100644 index 00000000..c98e14eb --- /dev/null +++ b/src/mailslurp.Test/Model/SmsMatchOptionTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SmsMatchOption + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SmsMatchOptionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SmsMatchOption + //private SmsMatchOption instance; + + public SmsMatchOptionTests() + { + // TODO uncomment below to create an instance of SmsMatchOption + //instance = new SmsMatchOption(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SmsMatchOption + /// + [Fact] + public void SmsMatchOptionInstanceTest() + { + // TODO uncomment below to test "IsType" SmsMatchOption + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Field' + /// + [Fact] + public void FieldTest() + { + // TODO unit test for the property 'Field' + } + /// + /// Test the property 'Should' + /// + [Fact] + public void ShouldTest() + { + // TODO unit test for the property 'Should' + } + /// + /// Test the property 'Value' + /// + [Fact] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SmsPreviewTests.cs b/src/mailslurp.Test/Model/SmsPreviewTests.cs new file mode 100644 index 00000000..cbfaae2e --- /dev/null +++ b/src/mailslurp.Test/Model/SmsPreviewTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SmsPreview + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SmsPreviewTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SmsPreview + //private SmsPreview instance; + + public SmsPreviewTests() + { + // TODO uncomment below to create an instance of SmsPreview + //instance = new SmsPreview(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SmsPreview + /// + [Fact] + public void SmsPreviewInstanceTest() + { + // TODO uncomment below to test "IsType" SmsPreview + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'PhoneNumber' + /// + [Fact] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + /// + /// Test the property 'FromNumber' + /// + [Fact] + public void FromNumberTest() + { + // TODO unit test for the property 'FromNumber' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SmsProjectionTests.cs b/src/mailslurp.Test/Model/SmsProjectionTests.cs new file mode 100644 index 00000000..040d281c --- /dev/null +++ b/src/mailslurp.Test/Model/SmsProjectionTests.cs @@ -0,0 +1,119 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing SmsProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SmsProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SmsProjection + //private SmsProjection instance; + + public SmsProjectionTests() + { + // TODO uncomment below to create an instance of SmsProjection + //instance = new SmsProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SmsProjection + /// + [Fact] + public void SmsProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" SmsProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'PhoneNumber' + /// + [Fact] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + /// + /// Test the property 'FromNumber' + /// + [Fact] + public void FromNumberTest() + { + // TODO unit test for the property 'FromNumber' + } + /// + /// Test the property 'Read' + /// + [Fact] + public void ReadTest() + { + // TODO unit test for the property 'Read' + } + + } + +} diff --git a/src/mailslurp.Test/Model/SortTests.cs b/src/mailslurp.Test/Model/SortTests.cs new file mode 100644 index 00000000..73098acd --- /dev/null +++ b/src/mailslurp.Test/Model/SortTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing Sort + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SortTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Sort + //private Sort instance; + + public SortTests() + { + // TODO uncomment below to create an instance of Sort + //instance = new Sort(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Sort + /// + [Fact] + public void SortInstanceTest() + { + // TODO uncomment below to test "IsType" Sort + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Empty' + /// + [Fact] + public void EmptyTest() + { + // TODO unit test for the property 'Empty' + } + /// + /// Test the property 'Sorted' + /// + [Fact] + public void SortedTest() + { + // TODO unit test for the property 'Sorted' + } + /// + /// Test the property 'Unsorted' + /// + [Fact] + public void UnsortedTest() + { + // TODO unit test for the property 'Unsorted' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TemplateDtoTests.cs b/src/mailslurp.Test/Model/TemplateDtoTests.cs new file mode 100644 index 00000000..1272978a --- /dev/null +++ b/src/mailslurp.Test/Model/TemplateDtoTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TemplateDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TemplateDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TemplateDto + //private TemplateDto instance; + + public TemplateDtoTests() + { + // TODO uncomment below to create an instance of TemplateDto + //instance = new TemplateDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TemplateDto + /// + [Fact] + public void TemplateDtoInstanceTest() + { + // TODO uncomment below to test "IsType" TemplateDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Variables' + /// + [Fact] + public void VariablesTest() + { + // TODO unit test for the property 'Variables' + } + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TemplatePreviewTests.cs b/src/mailslurp.Test/Model/TemplatePreviewTests.cs new file mode 100644 index 00000000..c7051c87 --- /dev/null +++ b/src/mailslurp.Test/Model/TemplatePreviewTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TemplatePreview + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TemplatePreviewTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TemplatePreview + //private TemplatePreview instance; + + public TemplatePreviewTests() + { + // TODO uncomment below to create an instance of TemplatePreview + //instance = new TemplatePreview(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TemplatePreview + /// + [Fact] + public void TemplatePreviewInstanceTest() + { + // TODO uncomment below to test "IsType" TemplatePreview + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Preview' + /// + [Fact] + public void PreviewTest() + { + // TODO unit test for the property 'Preview' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TemplateProjectionTests.cs b/src/mailslurp.Test/Model/TemplateProjectionTests.cs new file mode 100644 index 00000000..3e724d60 --- /dev/null +++ b/src/mailslurp.Test/Model/TemplateProjectionTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TemplateProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TemplateProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TemplateProjection + //private TemplateProjection instance; + + public TemplateProjectionTests() + { + // TODO uncomment below to create an instance of TemplateProjection + //instance = new TemplateProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TemplateProjection + /// + [Fact] + public void TemplateProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" TemplateProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'Variables' + /// + [Fact] + public void VariablesTest() + { + // TODO unit test for the property 'Variables' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TemplateVariableTests.cs b/src/mailslurp.Test/Model/TemplateVariableTests.cs new file mode 100644 index 00000000..b06aefa2 --- /dev/null +++ b/src/mailslurp.Test/Model/TemplateVariableTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TemplateVariable + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TemplateVariableTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TemplateVariable + //private TemplateVariable instance; + + public TemplateVariableTests() + { + // TODO uncomment below to create an instance of TemplateVariable + //instance = new TemplateVariable(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TemplateVariable + /// + [Fact] + public void TemplateVariableInstanceTest() + { + // TODO uncomment below to test "IsType" TemplateVariable + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'VariableType' + /// + [Fact] + public void VariableTypeTest() + { + // TODO unit test for the property 'VariableType' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TestNewInboxForwarderOptionsTests.cs b/src/mailslurp.Test/Model/TestNewInboxForwarderOptionsTests.cs new file mode 100644 index 00000000..39ffa88c --- /dev/null +++ b/src/mailslurp.Test/Model/TestNewInboxForwarderOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TestNewInboxForwarderOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TestNewInboxForwarderOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TestNewInboxForwarderOptions + //private TestNewInboxForwarderOptions instance; + + public TestNewInboxForwarderOptionsTests() + { + // TODO uncomment below to create an instance of TestNewInboxForwarderOptions + //instance = new TestNewInboxForwarderOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TestNewInboxForwarderOptions + /// + [Fact] + public void TestNewInboxForwarderOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" TestNewInboxForwarderOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxForwarderTestOptions' + /// + [Fact] + public void InboxForwarderTestOptionsTest() + { + // TODO unit test for the property 'InboxForwarderTestOptions' + } + /// + /// Test the property 'CreateInboxForwarderOptions' + /// + [Fact] + public void CreateInboxForwarderOptionsTest() + { + // TODO unit test for the property 'CreateInboxForwarderOptions' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TestNewInboxRulesetOptionsTests.cs b/src/mailslurp.Test/Model/TestNewInboxRulesetOptionsTests.cs new file mode 100644 index 00000000..3bf4691f --- /dev/null +++ b/src/mailslurp.Test/Model/TestNewInboxRulesetOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TestNewInboxRulesetOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TestNewInboxRulesetOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TestNewInboxRulesetOptions + //private TestNewInboxRulesetOptions instance; + + public TestNewInboxRulesetOptionsTests() + { + // TODO uncomment below to create an instance of TestNewInboxRulesetOptions + //instance = new TestNewInboxRulesetOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TestNewInboxRulesetOptions + /// + [Fact] + public void TestNewInboxRulesetOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" TestNewInboxRulesetOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxRulesetTestOptions' + /// + [Fact] + public void InboxRulesetTestOptionsTest() + { + // TODO unit test for the property 'InboxRulesetTestOptions' + } + /// + /// Test the property 'CreateInboxRulesetOptions' + /// + [Fact] + public void CreateInboxRulesetOptionsTest() + { + // TODO unit test for the property 'CreateInboxRulesetOptions' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TestPhoneNumberOptionsTests.cs b/src/mailslurp.Test/Model/TestPhoneNumberOptionsTests.cs new file mode 100644 index 00000000..0dcc396c --- /dev/null +++ b/src/mailslurp.Test/Model/TestPhoneNumberOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TestPhoneNumberOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TestPhoneNumberOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TestPhoneNumberOptions + //private TestPhoneNumberOptions instance; + + public TestPhoneNumberOptionsTests() + { + // TODO uncomment below to create an instance of TestPhoneNumberOptions + //instance = new TestPhoneNumberOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TestPhoneNumberOptions + /// + [Fact] + public void TestPhoneNumberOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" TestPhoneNumberOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ThreadProjectionTests.cs b/src/mailslurp.Test/Model/ThreadProjectionTests.cs new file mode 100644 index 00000000..94b705c1 --- /dev/null +++ b/src/mailslurp.Test/Model/ThreadProjectionTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ThreadProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ThreadProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ThreadProjection + //private ThreadProjection instance; + + public ThreadProjectionTests() + { + // TODO uncomment below to create an instance of ThreadProjection + //instance = new ThreadProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ThreadProjection + /// + [Fact] + public void ThreadProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" ThreadProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'AliasId' + /// + [Fact] + public void AliasIdTest() + { + // TODO unit test for the property 'AliasId' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TrackingPixelDtoTests.cs b/src/mailslurp.Test/Model/TrackingPixelDtoTests.cs new file mode 100644 index 00000000..e0107823 --- /dev/null +++ b/src/mailslurp.Test/Model/TrackingPixelDtoTests.cs @@ -0,0 +1,135 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TrackingPixelDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TrackingPixelDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TrackingPixelDto + //private TrackingPixelDto instance; + + public TrackingPixelDtoTests() + { + // TODO uncomment below to create an instance of TrackingPixelDto + //instance = new TrackingPixelDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TrackingPixelDto + /// + [Fact] + public void TrackingPixelDtoInstanceTest() + { + // TODO uncomment below to test "IsType" TrackingPixelDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Seen' + /// + [Fact] + public void SeenTest() + { + // TODO unit test for the property 'Seen' + } + /// + /// Test the property 'Recipient' + /// + [Fact] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + /// + /// Test the property 'Html' + /// + [Fact] + public void HtmlTest() + { + // TODO unit test for the property 'Html' + } + /// + /// Test the property 'Url' + /// + [Fact] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'SentEmailId' + /// + [Fact] + public void SentEmailIdTest() + { + // TODO unit test for the property 'SentEmailId' + } + /// + /// Test the property 'SeenAt' + /// + [Fact] + public void SeenAtTest() + { + // TODO unit test for the property 'SeenAt' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/TrackingPixelProjectionTests.cs b/src/mailslurp.Test/Model/TrackingPixelProjectionTests.cs new file mode 100644 index 00000000..e746cd57 --- /dev/null +++ b/src/mailslurp.Test/Model/TrackingPixelProjectionTests.cs @@ -0,0 +1,135 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing TrackingPixelProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TrackingPixelProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TrackingPixelProjection + //private TrackingPixelProjection instance; + + public TrackingPixelProjectionTests() + { + // TODO uncomment below to create an instance of TrackingPixelProjection + //instance = new TrackingPixelProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TrackingPixelProjection + /// + [Fact] + public void TrackingPixelProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" TrackingPixelProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'SentEmailId' + /// + [Fact] + public void SentEmailIdTest() + { + // TODO unit test for the property 'SentEmailId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'Recipient' + /// + [Fact] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + /// + /// Test the property 'Seen' + /// + [Fact] + public void SeenTest() + { + // TODO unit test for the property 'Seen' + } + /// + /// Test the property 'SeenAt' + /// + [Fact] + public void SeenAtTest() + { + // TODO unit test for the property 'SeenAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UnknownMissedEmailProjectionTests.cs b/src/mailslurp.Test/Model/UnknownMissedEmailProjectionTests.cs new file mode 100644 index 00000000..a6a7fd5f --- /dev/null +++ b/src/mailslurp.Test/Model/UnknownMissedEmailProjectionTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UnknownMissedEmailProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UnknownMissedEmailProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UnknownMissedEmailProjection + //private UnknownMissedEmailProjection instance; + + public UnknownMissedEmailProjectionTests() + { + // TODO uncomment below to create an instance of UnknownMissedEmailProjection + //instance = new UnknownMissedEmailProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UnknownMissedEmailProjection + /// + [Fact] + public void UnknownMissedEmailProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" UnknownMissedEmailProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UnreadCountTests.cs b/src/mailslurp.Test/Model/UnreadCountTests.cs new file mode 100644 index 00000000..96665e9f --- /dev/null +++ b/src/mailslurp.Test/Model/UnreadCountTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UnreadCount + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UnreadCountTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UnreadCount + //private UnreadCount instance; + + public UnreadCountTests() + { + // TODO uncomment below to create an instance of UnreadCount + //instance = new UnreadCount(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UnreadCount + /// + [Fact] + public void UnreadCountInstanceTest() + { + // TODO uncomment below to test "IsType" UnreadCount + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Count' + /// + [Fact] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UnseenErrorCountDtoTests.cs b/src/mailslurp.Test/Model/UnseenErrorCountDtoTests.cs new file mode 100644 index 00000000..1609e52d --- /dev/null +++ b/src/mailslurp.Test/Model/UnseenErrorCountDtoTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UnseenErrorCountDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UnseenErrorCountDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UnseenErrorCountDto + //private UnseenErrorCountDto instance; + + public UnseenErrorCountDtoTests() + { + // TODO uncomment below to create an instance of UnseenErrorCountDto + //instance = new UnseenErrorCountDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UnseenErrorCountDto + /// + [Fact] + public void UnseenErrorCountDtoInstanceTest() + { + // TODO uncomment below to test "IsType" UnseenErrorCountDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Count' + /// + [Fact] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UpdateAliasOptionsTests.cs b/src/mailslurp.Test/Model/UpdateAliasOptionsTests.cs new file mode 100644 index 00000000..02e1bcfa --- /dev/null +++ b/src/mailslurp.Test/Model/UpdateAliasOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UpdateAliasOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UpdateAliasOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UpdateAliasOptions + //private UpdateAliasOptions instance; + + public UpdateAliasOptionsTests() + { + // TODO uncomment below to create an instance of UpdateAliasOptions + //instance = new UpdateAliasOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UpdateAliasOptions + /// + [Fact] + public void UpdateAliasOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" UpdateAliasOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UpdateDomainOptionsTests.cs b/src/mailslurp.Test/Model/UpdateDomainOptionsTests.cs new file mode 100644 index 00000000..9e269a34 --- /dev/null +++ b/src/mailslurp.Test/Model/UpdateDomainOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UpdateDomainOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UpdateDomainOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UpdateDomainOptions + //private UpdateDomainOptions instance; + + public UpdateDomainOptionsTests() + { + // TODO uncomment below to create an instance of UpdateDomainOptions + //instance = new UpdateDomainOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UpdateDomainOptions + /// + [Fact] + public void UpdateDomainOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" UpdateDomainOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'CatchAllInboxId' + /// + [Fact] + public void CatchAllInboxIdTest() + { + // TODO unit test for the property 'CatchAllInboxId' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UpdateGroupContactsTests.cs b/src/mailslurp.Test/Model/UpdateGroupContactsTests.cs new file mode 100644 index 00000000..7c1aba06 --- /dev/null +++ b/src/mailslurp.Test/Model/UpdateGroupContactsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UpdateGroupContacts + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UpdateGroupContactsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UpdateGroupContacts + //private UpdateGroupContacts instance; + + public UpdateGroupContactsTests() + { + // TODO uncomment below to create an instance of UpdateGroupContacts + //instance = new UpdateGroupContacts(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UpdateGroupContacts + /// + [Fact] + public void UpdateGroupContactsInstanceTest() + { + // TODO uncomment below to test "IsType" UpdateGroupContacts + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ContactIds' + /// + [Fact] + public void ContactIdsTest() + { + // TODO unit test for the property 'ContactIds' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UpdateInboxOptionsTests.cs b/src/mailslurp.Test/Model/UpdateInboxOptionsTests.cs new file mode 100644 index 00000000..70577977 --- /dev/null +++ b/src/mailslurp.Test/Model/UpdateInboxOptionsTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UpdateInboxOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UpdateInboxOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UpdateInboxOptions + //private UpdateInboxOptions instance; + + public UpdateInboxOptionsTests() + { + // TODO uncomment below to create an instance of UpdateInboxOptions + //instance = new UpdateInboxOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UpdateInboxOptions + /// + [Fact] + public void UpdateInboxOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" UpdateInboxOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'ExpiresAt' + /// + [Fact] + public void ExpiresAtTest() + { + // TODO unit test for the property 'ExpiresAt' + } + /// + /// Test the property 'Favourite' + /// + [Fact] + public void FavouriteTest() + { + // TODO unit test for the property 'Favourite' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UploadAttachmentBytesRequestTests.cs b/src/mailslurp.Test/Model/UploadAttachmentBytesRequestTests.cs new file mode 100644 index 00000000..8e984a57 --- /dev/null +++ b/src/mailslurp.Test/Model/UploadAttachmentBytesRequestTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UploadAttachmentBytesRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UploadAttachmentBytesRequestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UploadAttachmentBytesRequest + //private UploadAttachmentBytesRequest instance; + + public UploadAttachmentBytesRequestTests() + { + // TODO uncomment below to create an instance of UploadAttachmentBytesRequest + //instance = new UploadAttachmentBytesRequest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UploadAttachmentBytesRequest + /// + [Fact] + public void UploadAttachmentBytesRequestInstanceTest() + { + // TODO uncomment below to test "IsType" UploadAttachmentBytesRequest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Short' + /// + [Fact] + public void ShortTest() + { + // TODO unit test for the property 'Short' + } + /// + /// Test the property 'Char' + /// + [Fact] + public void CharTest() + { + // TODO unit test for the property 'Char' + } + /// + /// Test the property 'Int' + /// + [Fact] + public void IntTest() + { + // TODO unit test for the property 'Int' + } + /// + /// Test the property 'Long' + /// + [Fact] + public void LongTest() + { + // TODO unit test for the property 'Long' + } + /// + /// Test the property 'Float' + /// + [Fact] + public void FloatTest() + { + // TODO unit test for the property 'Float' + } + /// + /// Test the property 'Double' + /// + [Fact] + public void DoubleTest() + { + // TODO unit test for the property 'Double' + } + /// + /// Test the property 'Direct' + /// + [Fact] + public void DirectTest() + { + // TODO unit test for the property 'Direct' + } + /// + /// Test the property 'ReadOnly' + /// + [Fact] + public void ReadOnlyTest() + { + // TODO unit test for the property 'ReadOnly' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UploadAttachmentOptionsTests.cs b/src/mailslurp.Test/Model/UploadAttachmentOptionsTests.cs new file mode 100644 index 00000000..c283a5e9 --- /dev/null +++ b/src/mailslurp.Test/Model/UploadAttachmentOptionsTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UploadAttachmentOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UploadAttachmentOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UploadAttachmentOptions + //private UploadAttachmentOptions instance; + + public UploadAttachmentOptionsTests() + { + // TODO uncomment below to create an instance of UploadAttachmentOptions + //instance = new UploadAttachmentOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UploadAttachmentOptions + /// + [Fact] + public void UploadAttachmentOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" UploadAttachmentOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ContentType' + /// + [Fact] + public void ContentTypeTest() + { + // TODO unit test for the property 'ContentType' + } + /// + /// Test the property 'Filename' + /// + [Fact] + public void FilenameTest() + { + // TODO unit test for the property 'Filename' + } + /// + /// Test the property 'Base64Contents' + /// + [Fact] + public void Base64ContentsTest() + { + // TODO unit test for the property 'Base64Contents' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UploadMultipartFormRequestTests.cs b/src/mailslurp.Test/Model/UploadMultipartFormRequestTests.cs new file mode 100644 index 00000000..b88abd32 --- /dev/null +++ b/src/mailslurp.Test/Model/UploadMultipartFormRequestTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UploadMultipartFormRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UploadMultipartFormRequestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UploadMultipartFormRequest + //private UploadMultipartFormRequest instance; + + public UploadMultipartFormRequestTests() + { + // TODO uncomment below to create an instance of UploadMultipartFormRequest + //instance = new UploadMultipartFormRequest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UploadMultipartFormRequest + /// + [Fact] + public void UploadMultipartFormRequestInstanceTest() + { + // TODO uncomment below to test "IsType" UploadMultipartFormRequest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ContentTypeHeader' + /// + [Fact] + public void ContentTypeHeaderTest() + { + // TODO unit test for the property 'ContentTypeHeader' + } + /// + /// Test the property 'File' + /// + [Fact] + public void FileTest() + { + // TODO unit test for the property 'File' + } + + } + +} diff --git a/src/mailslurp.Test/Model/UserInfoDtoTests.cs b/src/mailslurp.Test/Model/UserInfoDtoTests.cs new file mode 100644 index 00000000..3b97b651 --- /dev/null +++ b/src/mailslurp.Test/Model/UserInfoDtoTests.cs @@ -0,0 +1,111 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing UserInfoDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class UserInfoDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for UserInfoDto + //private UserInfoDto instance; + + public UserInfoDtoTests() + { + // TODO uncomment below to create an instance of UserInfoDto + //instance = new UserInfoDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of UserInfoDto + /// + [Fact] + public void UserInfoDtoInstanceTest() + { + // TODO uncomment below to test "IsType" UserInfoDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'AccountState' + /// + [Fact] + public void AccountStateTest() + { + // TODO unit test for the property 'AccountState' + } + /// + /// Test the property 'SubscriptionType' + /// + [Fact] + public void SubscriptionTypeTest() + { + // TODO unit test for the property 'SubscriptionType' + } + /// + /// Test the property 'AccountType' + /// + [Fact] + public void AccountTypeTest() + { + // TODO unit test for the property 'AccountType' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ValidateEmailAddressListOptionsTests.cs b/src/mailslurp.Test/Model/ValidateEmailAddressListOptionsTests.cs new file mode 100644 index 00000000..171507e2 --- /dev/null +++ b/src/mailslurp.Test/Model/ValidateEmailAddressListOptionsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ValidateEmailAddressListOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ValidateEmailAddressListOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ValidateEmailAddressListOptions + //private ValidateEmailAddressListOptions instance; + + public ValidateEmailAddressListOptionsTests() + { + // TODO uncomment below to create an instance of ValidateEmailAddressListOptions + //instance = new ValidateEmailAddressListOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ValidateEmailAddressListOptions + /// + [Fact] + public void ValidateEmailAddressListOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" ValidateEmailAddressListOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'EmailAddressList' + /// + [Fact] + public void EmailAddressListTest() + { + // TODO unit test for the property 'EmailAddressList' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ValidateEmailAddressListResultTests.cs b/src/mailslurp.Test/Model/ValidateEmailAddressListResultTests.cs new file mode 100644 index 00000000..c9191bcb --- /dev/null +++ b/src/mailslurp.Test/Model/ValidateEmailAddressListResultTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ValidateEmailAddressListResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ValidateEmailAddressListResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ValidateEmailAddressListResult + //private ValidateEmailAddressListResult instance; + + public ValidateEmailAddressListResultTests() + { + // TODO uncomment below to create an instance of ValidateEmailAddressListResult + //instance = new ValidateEmailAddressListResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ValidateEmailAddressListResult + /// + [Fact] + public void ValidateEmailAddressListResultInstanceTest() + { + // TODO uncomment below to test "IsType" ValidateEmailAddressListResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ValidEmailAddresses' + /// + [Fact] + public void ValidEmailAddressesTest() + { + // TODO unit test for the property 'ValidEmailAddresses' + } + /// + /// Test the property 'InvalidEmailAddresses' + /// + [Fact] + public void InvalidEmailAddressesTest() + { + // TODO unit test for the property 'InvalidEmailAddresses' + } + /// + /// Test the property 'ResultMapEmailAddressIsValid' + /// + [Fact] + public void ResultMapEmailAddressIsValidTest() + { + // TODO unit test for the property 'ResultMapEmailAddressIsValid' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ValidationDtoTests.cs b/src/mailslurp.Test/Model/ValidationDtoTests.cs new file mode 100644 index 00000000..d387f617 --- /dev/null +++ b/src/mailslurp.Test/Model/ValidationDtoTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ValidationDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ValidationDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ValidationDto + //private ValidationDto instance; + + public ValidationDtoTests() + { + // TODO uncomment below to create an instance of ValidationDto + //instance = new ValidationDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ValidationDto + /// + [Fact] + public void ValidationDtoInstanceTest() + { + // TODO uncomment below to test "IsType" ValidationDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'EmailId' + /// + [Fact] + public void EmailIdTest() + { + // TODO unit test for the property 'EmailId' + } + /// + /// Test the property 'Html' + /// + [Fact] + public void HtmlTest() + { + // TODO unit test for the property 'Html' + } + + } + +} diff --git a/src/mailslurp.Test/Model/ValidationMessageTests.cs b/src/mailslurp.Test/Model/ValidationMessageTests.cs new file mode 100644 index 00000000..b596502a --- /dev/null +++ b/src/mailslurp.Test/Model/ValidationMessageTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing ValidationMessage + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ValidationMessageTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ValidationMessage + //private ValidationMessage instance; + + public ValidationMessageTests() + { + // TODO uncomment below to create an instance of ValidationMessage + //instance = new ValidationMessage(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ValidationMessage + /// + [Fact] + public void ValidationMessageInstanceTest() + { + // TODO uncomment below to test "IsType" ValidationMessage + //Assert.IsType(instance); + } + + + /// + /// Test the property 'LineNumber' + /// + [Fact] + public void LineNumberTest() + { + // TODO unit test for the property 'LineNumber' + } + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/src/mailslurp.Test/Model/VerifyEmailAddressOptionsTests.cs b/src/mailslurp.Test/Model/VerifyEmailAddressOptionsTests.cs new file mode 100644 index 00000000..ba999047 --- /dev/null +++ b/src/mailslurp.Test/Model/VerifyEmailAddressOptionsTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing VerifyEmailAddressOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class VerifyEmailAddressOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for VerifyEmailAddressOptions + //private VerifyEmailAddressOptions instance; + + public VerifyEmailAddressOptionsTests() + { + // TODO uncomment below to create an instance of VerifyEmailAddressOptions + //instance = new VerifyEmailAddressOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of VerifyEmailAddressOptions + /// + [Fact] + public void VerifyEmailAddressOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" VerifyEmailAddressOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MailServerDomain' + /// + [Fact] + public void MailServerDomainTest() + { + // TODO unit test for the property 'MailServerDomain' + } + /// + /// Test the property 'EmailAddress' + /// + [Fact] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'SenderEmailAddress' + /// + [Fact] + public void SenderEmailAddressTest() + { + // TODO unit test for the property 'SenderEmailAddress' + } + /// + /// Test the property 'Port' + /// + [Fact] + public void PortTest() + { + // TODO unit test for the property 'Port' + } + + } + +} diff --git a/src/mailslurp.Test/Model/VerifyWebhookSignatureOptionsTests.cs b/src/mailslurp.Test/Model/VerifyWebhookSignatureOptionsTests.cs new file mode 100644 index 00000000..d77cb2fa --- /dev/null +++ b/src/mailslurp.Test/Model/VerifyWebhookSignatureOptionsTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing VerifyWebhookSignatureOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class VerifyWebhookSignatureOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for VerifyWebhookSignatureOptions + //private VerifyWebhookSignatureOptions instance; + + public VerifyWebhookSignatureOptionsTests() + { + // TODO uncomment below to create an instance of VerifyWebhookSignatureOptions + //instance = new VerifyWebhookSignatureOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of VerifyWebhookSignatureOptions + /// + [Fact] + public void VerifyWebhookSignatureOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" VerifyWebhookSignatureOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'Signature' + /// + [Fact] + public void SignatureTest() + { + // TODO unit test for the property 'Signature' + } + + } + +} diff --git a/src/mailslurp.Test/Model/VerifyWebhookSignatureResultsTests.cs b/src/mailslurp.Test/Model/VerifyWebhookSignatureResultsTests.cs new file mode 100644 index 00000000..4c847409 --- /dev/null +++ b/src/mailslurp.Test/Model/VerifyWebhookSignatureResultsTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing VerifyWebhookSignatureResults + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class VerifyWebhookSignatureResultsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for VerifyWebhookSignatureResults + //private VerifyWebhookSignatureResults instance; + + public VerifyWebhookSignatureResultsTests() + { + // TODO uncomment below to create an instance of VerifyWebhookSignatureResults + //instance = new VerifyWebhookSignatureResults(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of VerifyWebhookSignatureResults + /// + [Fact] + public void VerifyWebhookSignatureResultsInstanceTest() + { + // TODO uncomment below to test "IsType" VerifyWebhookSignatureResults + //Assert.IsType(instance); + } + + + /// + /// Test the property 'IsValid' + /// + [Fact] + public void IsValidTest() + { + // TODO unit test for the property 'IsValid' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WaitForConditionsTests.cs b/src/mailslurp.Test/Model/WaitForConditionsTests.cs new file mode 100644 index 00000000..c5134610 --- /dev/null +++ b/src/mailslurp.Test/Model/WaitForConditionsTests.cs @@ -0,0 +1,143 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WaitForConditions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WaitForConditionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WaitForConditions + //private WaitForConditions instance; + + public WaitForConditionsTests() + { + // TODO uncomment below to create an instance of WaitForConditions + //instance = new WaitForConditions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WaitForConditions + /// + [Fact] + public void WaitForConditionsInstanceTest() + { + // TODO uncomment below to test "IsType" WaitForConditions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'Count' + /// + [Fact] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + /// + /// Test the property 'DelayTimeout' + /// + [Fact] + public void DelayTimeoutTest() + { + // TODO unit test for the property 'DelayTimeout' + } + /// + /// Test the property 'Timeout' + /// + [Fact] + public void TimeoutTest() + { + // TODO unit test for the property 'Timeout' + } + /// + /// Test the property 'UnreadOnly' + /// + [Fact] + public void UnreadOnlyTest() + { + // TODO unit test for the property 'UnreadOnly' + } + /// + /// Test the property 'CountType' + /// + [Fact] + public void CountTypeTest() + { + // TODO unit test for the property 'CountType' + } + /// + /// Test the property 'Matches' + /// + [Fact] + public void MatchesTest() + { + // TODO unit test for the property 'Matches' + } + /// + /// Test the property 'SortDirection' + /// + [Fact] + public void SortDirectionTest() + { + // TODO unit test for the property 'SortDirection' + } + /// + /// Test the property 'Since' + /// + [Fact] + public void SinceTest() + { + // TODO unit test for the property 'Since' + } + /// + /// Test the property 'Before' + /// + [Fact] + public void BeforeTest() + { + // TODO unit test for the property 'Before' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WaitForSingleSmsOptionsTests.cs b/src/mailslurp.Test/Model/WaitForSingleSmsOptionsTests.cs new file mode 100644 index 00000000..0fe3ab3a --- /dev/null +++ b/src/mailslurp.Test/Model/WaitForSingleSmsOptionsTests.cs @@ -0,0 +1,119 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WaitForSingleSmsOptions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WaitForSingleSmsOptionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WaitForSingleSmsOptions + //private WaitForSingleSmsOptions instance; + + public WaitForSingleSmsOptionsTests() + { + // TODO uncomment below to create an instance of WaitForSingleSmsOptions + //instance = new WaitForSingleSmsOptions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WaitForSingleSmsOptions + /// + [Fact] + public void WaitForSingleSmsOptionsInstanceTest() + { + // TODO uncomment below to test "IsType" WaitForSingleSmsOptions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'PhoneNumberId' + /// + [Fact] + public void PhoneNumberIdTest() + { + // TODO unit test for the property 'PhoneNumberId' + } + /// + /// Test the property 'Timeout' + /// + [Fact] + public void TimeoutTest() + { + // TODO unit test for the property 'Timeout' + } + /// + /// Test the property 'UnreadOnly' + /// + [Fact] + public void UnreadOnlyTest() + { + // TODO unit test for the property 'UnreadOnly' + } + /// + /// Test the property 'Before' + /// + [Fact] + public void BeforeTest() + { + // TODO unit test for the property 'Before' + } + /// + /// Test the property 'Since' + /// + [Fact] + public void SinceTest() + { + // TODO unit test for the property 'Since' + } + /// + /// Test the property 'SortDirection' + /// + [Fact] + public void SortDirectionTest() + { + // TODO unit test for the property 'SortDirection' + } + /// + /// Test the property 'Delay' + /// + [Fact] + public void DelayTest() + { + // TODO unit test for the property 'Delay' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WaitForSmsConditionsTests.cs b/src/mailslurp.Test/Model/WaitForSmsConditionsTests.cs new file mode 100644 index 00000000..d5690e2d --- /dev/null +++ b/src/mailslurp.Test/Model/WaitForSmsConditionsTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WaitForSmsConditions + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WaitForSmsConditionsTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WaitForSmsConditions + //private WaitForSmsConditions instance; + + public WaitForSmsConditionsTests() + { + // TODO uncomment below to create an instance of WaitForSmsConditions + //instance = new WaitForSmsConditions(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WaitForSmsConditions + /// + [Fact] + public void WaitForSmsConditionsInstanceTest() + { + // TODO uncomment below to test "IsType" WaitForSmsConditions + //Assert.IsType(instance); + } + + + /// + /// Test the property 'PhoneNumberId' + /// + [Fact] + public void PhoneNumberIdTest() + { + // TODO unit test for the property 'PhoneNumberId' + } + /// + /// Test the property 'Limit' + /// + [Fact] + public void LimitTest() + { + // TODO unit test for the property 'Limit' + } + /// + /// Test the property 'Count' + /// + [Fact] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + /// + /// Test the property 'DelayTimeout' + /// + [Fact] + public void DelayTimeoutTest() + { + // TODO unit test for the property 'DelayTimeout' + } + /// + /// Test the property 'Timeout' + /// + [Fact] + public void TimeoutTest() + { + // TODO unit test for the property 'Timeout' + } + /// + /// Test the property 'UnreadOnly' + /// + [Fact] + public void UnreadOnlyTest() + { + // TODO unit test for the property 'UnreadOnly' + } + /// + /// Test the property 'CountType' + /// + [Fact] + public void CountTypeTest() + { + // TODO unit test for the property 'CountType' + } + /// + /// Test the property 'Matches' + /// + [Fact] + public void MatchesTest() + { + // TODO unit test for the property 'Matches' + } + /// + /// Test the property 'SortDirection' + /// + [Fact] + public void SortDirectionTest() + { + // TODO unit test for the property 'SortDirection' + } + /// + /// Test the property 'Since' + /// + [Fact] + public void SinceTest() + { + // TODO unit test for the property 'Since' + } + /// + /// Test the property 'Before' + /// + [Fact] + public void BeforeTest() + { + // TODO unit test for the property 'Before' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookBouncePayloadTests.cs b/src/mailslurp.Test/Model/WebhookBouncePayloadTests.cs new file mode 100644 index 00000000..f188bb46 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookBouncePayloadTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookBouncePayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookBouncePayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookBouncePayload + //private WebhookBouncePayload instance; + + public WebhookBouncePayloadTests() + { + // TODO uncomment below to create an instance of WebhookBouncePayload + //instance = new WebhookBouncePayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookBouncePayload + /// + [Fact] + public void WebhookBouncePayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookBouncePayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'BounceId' + /// + [Fact] + public void BounceIdTest() + { + // TODO unit test for the property 'BounceId' + } + /// + /// Test the property 'SentToRecipients' + /// + [Fact] + public void SentToRecipientsTest() + { + // TODO unit test for the property 'SentToRecipients' + } + /// + /// Test the property 'Sender' + /// + [Fact] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'BounceRecipients' + /// + [Fact] + public void BounceRecipientsTest() + { + // TODO unit test for the property 'BounceRecipients' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookBounceRecipientPayloadTests.cs b/src/mailslurp.Test/Model/WebhookBounceRecipientPayloadTests.cs new file mode 100644 index 00000000..6a360413 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookBounceRecipientPayloadTests.cs @@ -0,0 +1,103 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookBounceRecipientPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookBounceRecipientPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookBounceRecipientPayload + //private WebhookBounceRecipientPayload instance; + + public WebhookBounceRecipientPayloadTests() + { + // TODO uncomment below to create an instance of WebhookBounceRecipientPayload + //instance = new WebhookBounceRecipientPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookBounceRecipientPayload + /// + [Fact] + public void WebhookBounceRecipientPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookBounceRecipientPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'Recipient' + /// + [Fact] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookDeliveryStatusPayloadTests.cs b/src/mailslurp.Test/Model/WebhookDeliveryStatusPayloadTests.cs new file mode 100644 index 00000000..210cd1ba --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookDeliveryStatusPayloadTests.cs @@ -0,0 +1,191 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookDeliveryStatusPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookDeliveryStatusPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookDeliveryStatusPayload + //private WebhookDeliveryStatusPayload instance; + + public WebhookDeliveryStatusPayloadTests() + { + // TODO uncomment below to create an instance of WebhookDeliveryStatusPayload + //instance = new WebhookDeliveryStatusPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookDeliveryStatusPayload + /// + [Fact] + public void WebhookDeliveryStatusPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookDeliveryStatusPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'SentId' + /// + [Fact] + public void SentIdTest() + { + // TODO unit test for the property 'SentId' + } + /// + /// Test the property 'RemoteMtaIp' + /// + [Fact] + public void RemoteMtaIpTest() + { + // TODO unit test for the property 'RemoteMtaIp' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'ReportingMta' + /// + [Fact] + public void ReportingMtaTest() + { + // TODO unit test for the property 'ReportingMta' + } + /// + /// Test the property 'Recipients' + /// + [Fact] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'SmtpResponse' + /// + [Fact] + public void SmtpResponseTest() + { + // TODO unit test for the property 'SmtpResponse' + } + /// + /// Test the property 'SmtpStatusCode' + /// + [Fact] + public void SmtpStatusCodeTest() + { + // TODO unit test for the property 'SmtpStatusCode' + } + /// + /// Test the property 'ProcessingTimeMillis' + /// + [Fact] + public void ProcessingTimeMillisTest() + { + // TODO unit test for the property 'ProcessingTimeMillis' + } + /// + /// Test the property 'Received' + /// + [Fact] + public void ReceivedTest() + { + // TODO unit test for the property 'Received' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookDtoTests.cs b/src/mailslurp.Test/Model/WebhookDtoTests.cs new file mode 100644 index 00000000..723ba303 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookDtoTests.cs @@ -0,0 +1,175 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookDto + //private WebhookDto instance; + + public WebhookDtoTests() + { + // TODO uncomment below to create an instance of WebhookDto + //instance = new WebhookDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookDto + /// + [Fact] + public void WebhookDtoInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'BasicAuth' + /// + [Fact] + public void BasicAuthTest() + { + // TODO unit test for the property 'BasicAuth' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'PhoneId' + /// + [Fact] + public void PhoneIdTest() + { + // TODO unit test for the property 'PhoneId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'RequestBodyTemplate' + /// + [Fact] + public void RequestBodyTemplateTest() + { + // TODO unit test for the property 'RequestBodyTemplate' + } + /// + /// Test the property 'Url' + /// + [Fact] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'Method' + /// + [Fact] + public void MethodTest() + { + // TODO unit test for the property 'Method' + } + /// + /// Test the property 'PayloadJsonSchema' + /// + [Fact] + public void PayloadJsonSchemaTest() + { + // TODO unit test for the property 'PayloadJsonSchema' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'RequestHeaders' + /// + [Fact] + public void RequestHeadersTest() + { + // TODO unit test for the property 'RequestHeaders' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookEmailOpenedPayloadTests.cs b/src/mailslurp.Test/Model/WebhookEmailOpenedPayloadTests.cs new file mode 100644 index 00000000..ac3f2fbc --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookEmailOpenedPayloadTests.cs @@ -0,0 +1,135 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookEmailOpenedPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookEmailOpenedPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookEmailOpenedPayload + //private WebhookEmailOpenedPayload instance; + + public WebhookEmailOpenedPayloadTests() + { + // TODO uncomment below to create an instance of WebhookEmailOpenedPayload + //instance = new WebhookEmailOpenedPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookEmailOpenedPayload + /// + [Fact] + public void WebhookEmailOpenedPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookEmailOpenedPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'PixelId' + /// + [Fact] + public void PixelIdTest() + { + // TODO unit test for the property 'PixelId' + } + /// + /// Test the property 'SentEmailId' + /// + [Fact] + public void SentEmailIdTest() + { + // TODO unit test for the property 'SentEmailId' + } + /// + /// Test the property 'Recipient' + /// + [Fact] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookEmailReadPayloadTests.cs b/src/mailslurp.Test/Model/WebhookEmailReadPayloadTests.cs new file mode 100644 index 00000000..1c89dd86 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookEmailReadPayloadTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookEmailReadPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookEmailReadPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookEmailReadPayload + //private WebhookEmailReadPayload instance; + + public WebhookEmailReadPayloadTests() + { + // TODO uncomment below to create an instance of WebhookEmailReadPayload + //instance = new WebhookEmailReadPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookEmailReadPayload + /// + [Fact] + public void WebhookEmailReadPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookEmailReadPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'EmailId' + /// + [Fact] + public void EmailIdTest() + { + // TODO unit test for the property 'EmailId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'EmailIsRead' + /// + [Fact] + public void EmailIsReadTest() + { + // TODO unit test for the property 'EmailIsRead' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookHeaderNameValueTests.cs b/src/mailslurp.Test/Model/WebhookHeaderNameValueTests.cs new file mode 100644 index 00000000..08917807 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookHeaderNameValueTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookHeaderNameValue + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookHeaderNameValueTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookHeaderNameValue + //private WebhookHeaderNameValue instance; + + public WebhookHeaderNameValueTests() + { + // TODO uncomment below to create an instance of WebhookHeaderNameValue + //instance = new WebhookHeaderNameValue(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookHeaderNameValue + /// + [Fact] + public void WebhookHeaderNameValueInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookHeaderNameValue + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Value' + /// + [Fact] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookHeadersTests.cs b/src/mailslurp.Test/Model/WebhookHeadersTests.cs new file mode 100644 index 00000000..04c68eb1 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookHeadersTests.cs @@ -0,0 +1,71 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookHeaders + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookHeadersTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookHeaders + //private WebhookHeaders instance; + + public WebhookHeadersTests() + { + // TODO uncomment below to create an instance of WebhookHeaders + //instance = new WebhookHeaders(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookHeaders + /// + [Fact] + public void WebhookHeadersInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookHeaders + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Headers' + /// + [Fact] + public void HeadersTest() + { + // TODO unit test for the property 'Headers' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookNewAttachmentPayloadTests.cs b/src/mailslurp.Test/Model/WebhookNewAttachmentPayloadTests.cs new file mode 100644 index 00000000..9dfc9cfe --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookNewAttachmentPayloadTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookNewAttachmentPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookNewAttachmentPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookNewAttachmentPayload + //private WebhookNewAttachmentPayload instance; + + public WebhookNewAttachmentPayloadTests() + { + // TODO uncomment below to create an instance of WebhookNewAttachmentPayload + //instance = new WebhookNewAttachmentPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookNewAttachmentPayload + /// + [Fact] + public void WebhookNewAttachmentPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookNewAttachmentPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'AttachmentId' + /// + [Fact] + public void AttachmentIdTest() + { + // TODO unit test for the property 'AttachmentId' + } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'ContentType' + /// + [Fact] + public void ContentTypeTest() + { + // TODO unit test for the property 'ContentType' + } + /// + /// Test the property 'ContentLength' + /// + [Fact] + public void ContentLengthTest() + { + // TODO unit test for the property 'ContentLength' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookNewContactPayloadTests.cs b/src/mailslurp.Test/Model/WebhookNewContactPayloadTests.cs new file mode 100644 index 00000000..a7833710 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookNewContactPayloadTests.cs @@ -0,0 +1,183 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookNewContactPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookNewContactPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookNewContactPayload + //private WebhookNewContactPayload instance; + + public WebhookNewContactPayloadTests() + { + // TODO uncomment below to create an instance of WebhookNewContactPayload + //instance = new WebhookNewContactPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookNewContactPayload + /// + [Fact] + public void WebhookNewContactPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookNewContactPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'ContactId' + /// + [Fact] + public void ContactIdTest() + { + // TODO unit test for the property 'ContactId' + } + /// + /// Test the property 'GroupId' + /// + [Fact] + public void GroupIdTest() + { + // TODO unit test for the property 'GroupId' + } + /// + /// Test the property 'FirstName' + /// + [Fact] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Fact] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'Company' + /// + [Fact] + public void CompanyTest() + { + // TODO unit test for the property 'Company' + } + /// + /// Test the property 'PrimaryEmailAddress' + /// + [Fact] + public void PrimaryEmailAddressTest() + { + // TODO unit test for the property 'PrimaryEmailAddress' + } + /// + /// Test the property 'EmailAddresses' + /// + [Fact] + public void EmailAddressesTest() + { + // TODO unit test for the property 'EmailAddresses' + } + /// + /// Test the property 'Tags' + /// + [Fact] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + /// + /// Test the property 'MetaData' + /// + [Fact] + public void MetaDataTest() + { + // TODO unit test for the property 'MetaData' + } + /// + /// Test the property 'OptOut' + /// + [Fact] + public void OptOutTest() + { + // TODO unit test for the property 'OptOut' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookNewEmailPayloadTests.cs b/src/mailslurp.Test/Model/WebhookNewEmailPayloadTests.cs new file mode 100644 index 00000000..6014a151 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookNewEmailPayloadTests.cs @@ -0,0 +1,175 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookNewEmailPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookNewEmailPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookNewEmailPayload + //private WebhookNewEmailPayload instance; + + public WebhookNewEmailPayloadTests() + { + // TODO uncomment below to create an instance of WebhookNewEmailPayload + //instance = new WebhookNewEmailPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookNewEmailPayload + /// + [Fact] + public void WebhookNewEmailPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookNewEmailPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'DomainId' + /// + [Fact] + public void DomainIdTest() + { + // TODO unit test for the property 'DomainId' + } + /// + /// Test the property 'EmailId' + /// + [Fact] + public void EmailIdTest() + { + // TODO unit test for the property 'EmailId' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + // TODO unit test for the property 'From' + } + /// + /// Test the property 'Cc' + /// + [Fact] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Bcc' + /// + [Fact] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Subject' + /// + [Fact] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'AttachmentMetaDatas' + /// + [Fact] + public void AttachmentMetaDatasTest() + { + // TODO unit test for the property 'AttachmentMetaDatas' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookNewSmsPayloadTests.cs b/src/mailslurp.Test/Model/WebhookNewSmsPayloadTests.cs new file mode 100644 index 00000000..e0a4e61a --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookNewSmsPayloadTests.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookNewSmsPayload + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookNewSmsPayloadTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookNewSmsPayload + //private WebhookNewSmsPayload instance; + + public WebhookNewSmsPayloadTests() + { + // TODO uncomment below to create an instance of WebhookNewSmsPayload + //instance = new WebhookNewSmsPayload(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookNewSmsPayload + /// + [Fact] + public void WebhookNewSmsPayloadInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookNewSmsPayload + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'WebhookName' + /// + [Fact] + public void WebhookNameTest() + { + // TODO unit test for the property 'WebhookName' + } + /// + /// Test the property 'SmsId' + /// + [Fact] + public void SmsIdTest() + { + // TODO unit test for the property 'SmsId' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'PhoneNumber' + /// + [Fact] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + /// + /// Test the property 'ToNumber' + /// + [Fact] + public void ToNumberTest() + { + // TODO unit test for the property 'ToNumber' + } + /// + /// Test the property 'FromNumber' + /// + [Fact] + public void FromNumberTest() + { + // TODO unit test for the property 'FromNumber' + } + /// + /// Test the property 'Body' + /// + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + /// + /// Test the property 'Read' + /// + [Fact] + public void ReadTest() + { + // TODO unit test for the property 'Read' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookProjectionTests.cs b/src/mailslurp.Test/Model/WebhookProjectionTests.cs new file mode 100644 index 00000000..aa3dc54e --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookProjectionTests.cs @@ -0,0 +1,127 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookProjection + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookProjectionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookProjection + //private WebhookProjection instance; + + public WebhookProjectionTests() + { + // TODO uncomment below to create an instance of WebhookProjection + //instance = new WebhookProjection(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookProjection + /// + [Fact] + public void WebhookProjectionInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookProjection + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Url' + /// + [Fact] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'EventName' + /// + [Fact] + public void EventNameTest() + { + // TODO unit test for the property 'EventName' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'PhoneNumberId' + /// + [Fact] + public void PhoneNumberIdTest() + { + // TODO unit test for the property 'PhoneNumberId' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookRedriveResultTests.cs b/src/mailslurp.Test/Model/WebhookRedriveResultTests.cs new file mode 100644 index 00000000..868d9b98 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookRedriveResultTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookRedriveResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookRedriveResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookRedriveResult + //private WebhookRedriveResult instance; + + public WebhookRedriveResultTests() + { + // TODO uncomment below to create an instance of WebhookRedriveResult + //instance = new WebhookRedriveResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookRedriveResult + /// + [Fact] + public void WebhookRedriveResultInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookRedriveResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'WebhookResultId' + /// + [Fact] + public void WebhookResultIdTest() + { + // TODO unit test for the property 'WebhookResultId' + } + /// + /// Test the property 'Success' + /// + [Fact] + public void SuccessTest() + { + // TODO unit test for the property 'Success' + } + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookResultDtoTests.cs b/src/mailslurp.Test/Model/WebhookResultDtoTests.cs new file mode 100644 index 00000000..02cc81f2 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookResultDtoTests.cs @@ -0,0 +1,191 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookResultDto + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookResultDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookResultDto + //private WebhookResultDto instance; + + public WebhookResultDtoTests() + { + // TODO uncomment below to create an instance of WebhookResultDto + //instance = new WebhookResultDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookResultDto + /// + [Fact] + public void WebhookResultDtoInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookResultDto + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'UserId' + /// + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'InboxId' + /// + [Fact] + public void InboxIdTest() + { + // TODO unit test for the property 'InboxId' + } + /// + /// Test the property 'WebhookId' + /// + [Fact] + public void WebhookIdTest() + { + // TODO unit test for the property 'WebhookId' + } + /// + /// Test the property 'WebhookUrl' + /// + [Fact] + public void WebhookUrlTest() + { + // TODO unit test for the property 'WebhookUrl' + } + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'RedriveId' + /// + [Fact] + public void RedriveIdTest() + { + // TODO unit test for the property 'RedriveId' + } + /// + /// Test the property 'HttpMethod' + /// + [Fact] + public void HttpMethodTest() + { + // TODO unit test for the property 'HttpMethod' + } + /// + /// Test the property 'WebhookEvent' + /// + [Fact] + public void WebhookEventTest() + { + // TODO unit test for the property 'WebhookEvent' + } + /// + /// Test the property 'ResponseStatus' + /// + [Fact] + public void ResponseStatusTest() + { + // TODO unit test for the property 'ResponseStatus' + } + /// + /// Test the property 'ResponseTimeMillis' + /// + [Fact] + public void ResponseTimeMillisTest() + { + // TODO unit test for the property 'ResponseTimeMillis' + } + /// + /// Test the property 'ResponseBodyExtract' + /// + [Fact] + public void ResponseBodyExtractTest() + { + // TODO unit test for the property 'ResponseBodyExtract' + } + /// + /// Test the property 'ResultType' + /// + [Fact] + public void ResultTypeTest() + { + // TODO unit test for the property 'ResultType' + } + /// + /// Test the property 'CreatedAt' + /// + [Fact] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'UpdatedAt' + /// + [Fact] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'Seen' + /// + [Fact] + public void SeenTest() + { + // TODO unit test for the property 'Seen' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookTestRequestTests.cs b/src/mailslurp.Test/Model/WebhookTestRequestTests.cs new file mode 100644 index 00000000..981d9a58 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookTestRequestTests.cs @@ -0,0 +1,95 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookTestRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookTestRequestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookTestRequest + //private WebhookTestRequest instance; + + public WebhookTestRequestTests() + { + // TODO uncomment below to create an instance of WebhookTestRequest + //instance = new WebhookTestRequest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookTestRequest + /// + [Fact] + public void WebhookTestRequestInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookTestRequest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Url' + /// + [Fact] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'Method' + /// + [Fact] + public void MethodTest() + { + // TODO unit test for the property 'Method' + } + /// + /// Test the property 'Headers' + /// + [Fact] + public void HeadersTest() + { + // TODO unit test for the property 'Headers' + } + /// + /// Test the property 'Payload' + /// + [Fact] + public void PayloadTest() + { + // TODO unit test for the property 'Payload' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookTestResponseTests.cs b/src/mailslurp.Test/Model/WebhookTestResponseTests.cs new file mode 100644 index 00000000..485bcda4 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookTestResponseTests.cs @@ -0,0 +1,79 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookTestResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookTestResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookTestResponse + //private WebhookTestResponse instance; + + public WebhookTestResponseTests() + { + // TODO uncomment below to create an instance of WebhookTestResponse + //instance = new WebhookTestResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookTestResponse + /// + [Fact] + public void WebhookTestResponseInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookTestResponse + //Assert.IsType(instance); + } + + + /// + /// Test the property 'StatusCode' + /// + [Fact] + public void StatusCodeTest() + { + // TODO unit test for the property 'StatusCode' + } + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/src/mailslurp.Test/Model/WebhookTestResultTests.cs b/src/mailslurp.Test/Model/WebhookTestResultTests.cs new file mode 100644 index 00000000..e5cd2514 --- /dev/null +++ b/src/mailslurp.Test/Model/WebhookTestResultTests.cs @@ -0,0 +1,87 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using mailslurp.Api; +using mailslurp.Model; +using mailslurp.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace mailslurp.Test.Model +{ + /// + /// Class for testing WebhookTestResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WebhookTestResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for WebhookTestResult + //private WebhookTestResult instance; + + public WebhookTestResultTests() + { + // TODO uncomment below to create an instance of WebhookTestResult + //instance = new WebhookTestResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WebhookTestResult + /// + [Fact] + public void WebhookTestResultInstanceTest() + { + // TODO uncomment below to test "IsType" WebhookTestResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + /// + /// Test the property 'Response' + /// + [Fact] + public void ResponseTest() + { + // TODO unit test for the property 'Response' + } + /// + /// Test the property 'Request' + /// + [Fact] + public void RequestTest() + { + // TODO unit test for the property 'Request' + } + + } + +} diff --git a/src/mailslurp.Test/mailslurp.Test.csproj b/src/mailslurp.Test/mailslurp.Test.csproj new file mode 100644 index 00000000..65f2ab8f --- /dev/null +++ b/src/mailslurp.Test/mailslurp.Test.csproj @@ -0,0 +1,20 @@ + + + + mailslurp.Test + mailslurp.Test + netcoreapp3.1 + false + + + + + + + + + + + + + diff --git a/src/mailslurp/Api/AliasControllerApi.cs b/src/mailslurp/Api/AliasControllerApi.cs new file mode 100644 index 00000000..337668ed --- /dev/null +++ b/src/mailslurp/Api/AliasControllerApi.cs @@ -0,0 +1,2186 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAliasControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + /// + /// + /// Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// AliasDto + AliasDto CreateAlias(CreateAliasOptions createAliasOptions, int operationIndex = 0); + + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + /// + /// + /// Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of AliasDto + ApiResponse CreateAliasWithHttpInfo(CreateAliasOptions createAliasOptions, int operationIndex = 0); + /// + /// Delete an email alias + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteAlias(Guid aliasId, int operationIndex = 0); + + /// + /// Delete an email alias + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAliasWithHttpInfo(Guid aliasId, int operationIndex = 0); + /// + /// Get an email alias + /// + /// + /// Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// AliasDto + AliasDto GetAlias(Guid aliasId, int operationIndex = 0); + + /// + /// Get an email alias + /// + /// + /// Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of AliasDto + ApiResponse GetAliasWithHttpInfo(Guid aliasId, int operationIndex = 0); + /// + /// Get emails for an alias + /// + /// + /// Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// PageEmailProjection + PageEmailProjection GetAliasEmails(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get emails for an alias + /// + /// + /// Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailProjection + ApiResponse GetAliasEmailsWithHttpInfo(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get threads created for an alias + /// + /// + /// Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// PageThreadProjection + PageThreadProjection GetAliasThreads(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get threads created for an alias + /// + /// + /// Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageThreadProjection + ApiResponse GetAliasThreadsWithHttpInfo(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get all email aliases you have created + /// + /// + /// Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageAlias + PageAlias GetAliases(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all email aliases you have created + /// + /// + /// Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageAlias + ApiResponse GetAliasesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// SentEmailDto + SentEmailDto ReplyToAliasEmail(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0); + + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + ApiResponse ReplyToAliasEmailWithHttpInfo(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0); + /// + /// Send an email from an alias inbox + /// + /// + /// Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// SentEmailDto + SentEmailDto SendAliasEmail(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0); + + /// + /// Send an email from an alias inbox + /// + /// + /// Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + ApiResponse SendAliasEmailWithHttpInfo(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0); + /// + /// Update an email alias + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// AliasDto + AliasDto UpdateAlias(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0); + + /// + /// Update an email alias + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of AliasDto + ApiResponse UpdateAliasWithHttpInfo(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAliasControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + /// + /// + /// Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AliasDto + System.Threading.Tasks.Task CreateAliasAsync(CreateAliasOptions createAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + /// + /// + /// Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AliasDto) + System.Threading.Tasks.Task> CreateAliasWithHttpInfoAsync(CreateAliasOptions createAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete an email alias + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAliasAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete an email alias + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get an email alias + /// + /// + /// Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AliasDto + System.Threading.Tasks.Task GetAliasAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an email alias + /// + /// + /// Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AliasDto) + System.Threading.Tasks.Task> GetAliasWithHttpInfoAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get emails for an alias + /// + /// + /// Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailProjection + System.Threading.Tasks.Task GetAliasEmailsAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get emails for an alias + /// + /// + /// Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailProjection) + System.Threading.Tasks.Task> GetAliasEmailsWithHttpInfoAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get threads created for an alias + /// + /// + /// Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageThreadProjection + System.Threading.Tasks.Task GetAliasThreadsAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get threads created for an alias + /// + /// + /// Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageThreadProjection) + System.Threading.Tasks.Task> GetAliasThreadsWithHttpInfoAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all email aliases you have created + /// + /// + /// Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageAlias + System.Threading.Tasks.Task GetAliasesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all email aliases you have created + /// + /// + /// Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageAlias) + System.Threading.Tasks.Task> GetAliasesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + System.Threading.Tasks.Task ReplyToAliasEmailAsync(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + System.Threading.Tasks.Task> ReplyToAliasEmailWithHttpInfoAsync(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send an email from an alias inbox + /// + /// + /// Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + System.Threading.Tasks.Task SendAliasEmailAsync(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send an email from an alias inbox + /// + /// + /// Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + System.Threading.Tasks.Task> SendAliasEmailWithHttpInfoAsync(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update an email alias + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AliasDto + System.Threading.Tasks.Task UpdateAliasAsync(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update an email alias + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AliasDto) + System.Threading.Tasks.Task> UpdateAliasWithHttpInfoAsync(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAliasControllerApi : IAliasControllerApiSync, IAliasControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AliasControllerApi : IAliasControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AliasControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AliasControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AliasControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public AliasControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// AliasDto + public AliasDto CreateAlias(CreateAliasOptions createAliasOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateAliasWithHttpInfo(createAliasOptions); + return localVarResponse.Data; + } + + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of AliasDto + public mailslurp.Client.ApiResponse CreateAliasWithHttpInfo(CreateAliasOptions createAliasOptions, int operationIndex = 0) + { + // verify the required parameter 'createAliasOptions' is set + if (createAliasOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createAliasOptions' when calling AliasControllerApi->CreateAlias"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createAliasOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.CreateAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/aliases", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AliasDto + public async System.Threading.Tasks.Task CreateAliasAsync(CreateAliasOptions createAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateAliasWithHttpInfoAsync(createAliasOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AliasDto) + public async System.Threading.Tasks.Task> CreateAliasWithHttpInfoAsync(CreateAliasOptions createAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createAliasOptions' is set + if (createAliasOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createAliasOptions' when calling AliasControllerApi->CreateAlias"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createAliasOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.CreateAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/aliases", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an email alias + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteAlias(Guid aliasId, int operationIndex = 0) + { + DeleteAliasWithHttpInfo(aliasId); + } + + /// + /// Delete an email alias + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAliasWithHttpInfo(Guid aliasId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + + localVarRequestOptions.Operation = "AliasControllerApi.DeleteAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/aliases/{aliasId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an email alias + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAliasAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAliasWithHttpInfoAsync(aliasId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete an email alias + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + + localVarRequestOptions.Operation = "AliasControllerApi.DeleteAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/aliases/{aliasId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an email alias Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// AliasDto + public AliasDto GetAlias(Guid aliasId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAliasWithHttpInfo(aliasId); + return localVarResponse.Data; + } + + /// + /// Get an email alias Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of AliasDto + public mailslurp.Client.ApiResponse GetAliasWithHttpInfo(Guid aliasId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + + localVarRequestOptions.Operation = "AliasControllerApi.GetAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/aliases/{aliasId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an email alias Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AliasDto + public async System.Threading.Tasks.Task GetAliasAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAliasWithHttpInfoAsync(aliasId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get an email alias Get an email alias by ID + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AliasDto) + public async System.Threading.Tasks.Task> GetAliasWithHttpInfoAsync(Guid aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + + localVarRequestOptions.Operation = "AliasControllerApi.GetAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/aliases/{aliasId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get emails for an alias Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// PageEmailProjection + public PageEmailProjection GetAliasEmails(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAliasEmailsWithHttpInfo(aliasId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get emails for an alias Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailProjection + public mailslurp.Client.ApiResponse GetAliasEmailsWithHttpInfo(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AliasControllerApi.GetAliasEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/aliases/{aliasId}/emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAliasEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get emails for an alias Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailProjection + public async System.Threading.Tasks.Task GetAliasEmailsAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAliasEmailsWithHttpInfoAsync(aliasId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get emails for an alias Get paginated emails for an alias by ID + /// + /// Thrown when fails to make API call + /// + /// Optional page index alias email list pagination (optional, default to 0) + /// Optional page size alias email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailProjection) + public async System.Threading.Tasks.Task> GetAliasEmailsWithHttpInfoAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AliasControllerApi.GetAliasEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/aliases/{aliasId}/emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAliasEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get threads created for an alias Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// PageThreadProjection + public PageThreadProjection GetAliasThreads(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAliasThreadsWithHttpInfo(aliasId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get threads created for an alias Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageThreadProjection + public mailslurp.Client.ApiResponse GetAliasThreadsWithHttpInfo(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AliasControllerApi.GetAliasThreads"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/aliases/{aliasId}/threads", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAliasThreads", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get threads created for an alias Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageThreadProjection + public async System.Threading.Tasks.Task GetAliasThreadsAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAliasThreadsWithHttpInfoAsync(aliasId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get threads created for an alias Returns threads created for an email alias in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in thread list pagination (optional, default to 0) + /// Optional page size in thread list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageThreadProjection) + public async System.Threading.Tasks.Task> GetAliasThreadsWithHttpInfoAsync(Guid aliasId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AliasControllerApi.GetAliasThreads"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/aliases/{aliasId}/threads", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAliasThreads", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all email aliases you have created Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageAlias + public PageAlias GetAliases(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAliasesWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all email aliases you have created Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageAlias + public mailslurp.Client.ApiResponse GetAliasesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AliasControllerApi.GetAliases"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/aliases", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAliases", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all email aliases you have created Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageAlias + public async System.Threading.Tasks.Task GetAliasesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAliasesWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all email aliases you have created Get all email aliases in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in alias list pagination (optional, default to 0) + /// Optional page size in alias list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageAlias) + public async System.Threading.Tasks.Task> GetAliasesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AliasControllerApi.GetAliases"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/aliases", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAliases", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// SentEmailDto + public SentEmailDto ReplyToAliasEmail(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ReplyToAliasEmailWithHttpInfo(aliasId, emailId, replyToAliasEmailOptions); + return localVarResponse.Data; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + public mailslurp.Client.ApiResponse ReplyToAliasEmailWithHttpInfo(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'replyToAliasEmailOptions' is set + if (replyToAliasEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'replyToAliasEmailOptions' when calling AliasControllerApi->ReplyToAliasEmail"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = replyToAliasEmailOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.ReplyToAliasEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/aliases/{aliasId}/emails/{emailId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ReplyToAliasEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + public async System.Threading.Tasks.Task ReplyToAliasEmailAsync(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ReplyToAliasEmailWithHttpInfoAsync(aliasId, emailId, replyToAliasEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the alias that email belongs to + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + public async System.Threading.Tasks.Task> ReplyToAliasEmailWithHttpInfoAsync(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'replyToAliasEmailOptions' is set + if (replyToAliasEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'replyToAliasEmailOptions' when calling AliasControllerApi->ReplyToAliasEmail"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = replyToAliasEmailOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.ReplyToAliasEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/aliases/{aliasId}/emails/{emailId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ReplyToAliasEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// SentEmailDto + public SentEmailDto SendAliasEmail(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = SendAliasEmailWithHttpInfo(aliasId, sendEmailOptions); + return localVarResponse.Data; + } + + /// + /// Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + public mailslurp.Client.ApiResponse SendAliasEmailWithHttpInfo(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling AliasControllerApi->SendAliasEmail"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.SendAliasEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/aliases/{aliasId}/emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendAliasEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + public async System.Threading.Tasks.Task SendAliasEmailAsync(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await SendAliasEmailWithHttpInfoAsync(aliasId, sendEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + public async System.Threading.Tasks.Task> SendAliasEmailWithHttpInfoAsync(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling AliasControllerApi->SendAliasEmail"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.SendAliasEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/aliases/{aliasId}/emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendAliasEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update an email alias + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// AliasDto + public AliasDto UpdateAlias(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = UpdateAliasWithHttpInfo(aliasId, updateAliasOptions); + return localVarResponse.Data; + } + + /// + /// Update an email alias + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of AliasDto + public mailslurp.Client.ApiResponse UpdateAliasWithHttpInfo(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0) + { + // verify the required parameter 'updateAliasOptions' is set + if (updateAliasOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateAliasOptions' when calling AliasControllerApi->UpdateAlias"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = updateAliasOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.UpdateAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/aliases/{aliasId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update an email alias + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AliasDto + public async System.Threading.Tasks.Task UpdateAliasAsync(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await UpdateAliasWithHttpInfoAsync(aliasId, updateAliasOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update an email alias + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AliasDto) + public async System.Threading.Tasks.Task> UpdateAliasWithHttpInfoAsync(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'updateAliasOptions' is set + if (updateAliasOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateAliasOptions' when calling AliasControllerApi->UpdateAlias"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("aliasId", mailslurp.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = updateAliasOptions; + + localVarRequestOptions.Operation = "AliasControllerApi.UpdateAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/aliases/{aliasId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/ApiUserControllerApi.cs b/src/mailslurp/Api/ApiUserControllerApi.cs new file mode 100644 index 00000000..3ba3b303 --- /dev/null +++ b/src/mailslurp/Api/ApiUserControllerApi.cs @@ -0,0 +1,563 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IApiUserControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// string + string GetJsonPropertyAsString(string property, Object body, int operationIndex = 0); + + /// + /// + /// + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse GetJsonPropertyAsStringWithHttpInfo(string property, Object body, int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// UserInfoDto + UserInfoDto GetUserInfo(int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of UserInfoDto + ApiResponse GetUserInfoWithHttpInfo(int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IApiUserControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task GetJsonPropertyAsStringAsync(string property, Object body, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> GetJsonPropertyAsStringWithHttpInfoAsync(string property, Object body, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UserInfoDto + System.Threading.Tasks.Task GetUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UserInfoDto) + System.Threading.Tasks.Task> GetUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IApiUserControllerApi : IApiUserControllerApiSync, IApiUserControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ApiUserControllerApi : IApiUserControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiUserControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiUserControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ApiUserControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public ApiUserControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// string + public string GetJsonPropertyAsString(string property, Object body, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetJsonPropertyAsStringWithHttpInfo(property, body); + return localVarResponse.Data; + } + + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse GetJsonPropertyAsStringWithHttpInfo(string property, Object body, int operationIndex = 0) + { + // verify the required parameter 'property' is set + if (property == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'property' when calling ApiUserControllerApi->GetJsonPropertyAsString"); + } + + // verify the required parameter 'body' is set + if (body == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'body' when calling ApiUserControllerApi->GetJsonPropertyAsString"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "property", property)); + localVarRequestOptions.Data = body; + + localVarRequestOptions.Operation = "ApiUserControllerApi.GetJsonPropertyAsString"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/user/json/pluck", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonPropertyAsString", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task GetJsonPropertyAsStringAsync(string property, Object body, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetJsonPropertyAsStringWithHttpInfoAsync(property, body, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Utility function to extract properties from JSON objects in language where this is cumbersome. + /// + /// Thrown when fails to make API call + /// JSON property name or dot separated path selector such as `a.b.c` + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> GetJsonPropertyAsStringWithHttpInfoAsync(string property, Object body, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'property' is set + if (property == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'property' when calling ApiUserControllerApi->GetJsonPropertyAsString"); + } + + // verify the required parameter 'body' is set + if (body == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'body' when calling ApiUserControllerApi->GetJsonPropertyAsString"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "property", property)); + localVarRequestOptions.Data = body; + + localVarRequestOptions.Operation = "ApiUserControllerApi.GetJsonPropertyAsString"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/json/pluck", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonPropertyAsString", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// UserInfoDto + public UserInfoDto GetUserInfo(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetUserInfoWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of UserInfoDto + public mailslurp.Client.ApiResponse GetUserInfoWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "ApiUserControllerApi.GetUserInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/user/info", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUserInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UserInfoDto + public async System.Threading.Tasks.Task GetUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetUserInfoWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UserInfoDto) + public async System.Threading.Tasks.Task> GetUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "ApiUserControllerApi.GetUserInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/info", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUserInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/AttachmentControllerApi.cs b/src/mailslurp/Api/AttachmentControllerApi.cs new file mode 100644 index 00000000..a8938821 --- /dev/null +++ b/src/mailslurp/Api/AttachmentControllerApi.cs @@ -0,0 +1,2280 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAttachmentControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete all attachments + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + void DeleteAllAttachments(int operationIndex = 0); + + /// + /// Delete all attachments + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAllAttachmentsWithHttpInfo(int operationIndex = 0); + /// + /// Delete an attachment + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// + void DeleteAttachment(string attachmentId, int operationIndex = 0); + + /// + /// Delete an attachment + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAttachmentWithHttpInfo(string attachmentId, int operationIndex = 0); + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// DownloadAttachmentDto + DownloadAttachmentDto DownloadAttachmentAsBase64Encoded(string attachmentId, int operationIndex = 0); + + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of DownloadAttachmentDto + ApiResponse DownloadAttachmentAsBase64EncodedWithHttpInfo(string attachmentId, int operationIndex = 0); + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// byte[] + byte[] DownloadAttachmentAsBytes(string attachmentId, int operationIndex = 0); + + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of byte[] + ApiResponse DownloadAttachmentAsBytesWithHttpInfo(string attachmentId, int operationIndex = 0); + /// + /// Get an attachment entity + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// AttachmentEntity + AttachmentEntity GetAttachment(string attachmentId, int operationIndex = 0); + + /// + /// Get an attachment entity + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of AttachmentEntity + ApiResponse GetAttachmentWithHttpInfo(string attachmentId, int operationIndex = 0); + /// + /// Get email attachment metadata information + /// + /// + /// Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// AttachmentMetaData + AttachmentMetaData GetAttachmentInfo(string attachmentId, int operationIndex = 0); + + /// + /// Get email attachment metadata information + /// + /// + /// Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of AttachmentMetaData + ApiResponse GetAttachmentInfoWithHttpInfo(string attachmentId, int operationIndex = 0); + /// + /// Get email attachments + /// + /// + /// Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageAttachmentEntity + PageAttachmentEntity GetAttachments(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get email attachments + /// + /// + /// Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageAttachmentEntity + ApiResponse GetAttachmentsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<string> + List UploadAttachment(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0); + + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<string> + ApiResponse> UploadAttachmentWithHttpInfo(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0); + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// List<string> + List UploadAttachmentBytes(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0); + + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// ApiResponse of List<string> + ApiResponse> UploadAttachmentBytesWithHttpInfo(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0); + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// List<string> + List UploadMultipartForm(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0); + + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of List<string> + ApiResponse> UploadMultipartFormWithHttpInfo(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAttachmentControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Delete all attachments + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAllAttachmentsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all attachments + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAllAttachmentsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete an attachment + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAttachmentAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete an attachment + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAttachmentWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DownloadAttachmentDto + System.Threading.Tasks.Task DownloadAttachmentAsBase64EncodedAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DownloadAttachmentDto) + System.Threading.Tasks.Task> DownloadAttachmentAsBase64EncodedWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of byte[] + System.Threading.Tasks.Task DownloadAttachmentAsBytesAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (byte[]) + System.Threading.Tasks.Task> DownloadAttachmentAsBytesWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get an attachment entity + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AttachmentEntity + System.Threading.Tasks.Task GetAttachmentAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an attachment entity + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AttachmentEntity) + System.Threading.Tasks.Task> GetAttachmentWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email attachment metadata information + /// + /// + /// Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AttachmentMetaData + System.Threading.Tasks.Task GetAttachmentInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email attachment metadata information + /// + /// + /// Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AttachmentMetaData) + System.Threading.Tasks.Task> GetAttachmentInfoWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email attachments + /// + /// + /// Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageAttachmentEntity + System.Threading.Tasks.Task GetAttachmentsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email attachments + /// + /// + /// Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageAttachmentEntity) + System.Threading.Tasks.Task> GetAttachmentsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + System.Threading.Tasks.Task> UploadAttachmentAsync(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> UploadAttachmentWithHttpInfoAsync(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + System.Threading.Tasks.Task> UploadAttachmentBytesAsync(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> UploadAttachmentBytesWithHttpInfoAsync(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + System.Threading.Tasks.Task> UploadMultipartFormAsync(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> UploadMultipartFormWithHttpInfoAsync(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAttachmentControllerApi : IAttachmentControllerApiSync, IAttachmentControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AttachmentControllerApi : IAttachmentControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AttachmentControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AttachmentControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AttachmentControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public AttachmentControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Delete all attachments + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + public void DeleteAllAttachments(int operationIndex = 0) + { + DeleteAllAttachmentsWithHttpInfo(); + } + + /// + /// Delete all attachments + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAllAttachmentsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "AttachmentControllerApi.DeleteAllAttachments"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/attachments", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllAttachments", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all attachments + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAllAttachmentsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAllAttachmentsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all attachments + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAllAttachmentsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "AttachmentControllerApi.DeleteAllAttachments"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/attachments", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllAttachments", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an attachment + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// + public void DeleteAttachment(string attachmentId, int operationIndex = 0) + { + DeleteAttachmentWithHttpInfo(attachmentId); + } + + /// + /// Delete an attachment + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAttachmentWithHttpInfo(string attachmentId, int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->DeleteAttachment"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.DeleteAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/attachments/{attachmentId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an attachment + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAttachmentAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAttachmentWithHttpInfoAsync(attachmentId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete an attachment + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAttachmentWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->DeleteAttachment"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.DeleteAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/attachments/{attachmentId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// DownloadAttachmentDto + public DownloadAttachmentDto DownloadAttachmentAsBase64Encoded(string attachmentId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DownloadAttachmentAsBase64EncodedWithHttpInfo(attachmentId); + return localVarResponse.Data; + } + + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of DownloadAttachmentDto + public mailslurp.Client.ApiResponse DownloadAttachmentAsBase64EncodedWithHttpInfo(string attachmentId, int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->DownloadAttachmentAsBase64Encoded"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.DownloadAttachmentAsBase64Encoded"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/attachments/{attachmentId}/base64", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachmentAsBase64Encoded", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DownloadAttachmentDto + public async System.Threading.Tasks.Task DownloadAttachmentAsBase64EncodedAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DownloadAttachmentAsBase64EncodedWithHttpInfoAsync(attachmentId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DownloadAttachmentDto) + public async System.Threading.Tasks.Task> DownloadAttachmentAsBase64EncodedWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->DownloadAttachmentAsBase64Encoded"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.DownloadAttachmentAsBase64Encoded"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/attachments/{attachmentId}/base64", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachmentAsBase64Encoded", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// byte[] + public byte[] DownloadAttachmentAsBytes(string attachmentId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DownloadAttachmentAsBytesWithHttpInfo(attachmentId); + return localVarResponse.Data; + } + + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of byte[] + public mailslurp.Client.ApiResponse DownloadAttachmentAsBytesWithHttpInfo(string attachmentId, int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->DownloadAttachmentAsBytes"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.DownloadAttachmentAsBytes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/attachments/{attachmentId}/bytes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachmentAsBytes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of byte[] + public async System.Threading.Tasks.Task DownloadAttachmentAsBytesAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DownloadAttachmentAsBytesWithHttpInfoAsync(attachmentId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (byte[]) + public async System.Threading.Tasks.Task> DownloadAttachmentAsBytesWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->DownloadAttachmentAsBytes"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.DownloadAttachmentAsBytes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/attachments/{attachmentId}/bytes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachmentAsBytes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an attachment entity + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// AttachmentEntity + public AttachmentEntity GetAttachment(string attachmentId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAttachmentWithHttpInfo(attachmentId); + return localVarResponse.Data; + } + + /// + /// Get an attachment entity + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of AttachmentEntity + public mailslurp.Client.ApiResponse GetAttachmentWithHttpInfo(string attachmentId, int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->GetAttachment"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.GetAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/attachments/{attachmentId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an attachment entity + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AttachmentEntity + public async System.Threading.Tasks.Task GetAttachmentAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAttachmentWithHttpInfoAsync(attachmentId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get an attachment entity + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AttachmentEntity) + public async System.Threading.Tasks.Task> GetAttachmentWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->GetAttachment"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.GetAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/attachments/{attachmentId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment metadata information Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// AttachmentMetaData + public AttachmentMetaData GetAttachmentInfo(string attachmentId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAttachmentInfoWithHttpInfo(attachmentId); + return localVarResponse.Data; + } + + /// + /// Get email attachment metadata information Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of AttachmentMetaData + public mailslurp.Client.ApiResponse GetAttachmentInfoWithHttpInfo(string attachmentId, int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->GetAttachmentInfo"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.GetAttachmentInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/attachments/{attachmentId}/metadata", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachmentInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment metadata information Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AttachmentMetaData + public async System.Threading.Tasks.Task GetAttachmentInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAttachmentInfoWithHttpInfoAsync(attachmentId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email attachment metadata information Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + /// + /// Thrown when fails to make API call + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AttachmentMetaData) + public async System.Threading.Tasks.Task> GetAttachmentInfoWithHttpInfoAsync(string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling AttachmentControllerApi->GetAttachmentInfo"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "AttachmentControllerApi.GetAttachmentInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/attachments/{attachmentId}/metadata", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachmentInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachments Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageAttachmentEntity + public PageAttachmentEntity GetAttachments(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAttachmentsWithHttpInfo(page, size, sort, fileNameFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get email attachments Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageAttachmentEntity + public mailslurp.Client.ApiResponse GetAttachmentsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (fileNameFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "fileNameFilter", fileNameFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AttachmentControllerApi.GetAttachments"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/attachments", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachments", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachments Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageAttachmentEntity + public async System.Threading.Tasks.Task GetAttachmentsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAttachmentsWithHttpInfoAsync(page, size, sort, fileNameFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email attachments Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + /// + /// Thrown when fails to make API call + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional file name and content type search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageAttachmentEntity) + public async System.Threading.Tasks.Task> GetAttachmentsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string fileNameFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (fileNameFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "fileNameFilter", fileNameFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "AttachmentControllerApi.GetAttachments"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/attachments", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachments", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<string> + public List UploadAttachment(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = UploadAttachmentWithHttpInfo(uploadAttachmentOptions); + return localVarResponse.Data; + } + + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<string> + public mailslurp.Client.ApiResponse> UploadAttachmentWithHttpInfo(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0) + { + // verify the required parameter 'uploadAttachmentOptions' is set + if (uploadAttachmentOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'uploadAttachmentOptions' when calling AttachmentControllerApi->UploadAttachment"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = uploadAttachmentOptions; + + localVarRequestOptions.Operation = "AttachmentControllerApi.UploadAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post>("/attachments", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + public async System.Threading.Tasks.Task> UploadAttachmentAsync(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await UploadAttachmentWithHttpInfoAsync(uploadAttachmentOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> UploadAttachmentWithHttpInfoAsync(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'uploadAttachmentOptions' is set + if (uploadAttachmentOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'uploadAttachmentOptions' when calling AttachmentControllerApi->UploadAttachment"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = uploadAttachmentOptions; + + localVarRequestOptions.Operation = "AttachmentControllerApi.UploadAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync>("/attachments", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// List<string> + public List UploadAttachmentBytes(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = UploadAttachmentBytesWithHttpInfo(uploadAttachmentBytesRequest, contentType, filename); + return localVarResponse.Data; + } + + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// ApiResponse of List<string> + public mailslurp.Client.ApiResponse> UploadAttachmentBytesWithHttpInfo(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0) + { + // verify the required parameter 'uploadAttachmentBytesRequest' is set + if (uploadAttachmentBytesRequest == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'uploadAttachmentBytesRequest' when calling AttachmentControllerApi->UploadAttachmentBytes"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/octet-stream" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (filename != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "filename", filename)); + } + if (contentType != null) + { + localVarRequestOptions.HeaderParameters.Add("contentType", mailslurp.Client.ClientUtils.ParameterToString(contentType)); // header parameter + } + localVarRequestOptions.Data = uploadAttachmentBytesRequest; + + localVarRequestOptions.Operation = "AttachmentControllerApi.UploadAttachmentBytes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post>("/attachments/bytes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadAttachmentBytes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + public async System.Threading.Tasks.Task> UploadAttachmentBytesAsync(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await UploadAttachmentBytesWithHttpInfoAsync(uploadAttachmentBytesRequest, contentType, filename, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// + /// Optional contentType for file. For instance `application/pdf` (optional) + /// Optional filename to save upload with (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> UploadAttachmentBytesWithHttpInfoAsync(UploadAttachmentBytesRequest uploadAttachmentBytesRequest, string contentType = default(string), string filename = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'uploadAttachmentBytesRequest' is set + if (uploadAttachmentBytesRequest == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'uploadAttachmentBytesRequest' when calling AttachmentControllerApi->UploadAttachmentBytes"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/octet-stream" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (filename != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "filename", filename)); + } + if (contentType != null) + { + localVarRequestOptions.HeaderParameters.Add("contentType", mailslurp.Client.ClientUtils.ParameterToString(contentType)); // header parameter + } + localVarRequestOptions.Data = uploadAttachmentBytesRequest; + + localVarRequestOptions.Operation = "AttachmentControllerApi.UploadAttachmentBytes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync>("/attachments/bytes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadAttachmentBytes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// List<string> + public List UploadMultipartForm(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = UploadMultipartFormWithHttpInfo(contentType, filename, xFilename, uploadMultipartFormRequest); + return localVarResponse.Data; + } + + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of List<string> + public mailslurp.Client.ApiResponse> UploadMultipartFormWithHttpInfo(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (contentType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "contentType", contentType)); + } + if (filename != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "filename", filename)); + } + if (xFilename != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "x-filename", xFilename)); + } + localVarRequestOptions.Data = uploadMultipartFormRequest; + + localVarRequestOptions.Operation = "AttachmentControllerApi.UploadMultipartForm"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post>("/attachments/multipart", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadMultipartForm", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + public async System.Threading.Tasks.Task> UploadMultipartFormAsync(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await UploadMultipartFormWithHttpInfoAsync(contentType, filename, xFilename, uploadMultipartFormRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + /// + /// Thrown when fails to make API call + /// Optional content type of attachment (optional) + /// Optional name of file (optional) + /// Optional content type header of attachment (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> UploadMultipartFormWithHttpInfoAsync(string contentType = default(string), string filename = default(string), string xFilename = default(string), UploadMultipartFormRequest uploadMultipartFormRequest = default(UploadMultipartFormRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (contentType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "contentType", contentType)); + } + if (filename != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "filename", filename)); + } + if (xFilename != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "x-filename", xFilename)); + } + localVarRequestOptions.Data = uploadMultipartFormRequest; + + localVarRequestOptions.Operation = "AttachmentControllerApi.UploadMultipartForm"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync>("/attachments/multipart", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadMultipartForm", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/BounceControllerApi.cs b/src/mailslurp/Api/BounceControllerApi.cs new file mode 100644 index 00000000..df87d1b1 --- /dev/null +++ b/src/mailslurp/Api/BounceControllerApi.cs @@ -0,0 +1,1768 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBounceControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Filter a list of email recipients and remove those who have bounced + /// + /// + /// Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FilterBouncedRecipientsResult + FilterBouncedRecipientsResult FilterBouncedRecipient(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0); + + /// + /// Filter a list of email recipients and remove those who have bounced + /// + /// + /// Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FilterBouncedRecipientsResult + ApiResponse FilterBouncedRecipientWithHttpInfo(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0); + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// BouncedEmailDto + BouncedEmailDto GetBouncedEmail(Guid id, int operationIndex = 0); + + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// ApiResponse of BouncedEmailDto + ApiResponse GetBouncedEmailWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get paginated list of bounced emails. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageBouncedEmail + PageBouncedEmail GetBouncedEmails(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get paginated list of bounced emails. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageBouncedEmail + ApiResponse GetBouncedEmailsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// BouncedRecipientDto + BouncedRecipientDto GetBouncedRecipient(Guid id, int operationIndex = 0); + + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// ApiResponse of BouncedRecipientDto + ApiResponse GetBouncedRecipientWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get paginated list of bounced recipients. + /// + /// + /// Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageBouncedRecipients + PageBouncedRecipients GetBouncedRecipients(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get paginated list of bounced recipients. + /// + /// + /// Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageBouncedRecipients + ApiResponse GetBouncedRecipientsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get paginated list of complaints. + /// + /// + /// SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageComplaint + PageComplaint GetComplaints(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get paginated list of complaints. + /// + /// + /// SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageComplaint + ApiResponse GetComplaintsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get paginated list of unsubscribed recipients. + /// + /// + /// Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// PageListUnsubscribeRecipients + PageListUnsubscribeRecipients GetListUnsubscribeRecipients(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0); + + /// + /// Get paginated list of unsubscribed recipients. + /// + /// + /// Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// ApiResponse of PageListUnsubscribeRecipients + ApiResponse GetListUnsubscribeRecipientsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBounceControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Filter a list of email recipients and remove those who have bounced + /// + /// + /// Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FilterBouncedRecipientsResult + System.Threading.Tasks.Task FilterBouncedRecipientAsync(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Filter a list of email recipients and remove those who have bounced + /// + /// + /// Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FilterBouncedRecipientsResult) + System.Threading.Tasks.Task> FilterBouncedRecipientWithHttpInfoAsync(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of BouncedEmailDto + System.Threading.Tasks.Task GetBouncedEmailAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BouncedEmailDto) + System.Threading.Tasks.Task> GetBouncedEmailWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get paginated list of bounced emails. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageBouncedEmail + System.Threading.Tasks.Task GetBouncedEmailsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get paginated list of bounced emails. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageBouncedEmail) + System.Threading.Tasks.Task> GetBouncedEmailsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of BouncedRecipientDto + System.Threading.Tasks.Task GetBouncedRecipientAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a bounced email. + /// + /// + /// Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BouncedRecipientDto) + System.Threading.Tasks.Task> GetBouncedRecipientWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get paginated list of bounced recipients. + /// + /// + /// Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageBouncedRecipients + System.Threading.Tasks.Task GetBouncedRecipientsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get paginated list of bounced recipients. + /// + /// + /// Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageBouncedRecipients) + System.Threading.Tasks.Task> GetBouncedRecipientsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get paginated list of complaints. + /// + /// + /// SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageComplaint + System.Threading.Tasks.Task GetComplaintsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get paginated list of complaints. + /// + /// + /// SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageComplaint) + System.Threading.Tasks.Task> GetComplaintsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get paginated list of unsubscribed recipients. + /// + /// + /// Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageListUnsubscribeRecipients + System.Threading.Tasks.Task GetListUnsubscribeRecipientsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get paginated list of unsubscribed recipients. + /// + /// + /// Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageListUnsubscribeRecipients) + System.Threading.Tasks.Task> GetListUnsubscribeRecipientsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBounceControllerApi : IBounceControllerApiSync, IBounceControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class BounceControllerApi : IBounceControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public BounceControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public BounceControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public BounceControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public BounceControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Filter a list of email recipients and remove those who have bounced Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FilterBouncedRecipientsResult + public FilterBouncedRecipientsResult FilterBouncedRecipient(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = FilterBouncedRecipientWithHttpInfo(filterBouncedRecipientsOptions); + return localVarResponse.Data; + } + + /// + /// Filter a list of email recipients and remove those who have bounced Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FilterBouncedRecipientsResult + public mailslurp.Client.ApiResponse FilterBouncedRecipientWithHttpInfo(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0) + { + // verify the required parameter 'filterBouncedRecipientsOptions' is set + if (filterBouncedRecipientsOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'filterBouncedRecipientsOptions' when calling BounceControllerApi->FilterBouncedRecipient"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = filterBouncedRecipientsOptions; + + localVarRequestOptions.Operation = "BounceControllerApi.FilterBouncedRecipient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/bounce/filter-recipients", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FilterBouncedRecipient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Filter a list of email recipients and remove those who have bounced Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FilterBouncedRecipientsResult + public async System.Threading.Tasks.Task FilterBouncedRecipientAsync(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await FilterBouncedRecipientWithHttpInfoAsync(filterBouncedRecipientsOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Filter a list of email recipients and remove those who have bounced Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FilterBouncedRecipientsResult) + public async System.Threading.Tasks.Task> FilterBouncedRecipientWithHttpInfoAsync(FilterBouncedRecipientsOptions filterBouncedRecipientsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'filterBouncedRecipientsOptions' is set + if (filterBouncedRecipientsOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'filterBouncedRecipientsOptions' when calling BounceControllerApi->FilterBouncedRecipient"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = filterBouncedRecipientsOptions; + + localVarRequestOptions.Operation = "BounceControllerApi.FilterBouncedRecipient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/bounce/filter-recipients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FilterBouncedRecipient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// BouncedEmailDto + public BouncedEmailDto GetBouncedEmail(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetBouncedEmailWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// ApiResponse of BouncedEmailDto + public mailslurp.Client.ApiResponse GetBouncedEmailWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/bounce/emails/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of BouncedEmailDto + public async System.Threading.Tasks.Task GetBouncedEmailAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetBouncedEmailWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced email to fetch + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BouncedEmailDto) + public async System.Threading.Tasks.Task> GetBouncedEmailWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/bounce/emails/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of bounced emails. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageBouncedEmail + public PageBouncedEmail GetBouncedEmails(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetBouncedEmailsWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get paginated list of bounced emails. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageBouncedEmail + public mailslurp.Client.ApiResponse GetBouncedEmailsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/bounce/emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of bounced emails. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageBouncedEmail + public async System.Threading.Tasks.Task GetBouncedEmailsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetBouncedEmailsWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get paginated list of bounced emails. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageBouncedEmail) + public async System.Threading.Tasks.Task> GetBouncedEmailsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/bounce/emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// BouncedRecipientDto + public BouncedRecipientDto GetBouncedRecipient(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetBouncedRecipientWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// ApiResponse of BouncedRecipientDto + public mailslurp.Client.ApiResponse GetBouncedRecipientWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedRecipient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/bounce/recipients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedRecipient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of BouncedRecipientDto + public async System.Threading.Tasks.Task GetBouncedRecipientAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetBouncedRecipientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a bounced email. Bounced emails are email you have sent that were rejected by a recipient + /// + /// Thrown when fails to make API call + /// ID of the bounced recipient + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BouncedRecipientDto) + public async System.Threading.Tasks.Task> GetBouncedRecipientWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedRecipient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/bounce/recipients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedRecipient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of bounced recipients. Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageBouncedRecipients + public PageBouncedRecipients GetBouncedRecipients(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetBouncedRecipientsWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get paginated list of bounced recipients. Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageBouncedRecipients + public mailslurp.Client.ApiResponse GetBouncedRecipientsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedRecipients"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/bounce/recipients", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedRecipients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of bounced recipients. Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageBouncedRecipients + public async System.Threading.Tasks.Task GetBouncedRecipientsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetBouncedRecipientsWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get paginated list of bounced recipients. Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageBouncedRecipients) + public async System.Threading.Tasks.Task> GetBouncedRecipientsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetBouncedRecipients"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/bounce/recipients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBouncedRecipients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of complaints. SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageComplaint + public PageComplaint GetComplaints(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetComplaintsWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get paginated list of complaints. SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageComplaint + public mailslurp.Client.ApiResponse GetComplaintsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetComplaints"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/bounce/complaints", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetComplaints", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of complaints. SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageComplaint + public async System.Threading.Tasks.Task GetComplaintsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetComplaintsWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get paginated list of complaints. SMTP complaints made against your account + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageComplaint) + public async System.Threading.Tasks.Task> GetComplaintsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetComplaints"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/bounce/complaints", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetComplaints", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of unsubscribed recipients. Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// PageListUnsubscribeRecipients + public PageListUnsubscribeRecipients GetListUnsubscribeRecipients(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetListUnsubscribeRecipientsWithHttpInfo(page, size, sort, domainId); + return localVarResponse.Data; + } + + /// + /// Get paginated list of unsubscribed recipients. Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// ApiResponse of PageListUnsubscribeRecipients + public mailslurp.Client.ApiResponse GetListUnsubscribeRecipientsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (domainId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "domainId", domainId)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetListUnsubscribeRecipients"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/bounce/list-unsubscribe-recipients", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetListUnsubscribeRecipients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated list of unsubscribed recipients. Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageListUnsubscribeRecipients + public async System.Threading.Tasks.Task GetListUnsubscribeRecipientsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetListUnsubscribeRecipientsWithHttpInfoAsync(page, size, sort, domainId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get paginated list of unsubscribed recipients. Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. + /// + /// Thrown when fails to make API call + /// Optional page index (optional, default to 0) + /// Optional page size (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by domainId (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageListUnsubscribeRecipients) + public async System.Threading.Tasks.Task> GetListUnsubscribeRecipientsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (domainId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "domainId", domainId)); + } + + localVarRequestOptions.Operation = "BounceControllerApi.GetListUnsubscribeRecipients"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/bounce/list-unsubscribe-recipients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetListUnsubscribeRecipients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/BulkActionsControllerApi.cs b/src/mailslurp/Api/BulkActionsControllerApi.cs new file mode 100644 index 00000000..910be54c --- /dev/null +++ b/src/mailslurp/Api/BulkActionsControllerApi.cs @@ -0,0 +1,741 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBulkActionsControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Bulk create Inboxes (email addresses) + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// List<InboxDto> + List BulkCreateInboxes(int count, int operationIndex = 0); + + /// + /// Bulk create Inboxes (email addresses) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// ApiResponse of List<InboxDto> + ApiResponse> BulkCreateInboxesWithHttpInfo(int count, int operationIndex = 0); + /// + /// Bulk Delete Inboxes + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void BulkDeleteInboxes(List requestBody, int operationIndex = 0); + + /// + /// Bulk Delete Inboxes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse BulkDeleteInboxesWithHttpInfo(List requestBody, int operationIndex = 0); + /// + /// Bulk Send Emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void BulkSendEmails(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0); + + /// + /// Bulk Send Emails + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse BulkSendEmailsWithHttpInfo(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBulkActionsControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Bulk create Inboxes (email addresses) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<InboxDto> + System.Threading.Tasks.Task> BulkCreateInboxesAsync(int count, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Bulk create Inboxes (email addresses) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<InboxDto>) + System.Threading.Tasks.Task>> BulkCreateInboxesWithHttpInfoAsync(int count, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Bulk Delete Inboxes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task BulkDeleteInboxesAsync(List requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Bulk Delete Inboxes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> BulkDeleteInboxesWithHttpInfoAsync(List requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Bulk Send Emails + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task BulkSendEmailsAsync(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Bulk Send Emails + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> BulkSendEmailsWithHttpInfoAsync(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBulkActionsControllerApi : IBulkActionsControllerApiSync, IBulkActionsControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class BulkActionsControllerApi : IBulkActionsControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public BulkActionsControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public BulkActionsControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public BulkActionsControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public BulkActionsControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Bulk create Inboxes (email addresses) + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// List<InboxDto> + public List BulkCreateInboxes(int count, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = BulkCreateInboxesWithHttpInfo(count); + return localVarResponse.Data; + } + + /// + /// Bulk create Inboxes (email addresses) + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// ApiResponse of List<InboxDto> + public mailslurp.Client.ApiResponse> BulkCreateInboxesWithHttpInfo(int count, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "count", count)); + + localVarRequestOptions.Operation = "BulkActionsControllerApi.BulkCreateInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post>("/bulk/inboxes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BulkCreateInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Bulk create Inboxes (email addresses) + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<InboxDto> + public async System.Threading.Tasks.Task> BulkCreateInboxesAsync(int count, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await BulkCreateInboxesWithHttpInfoAsync(count, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Bulk create Inboxes (email addresses) + /// + /// Thrown when fails to make API call + /// Number of inboxes to be created in bulk + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<InboxDto>) + public async System.Threading.Tasks.Task>> BulkCreateInboxesWithHttpInfoAsync(int count, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "count", count)); + + localVarRequestOptions.Operation = "BulkActionsControllerApi.BulkCreateInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync>("/bulk/inboxes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BulkCreateInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Bulk Delete Inboxes + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void BulkDeleteInboxes(List requestBody, int operationIndex = 0) + { + BulkDeleteInboxesWithHttpInfo(requestBody); + } + + /// + /// Bulk Delete Inboxes + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse BulkDeleteInboxesWithHttpInfo(List requestBody, int operationIndex = 0) + { + // verify the required parameter 'requestBody' is set + if (requestBody == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'requestBody' when calling BulkActionsControllerApi->BulkDeleteInboxes"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = requestBody; + + localVarRequestOptions.Operation = "BulkActionsControllerApi.BulkDeleteInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/bulk/inboxes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BulkDeleteInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Bulk Delete Inboxes + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task BulkDeleteInboxesAsync(List requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await BulkDeleteInboxesWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Bulk Delete Inboxes + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> BulkDeleteInboxesWithHttpInfoAsync(List requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'requestBody' is set + if (requestBody == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'requestBody' when calling BulkActionsControllerApi->BulkDeleteInboxes"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = requestBody; + + localVarRequestOptions.Operation = "BulkActionsControllerApi.BulkDeleteInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/bulk/inboxes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BulkDeleteInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Bulk Send Emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void BulkSendEmails(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0) + { + BulkSendEmailsWithHttpInfo(bulkSendEmailOptions); + } + + /// + /// Bulk Send Emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse BulkSendEmailsWithHttpInfo(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'bulkSendEmailOptions' is set + if (bulkSendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'bulkSendEmailOptions' when calling BulkActionsControllerApi->BulkSendEmails"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = bulkSendEmailOptions; + + localVarRequestOptions.Operation = "BulkActionsControllerApi.BulkSendEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/bulk/send", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BulkSendEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Bulk Send Emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task BulkSendEmailsAsync(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await BulkSendEmailsWithHttpInfoAsync(bulkSendEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Bulk Send Emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> BulkSendEmailsWithHttpInfoAsync(BulkSendEmailOptions bulkSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'bulkSendEmailOptions' is set + if (bulkSendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'bulkSendEmailOptions' when calling BulkActionsControllerApi->BulkSendEmails"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = bulkSendEmailOptions; + + localVarRequestOptions.Operation = "BulkActionsControllerApi.BulkSendEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/bulk/send", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BulkSendEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/CommonActionsControllerApi.cs b/src/mailslurp/Api/CommonActionsControllerApi.cs new file mode 100644 index 00000000..60065a6f --- /dev/null +++ b/src/mailslurp/Api/CommonActionsControllerApi.cs @@ -0,0 +1,1476 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ICommonActionsControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// InboxDto + InboxDto CreateNewEmailAddress(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0); + + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse CreateNewEmailAddressWithHttpInfo(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0); + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// InboxDto + InboxDto CreateRandomInbox(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0); + + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse CreateRandomInboxWithHttpInfo(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0); + /// + /// Delete inbox email address by inbox id + /// + /// + /// Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteEmailAddress(Guid inboxId, int operationIndex = 0); + + /// + /// Delete inbox email address by inbox id + /// + /// + /// Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteEmailAddressWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Delete all emails in an inbox + /// + /// + /// Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void EmptyInbox(Guid inboxId, int operationIndex = 0); + + /// + /// Delete all emails in an inbox + /// + /// + /// Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse EmptyInboxWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Send an email + /// + /// + /// If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void SendEmailSimple(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0); + + /// + /// Send an email + /// + /// + /// If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse SendEmailSimpleWithHttpInfo(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ICommonActionsControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task CreateNewEmailAddressAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> CreateNewEmailAddressWithHttpInfoAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task CreateRandomInboxAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create new random inbox + /// + /// + /// Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> CreateRandomInboxWithHttpInfoAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete inbox email address by inbox id + /// + /// + /// Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteEmailAddressAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete inbox email address by inbox id + /// + /// + /// Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteEmailAddressWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete all emails in an inbox + /// + /// + /// Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task EmptyInboxAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all emails in an inbox + /// + /// + /// Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> EmptyInboxWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send an email + /// + /// + /// If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task SendEmailSimpleAsync(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send an email + /// + /// + /// If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> SendEmailSimpleWithHttpInfoAsync(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ICommonActionsControllerApi : ICommonActionsControllerApiSync, ICommonActionsControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class CommonActionsControllerApi : ICommonActionsControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public CommonActionsControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public CommonActionsControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public CommonActionsControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public CommonActionsControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// InboxDto + public InboxDto CreateNewEmailAddress(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateNewEmailAddressWithHttpInfo(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + return localVarResponse.Data; + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse CreateNewEmailAddressWithHttpInfo(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (allowTeamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowTeamAccess", allowTeamAccess)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (expiresAt != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresAt", expiresAt)); + } + if (expiresIn != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresIn", expiresIn)); + } + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (description != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "description", description)); + } + if (name != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + } + if (tags != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "tags", tags)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (virtualInbox != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualInbox", virtualInbox)); + } + if (useShortAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useShortAddress", useShortAddress)); + } + + localVarRequestOptions.Operation = "CommonActionsControllerApi.CreateNewEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/newEmailAddress", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateNewEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task CreateNewEmailAddressAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateNewEmailAddressWithHttpInfoAsync(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> CreateNewEmailAddressWithHttpInfoAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (allowTeamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowTeamAccess", allowTeamAccess)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (expiresAt != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresAt", expiresAt)); + } + if (expiresIn != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresIn", expiresIn)); + } + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (description != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "description", description)); + } + if (name != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + } + if (tags != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "tags", tags)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (virtualInbox != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualInbox", virtualInbox)); + } + if (useShortAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useShortAddress", useShortAddress)); + } + + localVarRequestOptions.Operation = "CommonActionsControllerApi.CreateNewEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/newEmailAddress", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateNewEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// InboxDto + public InboxDto CreateRandomInbox(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateRandomInboxWithHttpInfo(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress); + return localVarResponse.Data; + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse CreateRandomInboxWithHttpInfo(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (allowTeamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowTeamAccess", allowTeamAccess)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (expiresAt != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresAt", expiresAt)); + } + if (expiresIn != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresIn", expiresIn)); + } + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (description != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "description", description)); + } + if (name != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + } + if (tags != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "tags", tags)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (virtualInbox != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualInbox", virtualInbox)); + } + if (useShortAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useShortAddress", useShortAddress)); + } + + localVarRequestOptions.Operation = "CommonActionsControllerApi.CreateRandomInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/createInbox", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateRandomInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task CreateRandomInboxAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateRandomInboxWithHttpInfoAsync(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox, useShortAddress, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create new random inbox Returns an Inbox with an `id` and an `emailAddress` + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> CreateRandomInboxWithHttpInfoAsync(bool? allowTeamAccess = default(bool?), bool? useDomainPool = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), string emailAddress = default(string), string inboxType = default(string), string description = default(string), string name = default(string), List tags = default(List), bool? favourite = default(bool?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (allowTeamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowTeamAccess", allowTeamAccess)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (expiresAt != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresAt", expiresAt)); + } + if (expiresIn != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresIn", expiresIn)); + } + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (description != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "description", description)); + } + if (name != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + } + if (tags != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "tags", tags)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (virtualInbox != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualInbox", virtualInbox)); + } + if (useShortAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useShortAddress", useShortAddress)); + } + + localVarRequestOptions.Operation = "CommonActionsControllerApi.CreateRandomInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/createInbox", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateRandomInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox email address by inbox id Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteEmailAddress(Guid inboxId, int operationIndex = 0) + { + DeleteEmailAddressWithHttpInfo(inboxId); + } + + /// + /// Delete inbox email address by inbox id Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteEmailAddressWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + + localVarRequestOptions.Operation = "CommonActionsControllerApi.DeleteEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/deleteEmailAddress", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox email address by inbox id Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteEmailAddressAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteEmailAddressWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete inbox email address by inbox id Deletes inbox email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteEmailAddressWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + + localVarRequestOptions.Operation = "CommonActionsControllerApi.DeleteEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/deleteEmailAddress", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all emails in an inbox Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void EmptyInbox(Guid inboxId, int operationIndex = 0) + { + EmptyInboxWithHttpInfo(inboxId); + } + + /// + /// Delete all emails in an inbox Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse EmptyInboxWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + + localVarRequestOptions.Operation = "CommonActionsControllerApi.EmptyInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/emptyInbox", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("EmptyInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all emails in an inbox Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task EmptyInboxAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await EmptyInboxWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all emails in an inbox Deletes all emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> EmptyInboxWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + + localVarRequestOptions.Operation = "CommonActionsControllerApi.EmptyInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/emptyInbox", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("EmptyInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send an email If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void SendEmailSimple(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0) + { + SendEmailSimpleWithHttpInfo(simpleSendEmailOptions); + } + + /// + /// Send an email If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse SendEmailSimpleWithHttpInfo(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'simpleSendEmailOptions' is set + if (simpleSendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'simpleSendEmailOptions' when calling CommonActionsControllerApi->SendEmailSimple"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = simpleSendEmailOptions; + + localVarRequestOptions.Operation = "CommonActionsControllerApi.SendEmailSimple"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/sendEmail", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailSimple", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send an email If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task SendEmailSimpleAsync(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await SendEmailSimpleWithHttpInfoAsync(simpleSendEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Send an email If no senderId or inboxId provided a random email address will be used to send from. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendEmailSimpleWithHttpInfoAsync(SimpleSendEmailOptions simpleSendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'simpleSendEmailOptions' is set + if (simpleSendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'simpleSendEmailOptions' when calling CommonActionsControllerApi->SendEmailSimple"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = simpleSendEmailOptions; + + localVarRequestOptions.Operation = "CommonActionsControllerApi.SendEmailSimple"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/sendEmail", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailSimple", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/ContactControllerApi.cs b/src/mailslurp/Api/ContactControllerApi.cs new file mode 100644 index 00000000..95d5b3e8 --- /dev/null +++ b/src/mailslurp/Api/ContactControllerApi.cs @@ -0,0 +1,1352 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IContactControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ContactDto + ContactDto CreateContact(CreateContactOptions createContactOptions, int operationIndex = 0); + + /// + /// Create a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ContactDto + ApiResponse CreateContactWithHttpInfo(CreateContactOptions createContactOptions, int operationIndex = 0); + /// + /// Delete contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteContact(Guid contactId, int operationIndex = 0); + + /// + /// Delete contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteContactWithHttpInfo(Guid contactId, int operationIndex = 0); + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageContactProjection + PageContactProjection GetAllContacts(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageContactProjection + ApiResponse GetAllContactsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ContactDto + ContactDto GetContact(Guid contactId, int operationIndex = 0); + + /// + /// Get contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ContactDto + ApiResponse GetContactWithHttpInfo(Guid contactId, int operationIndex = 0); + /// + /// Get contact vCard vcf file + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<byte[]> + List GetContactVCard(Guid contactId, int operationIndex = 0); + + /// + /// Get contact vCard vcf file + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<byte[]> + ApiResponse> GetContactVCardWithHttpInfo(Guid contactId, int operationIndex = 0); + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<ContactProjection> + List GetContacts(int operationIndex = 0); + + /// + /// Get all contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<ContactProjection> + ApiResponse> GetContactsWithHttpInfo(int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IContactControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ContactDto + System.Threading.Tasks.Task CreateContactAsync(CreateContactOptions createContactOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ContactDto) + System.Threading.Tasks.Task> CreateContactWithHttpInfoAsync(CreateContactOptions createContactOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteContactAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteContactWithHttpInfoAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageContactProjection + System.Threading.Tasks.Task GetAllContactsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageContactProjection) + System.Threading.Tasks.Task> GetAllContactsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ContactDto + System.Threading.Tasks.Task GetContactAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ContactDto) + System.Threading.Tasks.Task> GetContactWithHttpInfoAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get contact vCard vcf file + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<byte[]> + System.Threading.Tasks.Task> GetContactVCardAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get contact vCard vcf file + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<byte[]>) + System.Threading.Tasks.Task>> GetContactVCardWithHttpInfoAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<ContactProjection> + System.Threading.Tasks.Task> GetContactsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<ContactProjection>) + System.Threading.Tasks.Task>> GetContactsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IContactControllerApi : IContactControllerApiSync, IContactControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ContactControllerApi : IContactControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ContactControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContactControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ContactControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public ContactControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ContactDto + public ContactDto CreateContact(CreateContactOptions createContactOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateContactWithHttpInfo(createContactOptions); + return localVarResponse.Data; + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ContactDto + public mailslurp.Client.ApiResponse CreateContactWithHttpInfo(CreateContactOptions createContactOptions, int operationIndex = 0) + { + // verify the required parameter 'createContactOptions' is set + if (createContactOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createContactOptions' when calling ContactControllerApi->CreateContact"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createContactOptions; + + localVarRequestOptions.Operation = "ContactControllerApi.CreateContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/contacts", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ContactDto + public async System.Threading.Tasks.Task CreateContactAsync(CreateContactOptions createContactOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateContactWithHttpInfoAsync(createContactOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ContactDto) + public async System.Threading.Tasks.Task> CreateContactWithHttpInfoAsync(CreateContactOptions createContactOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createContactOptions' is set + if (createContactOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createContactOptions' when calling ContactControllerApi->CreateContact"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createContactOptions; + + localVarRequestOptions.Operation = "ContactControllerApi.CreateContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/contacts", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteContact(Guid contactId, int operationIndex = 0) + { + DeleteContactWithHttpInfo(contactId); + } + + /// + /// Delete contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteContactWithHttpInfo(Guid contactId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("contactId", mailslurp.Client.ClientUtils.ParameterToString(contactId)); // path parameter + + localVarRequestOptions.Operation = "ContactControllerApi.DeleteContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/contacts/{contactId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteContactAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteContactWithHttpInfoAsync(contactId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteContactWithHttpInfoAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("contactId", mailslurp.Client.ClientUtils.ParameterToString(contactId)); // path parameter + + localVarRequestOptions.Operation = "ContactControllerApi.DeleteContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/contacts/{contactId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageContactProjection + public PageContactProjection GetAllContacts(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllContactsWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageContactProjection + public mailslurp.Client.ApiResponse GetAllContactsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "ContactControllerApi.GetAllContacts"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/contacts/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllContacts", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageContactProjection + public async System.Threading.Tasks.Task GetAllContactsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllContactsWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageContactProjection) + public async System.Threading.Tasks.Task> GetAllContactsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "ContactControllerApi.GetAllContacts"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/contacts/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllContacts", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ContactDto + public ContactDto GetContact(Guid contactId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetContactWithHttpInfo(contactId); + return localVarResponse.Data; + } + + /// + /// Get contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ContactDto + public mailslurp.Client.ApiResponse GetContactWithHttpInfo(Guid contactId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("contactId", mailslurp.Client.ClientUtils.ParameterToString(contactId)); // path parameter + + localVarRequestOptions.Operation = "ContactControllerApi.GetContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/contacts/{contactId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ContactDto + public async System.Threading.Tasks.Task GetContactAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetContactWithHttpInfoAsync(contactId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get contact + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ContactDto) + public async System.Threading.Tasks.Task> GetContactWithHttpInfoAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("contactId", mailslurp.Client.ClientUtils.ParameterToString(contactId)); // path parameter + + localVarRequestOptions.Operation = "ContactControllerApi.GetContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/contacts/{contactId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get contact vCard vcf file + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<byte[]> + public List GetContactVCard(Guid contactId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetContactVCardWithHttpInfo(contactId); + return localVarResponse.Data; + } + + /// + /// Get contact vCard vcf file + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<byte[]> + public mailslurp.Client.ApiResponse> GetContactVCardWithHttpInfo(Guid contactId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("contactId", mailslurp.Client.ClientUtils.ParameterToString(contactId)); // path parameter + + localVarRequestOptions.Operation = "ContactControllerApi.GetContactVCard"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/contacts/{contactId}/download", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetContactVCard", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get contact vCard vcf file + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<byte[]> + public async System.Threading.Tasks.Task> GetContactVCardAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetContactVCardWithHttpInfoAsync(contactId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get contact vCard vcf file + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<byte[]>) + public async System.Threading.Tasks.Task>> GetContactVCardWithHttpInfoAsync(Guid contactId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("contactId", mailslurp.Client.ClientUtils.ParameterToString(contactId)); // path parameter + + localVarRequestOptions.Operation = "ContactControllerApi.GetContactVCard"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/contacts/{contactId}/download", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetContactVCard", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<ContactProjection> + public List GetContacts(int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetContactsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<ContactProjection> + public mailslurp.Client.ApiResponse> GetContactsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "ContactControllerApi.GetContacts"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/contacts", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetContacts", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<ContactProjection> + public async System.Threading.Tasks.Task> GetContactsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetContactsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all contacts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<ContactProjection>) + public async System.Threading.Tasks.Task>> GetContactsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "ContactControllerApi.GetContacts"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/contacts", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetContacts", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/DomainControllerApi.cs b/src/mailslurp/Api/DomainControllerApi.cs new file mode 100644 index 00000000..be62c625 --- /dev/null +++ b/src/mailslurp/Api/DomainControllerApi.cs @@ -0,0 +1,1518 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDomainControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Add catch all wild card inbox to domain + /// + /// + /// Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DomainDto + DomainDto AddDomainWildcardCatchAll(Guid id, int operationIndex = 0); + + /// + /// Add catch all wild card inbox to domain + /// + /// + /// Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + ApiResponse AddDomainWildcardCatchAllWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Create Domain + /// + /// + /// Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DomainDto + DomainDto CreateDomain(CreateDomainOptions createDomainOptions, int operationIndex = 0); + + /// + /// Create Domain + /// + /// + /// Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + ApiResponse CreateDomainWithHttpInfo(CreateDomainOptions createDomainOptions, int operationIndex = 0); + /// + /// Delete a domain + /// + /// + /// Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<string> + List DeleteDomain(Guid id, int operationIndex = 0); + + /// + /// Delete a domain + /// + /// + /// Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<string> + ApiResponse> DeleteDomainWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get a domain + /// + /// + /// Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DomainDto + DomainDto GetDomain(Guid id, int operationIndex = 0); + + /// + /// Get a domain + /// + /// + /// Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + ApiResponse GetDomainWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get catch all wild card inbox for domain + /// + /// + /// Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxDto + InboxDto GetDomainWildcardCatchAllInbox(Guid id, int operationIndex = 0); + + /// + /// Get catch all wild card inbox for domain + /// + /// + /// Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse GetDomainWildcardCatchAllInboxWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get domains + /// + /// + /// List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<DomainPreview> + List GetDomains(int operationIndex = 0); + + /// + /// Get domains + /// + /// + /// List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<DomainPreview> + ApiResponse> GetDomainsWithHttpInfo(int operationIndex = 0); + /// + /// Update a domain + /// + /// + /// Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// DomainDto + DomainDto UpdateDomain(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0); + + /// + /// Update a domain + /// + /// + /// Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + ApiResponse UpdateDomainWithHttpInfo(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDomainControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Add catch all wild card inbox to domain + /// + /// + /// Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + System.Threading.Tasks.Task AddDomainWildcardCatchAllAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Add catch all wild card inbox to domain + /// + /// + /// Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + System.Threading.Tasks.Task> AddDomainWildcardCatchAllWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create Domain + /// + /// + /// Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + System.Threading.Tasks.Task CreateDomainAsync(CreateDomainOptions createDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create Domain + /// + /// + /// Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + System.Threading.Tasks.Task> CreateDomainWithHttpInfoAsync(CreateDomainOptions createDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete a domain + /// + /// + /// Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + System.Threading.Tasks.Task> DeleteDomainAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete a domain + /// + /// + /// Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> DeleteDomainWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a domain + /// + /// + /// Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + System.Threading.Tasks.Task GetDomainAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a domain + /// + /// + /// Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + System.Threading.Tasks.Task> GetDomainWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get catch all wild card inbox for domain + /// + /// + /// Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task GetDomainWildcardCatchAllInboxAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get catch all wild card inbox for domain + /// + /// + /// Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> GetDomainWildcardCatchAllInboxWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get domains + /// + /// + /// List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<DomainPreview> + System.Threading.Tasks.Task> GetDomainsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get domains + /// + /// + /// List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<DomainPreview>) + System.Threading.Tasks.Task>> GetDomainsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update a domain + /// + /// + /// Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + System.Threading.Tasks.Task UpdateDomainAsync(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update a domain + /// + /// + /// Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + System.Threading.Tasks.Task> UpdateDomainWithHttpInfoAsync(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDomainControllerApi : IDomainControllerApiSync, IDomainControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class DomainControllerApi : IDomainControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public DomainControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public DomainControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public DomainControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public DomainControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DomainDto + public DomainDto AddDomainWildcardCatchAll(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = AddDomainWildcardCatchAllWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + public mailslurp.Client.ApiResponse AddDomainWildcardCatchAllWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.AddDomainWildcardCatchAll"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/domains/{id}/wildcard", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddDomainWildcardCatchAll", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + public async System.Threading.Tasks.Task AddDomainWildcardCatchAllAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await AddDomainWildcardCatchAllWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + public async System.Threading.Tasks.Task> AddDomainWildcardCatchAllWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.AddDomainWildcardCatchAll"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/domains/{id}/wildcard", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddDomainWildcardCatchAll", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DomainDto + public DomainDto CreateDomain(CreateDomainOptions createDomainOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateDomainWithHttpInfo(createDomainOptions); + return localVarResponse.Data; + } + + /// + /// Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + public mailslurp.Client.ApiResponse CreateDomainWithHttpInfo(CreateDomainOptions createDomainOptions, int operationIndex = 0) + { + // verify the required parameter 'createDomainOptions' is set + if (createDomainOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createDomainOptions' when calling DomainControllerApi->CreateDomain"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createDomainOptions; + + localVarRequestOptions.Operation = "DomainControllerApi.CreateDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/domains", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + public async System.Threading.Tasks.Task CreateDomainAsync(CreateDomainOptions createDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateDomainWithHttpInfoAsync(createDomainOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + public async System.Threading.Tasks.Task> CreateDomainWithHttpInfoAsync(CreateDomainOptions createDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createDomainOptions' is set + if (createDomainOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createDomainOptions' when calling DomainControllerApi->CreateDomain"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createDomainOptions; + + localVarRequestOptions.Operation = "DomainControllerApi.CreateDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/domains", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete a domain Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<string> + public List DeleteDomain(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = DeleteDomainWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Delete a domain Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<string> + public mailslurp.Client.ApiResponse> DeleteDomainWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.DeleteDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete>("/domains/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete a domain Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + public async System.Threading.Tasks.Task> DeleteDomainAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await DeleteDomainWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete a domain Delete a domain. This will disable any existing inboxes that use this domain. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> DeleteDomainWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.DeleteDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync>("/domains/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a domain Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DomainDto + public DomainDto GetDomain(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetDomainWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get a domain Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + public mailslurp.Client.ApiResponse GetDomainWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.GetDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/domains/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a domain Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + public async System.Threading.Tasks.Task GetDomainAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetDomainWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a domain Returns domain verification status and tokens for a given domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + public async System.Threading.Tasks.Task> GetDomainWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.GetDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/domains/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get catch all wild card inbox for domain Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxDto + public InboxDto GetDomainWildcardCatchAllInbox(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetDomainWildcardCatchAllInboxWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get catch all wild card inbox for domain Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse GetDomainWildcardCatchAllInboxWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.GetDomainWildcardCatchAllInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/domains/{id}/wildcard", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDomainWildcardCatchAllInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get catch all wild card inbox for domain Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task GetDomainWildcardCatchAllInboxAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetDomainWildcardCatchAllInboxWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get catch all wild card inbox for domain Get the catch all inbox for a domain for missed emails + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> GetDomainWildcardCatchAllInboxWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "DomainControllerApi.GetDomainWildcardCatchAllInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/domains/{id}/wildcard", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDomainWildcardCatchAllInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get domains List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<DomainPreview> + public List GetDomains(int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetDomainsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get domains List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<DomainPreview> + public mailslurp.Client.ApiResponse> GetDomainsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "DomainControllerApi.GetDomains"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/domains", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDomains", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get domains List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<DomainPreview> + public async System.Threading.Tasks.Task> GetDomainsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetDomainsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get domains List all custom domains you have created + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<DomainPreview>) + public async System.Threading.Tasks.Task>> GetDomainsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "DomainControllerApi.GetDomains"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/domains", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDomains", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// DomainDto + public DomainDto UpdateDomain(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = UpdateDomainWithHttpInfo(id, updateDomainOptions); + return localVarResponse.Data; + } + + /// + /// Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of DomainDto + public mailslurp.Client.ApiResponse UpdateDomainWithHttpInfo(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0) + { + // verify the required parameter 'updateDomainOptions' is set + if (updateDomainOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateDomainOptions' when calling DomainControllerApi->UpdateDomain"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = updateDomainOptions; + + localVarRequestOptions.Operation = "DomainControllerApi.UpdateDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/domains/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DomainDto + public async System.Threading.Tasks.Task UpdateDomainAsync(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await UpdateDomainWithHttpInfoAsync(id, updateDomainOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DomainDto) + public async System.Threading.Tasks.Task> UpdateDomainWithHttpInfoAsync(Guid id, UpdateDomainOptions updateDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'updateDomainOptions' is set + if (updateDomainOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateDomainOptions' when calling DomainControllerApi->UpdateDomain"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = updateDomainOptions; + + localVarRequestOptions.Operation = "DomainControllerApi.UpdateDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/domains/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/EmailControllerApi.cs b/src/mailslurp/Api/EmailControllerApi.cs new file mode 100644 index 00000000..dc58b2f4 --- /dev/null +++ b/src/mailslurp/Api/EmailControllerApi.cs @@ -0,0 +1,6637 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IEmailControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. + /// + /// + /// Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// EmailPreview + EmailPreview ApplyImapFlagOperation(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0); + + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. + /// + /// + /// Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of EmailPreview + ApiResponse ApplyImapFlagOperationWithHttpInfo(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0); + /// + /// Delete all emails in all inboxes. + /// + /// + /// Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + void DeleteAllEmails(int operationIndex = 0); + + /// + /// Delete all emails in all inboxes. + /// + /// + /// Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAllEmailsWithHttpInfo(int operationIndex = 0); + /// + /// Delete an email + /// + /// + /// Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// + void DeleteEmail(Guid emailId, int operationIndex = 0); + + /// + /// Delete an email + /// + /// + /// Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteEmailWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// byte[] + byte[] DownloadAttachment(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0); + + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// ApiResponse of byte[] + ApiResponse DownloadAttachmentWithHttpInfo(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0); + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// DownloadAttachmentDto + DownloadAttachmentDto DownloadAttachmentBase64(Guid emailId, string attachmentId, int operationIndex = 0); + + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of DownloadAttachmentDto + ApiResponse DownloadAttachmentBase64WithHttpInfo(Guid emailId, string attachmentId, int operationIndex = 0); + /// + /// Get email body as string. Returned as `plain/text` with content type header. + /// + /// + /// Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// string + string DownloadBody(Guid emailId, int operationIndex = 0); + + /// + /// Get email body as string. Returned as `plain/text` with content type header. + /// + /// + /// Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse DownloadBodyWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. + /// + /// + /// Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// byte[] + byte[] DownloadBodyBytes(Guid emailId, int operationIndex = 0); + + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. + /// + /// + /// Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of byte[] + ApiResponse DownloadBodyBytesWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Forward email to recipients + /// + /// + /// Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// SentEmailDto + SentEmailDto ForwardEmail(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0); + + /// + /// Forward email to recipients + /// + /// + /// Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + ApiResponse ForwardEmailWithHttpInfo(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0); + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + /// + /// + /// Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// AttachmentMetaData + AttachmentMetaData GetAttachmentMetaData(Guid emailId, string attachmentId, int operationIndex = 0); + + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + /// + /// + /// Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of AttachmentMetaData + ApiResponse GetAttachmentMetaDataWithHttpInfo(Guid emailId, string attachmentId, int operationIndex = 0); + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// Email + Email GetEmail(Guid emailId, bool? decode = default(bool?), int operationIndex = 0); + + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of Email + ApiResponse GetEmailWithHttpInfo(Guid emailId, bool? decode = default(bool?), int operationIndex = 0); + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. + /// + /// + /// Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// List<AttachmentMetaData> + List GetEmailAttachments(Guid emailId, int operationIndex = 0); + + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. + /// + /// + /// Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of List<AttachmentMetaData> + ApiResponse> GetEmailAttachmentsWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. + /// + /// + /// Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// EmailContentMatchResult + EmailContentMatchResult GetEmailContentMatch(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0); + + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. + /// + /// + /// Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// ApiResponse of EmailContentMatchResult + ApiResponse GetEmailContentMatchWithHttpInfo(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0); + /// + /// Get email count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// CountDto + CountDto GetEmailCount(int operationIndex = 0); + + /// + /// Get email count + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of CountDto + ApiResponse GetEmailCountWithHttpInfo(int operationIndex = 0); + /// + /// Get email content as HTML. For displaying emails in browser context. + /// + /// + /// Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// string + string GetEmailHTML(Guid emailId, bool? decode = default(bool?), int operationIndex = 0); + + /// + /// Get email content as HTML. For displaying emails in browser context. + /// + /// + /// Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse GetEmailHTMLWithHttpInfo(Guid emailId, bool? decode = default(bool?), int operationIndex = 0); + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + /// + /// + /// Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// EmailHtmlDto + EmailHtmlDto GetEmailHTMLJson(Guid emailId, bool? decode = default(bool?), int operationIndex = 0); + + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + /// + /// + /// Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of EmailHtmlDto + ApiResponse GetEmailHTMLJsonWithHttpInfo(Guid emailId, bool? decode = default(bool?), int operationIndex = 0); + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// EmailTextLinesResult + EmailTextLinesResult GetEmailHTMLQuery(Guid emailId, string htmlSelector, int operationIndex = 0); + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// ApiResponse of EmailTextLinesResult + ApiResponse GetEmailHTMLQueryWithHttpInfo(Guid emailId, string htmlSelector, int operationIndex = 0); + /// + /// Parse and return list of links found in an email (only works for HTML content) + /// + /// + /// HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// EmailLinksResult + EmailLinksResult GetEmailLinks(Guid emailId, int operationIndex = 0); + + /// + /// Parse and return list of links found in an email (only works for HTML content) + /// + /// + /// HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// ApiResponse of EmailLinksResult + ApiResponse GetEmailLinksWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Get email URLs for viewing in browser or downloading + /// + /// + /// Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmailPreviewUrls + EmailPreviewUrls GetEmailPreviewURLs(Guid emailId, int operationIndex = 0); + + /// + /// Get email URLs for viewing in browser or downloading + /// + /// + /// Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmailPreviewUrls + ApiResponse GetEmailPreviewURLsWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// EmailTextLinesResult + EmailTextLinesResult GetEmailTextLines(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0); + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// ApiResponse of EmailTextLinesResult + ApiResponse GetEmailTextLinesWithHttpInfo(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0); + /// + /// Get all emails in all inboxes in paginated form. Email API list all. + /// + /// + /// By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// PageEmailProjection + PageEmailProjection GetEmailsPaginated(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all emails in all inboxes in paginated form. Email API list all. + /// + /// + /// By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailProjection + ApiResponse GetEmailsPaginatedWithHttpInfo(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// GravatarUrl + GravatarUrl GetGravatarUrlForEmailAddress(string emailAddress, string size = default(string), int operationIndex = 0); + + /// + /// + /// + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// ApiResponse of GravatarUrl + ApiResponse GetGravatarUrlForEmailAddressWithHttpInfo(string emailAddress, string size = default(string), int operationIndex = 0); + /// + /// Get latest email in all inboxes. Most recently received. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// Email + Email GetLatestEmail(List inboxIds = default(List), int operationIndex = 0); + + /// + /// Get latest email in all inboxes. Most recently received. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// ApiResponse of Email + ApiResponse GetLatestEmailWithHttpInfo(List inboxIds = default(List), int operationIndex = 0); + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// Email + Email GetLatestEmailInInbox1(Guid inboxId, int operationIndex = 0); + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// ApiResponse of Email + ApiResponse GetLatestEmailInInbox1WithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Get all organization emails. List team or shared test email accounts + /// + /// + /// By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// PageEmailProjection + PageEmailProjection GetOrganizationEmailsPaginated(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all organization emails. List team or shared test email accounts + /// + /// + /// By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailProjection + ApiResponse GetOrganizationEmailsPaginatedWithHttpInfo(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// string + string GetRawEmailContents(Guid emailId, int operationIndex = 0); + + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse GetRawEmailContentsWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// RawEmailJson + RawEmailJson GetRawEmailJson(Guid emailId, int operationIndex = 0); + + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of RawEmailJson + ApiResponse GetRawEmailJsonWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Get unread email count + /// + /// + /// Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// UnreadCount + UnreadCount GetUnreadEmailCount(int operationIndex = 0); + + /// + /// Get unread email count + /// + /// + /// Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of UnreadCount + ApiResponse GetUnreadEmailCountWithHttpInfo(int operationIndex = 0); + /// + /// Mark an email as read on unread + /// + /// + /// Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// EmailPreview + EmailPreview MarkAsRead(Guid emailId, bool? read = default(bool?), int operationIndex = 0); + + /// + /// Mark an email as read on unread + /// + /// + /// Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// ApiResponse of EmailPreview + ApiResponse MarkAsReadWithHttpInfo(Guid emailId, bool? read = default(bool?), int operationIndex = 0); + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// SentEmailDto + SentEmailDto ReplyToEmail(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0); + + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + ApiResponse ReplyToEmailWithHttpInfo(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0); + /// + /// Send email + /// + /// + /// Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// + void SendEmailSourceOptional(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0); + + /// + /// Send email + /// + /// + /// Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse SendEmailSourceOptionalWithHttpInfo(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0); + /// + /// Validate email HTML contents + /// + /// + /// Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ValidationDto + ValidationDto ValidateEmail(Guid emailId, int operationIndex = 0); + + /// + /// Validate email HTML contents + /// + /// + /// Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of ValidationDto + ApiResponse ValidateEmailWithHttpInfo(Guid emailId, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IEmailControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. + /// + /// + /// Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreview + System.Threading.Tasks.Task ApplyImapFlagOperationAsync(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. + /// + /// + /// Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreview) + System.Threading.Tasks.Task> ApplyImapFlagOperationWithHttpInfoAsync(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete all emails in all inboxes. + /// + /// + /// Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAllEmailsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all emails in all inboxes. + /// + /// + /// Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAllEmailsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete an email + /// + /// + /// Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteEmailAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete an email + /// + /// + /// Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteEmailWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of byte[] + System.Threading.Tasks.Task DownloadAttachmentAsync(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + /// + /// + /// Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (byte[]) + System.Threading.Tasks.Task> DownloadAttachmentWithHttpInfoAsync(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DownloadAttachmentDto + System.Threading.Tasks.Task DownloadAttachmentBase64Async(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + /// + /// + /// Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DownloadAttachmentDto) + System.Threading.Tasks.Task> DownloadAttachmentBase64WithHttpInfoAsync(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email body as string. Returned as `plain/text` with content type header. + /// + /// + /// Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task DownloadBodyAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email body as string. Returned as `plain/text` with content type header. + /// + /// + /// Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> DownloadBodyWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. + /// + /// + /// Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of byte[] + System.Threading.Tasks.Task DownloadBodyBytesAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. + /// + /// + /// Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (byte[]) + System.Threading.Tasks.Task> DownloadBodyBytesWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Forward email to recipients + /// + /// + /// Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + System.Threading.Tasks.Task ForwardEmailAsync(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Forward email to recipients + /// + /// + /// Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + System.Threading.Tasks.Task> ForwardEmailWithHttpInfoAsync(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + /// + /// + /// Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AttachmentMetaData + System.Threading.Tasks.Task GetAttachmentMetaDataAsync(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + /// + /// + /// Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AttachmentMetaData) + System.Threading.Tasks.Task> GetAttachmentMetaDataWithHttpInfoAsync(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + System.Threading.Tasks.Task GetEmailAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + System.Threading.Tasks.Task> GetEmailWithHttpInfoAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. + /// + /// + /// Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<AttachmentMetaData> + System.Threading.Tasks.Task> GetEmailAttachmentsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. + /// + /// + /// Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<AttachmentMetaData>) + System.Threading.Tasks.Task>> GetEmailAttachmentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. + /// + /// + /// Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailContentMatchResult + System.Threading.Tasks.Task GetEmailContentMatchAsync(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. + /// + /// + /// Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailContentMatchResult) + System.Threading.Tasks.Task> GetEmailContentMatchWithHttpInfoAsync(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email count + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CountDto + System.Threading.Tasks.Task GetEmailCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email count + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CountDto) + System.Threading.Tasks.Task> GetEmailCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email content as HTML. For displaying emails in browser context. + /// + /// + /// Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task GetEmailHTMLAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email content as HTML. For displaying emails in browser context. + /// + /// + /// Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> GetEmailHTMLWithHttpInfoAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + /// + /// + /// Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailHtmlDto + System.Threading.Tasks.Task GetEmailHTMLJsonAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + /// + /// + /// Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailHtmlDto) + System.Threading.Tasks.Task> GetEmailHTMLJsonWithHttpInfoAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailTextLinesResult + System.Threading.Tasks.Task GetEmailHTMLQueryAsync(Guid emailId, string htmlSelector, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailTextLinesResult) + System.Threading.Tasks.Task> GetEmailHTMLQueryWithHttpInfoAsync(Guid emailId, string htmlSelector, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Parse and return list of links found in an email (only works for HTML content) + /// + /// + /// HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailLinksResult + System.Threading.Tasks.Task GetEmailLinksAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Parse and return list of links found in an email (only works for HTML content) + /// + /// + /// HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailLinksResult) + System.Threading.Tasks.Task> GetEmailLinksWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email URLs for viewing in browser or downloading + /// + /// + /// Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreviewUrls + System.Threading.Tasks.Task GetEmailPreviewURLsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email URLs for viewing in browser or downloading + /// + /// + /// Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreviewUrls) + System.Threading.Tasks.Task> GetEmailPreviewURLsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailTextLinesResult + System.Threading.Tasks.Task GetEmailTextLinesAsync(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters + /// + /// + /// Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailTextLinesResult) + System.Threading.Tasks.Task> GetEmailTextLinesWithHttpInfoAsync(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all emails in all inboxes in paginated form. Email API list all. + /// + /// + /// By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailProjection + System.Threading.Tasks.Task GetEmailsPaginatedAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all emails in all inboxes in paginated form. Email API list all. + /// + /// + /// By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailProjection) + System.Threading.Tasks.Task> GetEmailsPaginatedWithHttpInfoAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GravatarUrl + System.Threading.Tasks.Task GetGravatarUrlForEmailAddressAsync(string emailAddress, string size = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GravatarUrl) + System.Threading.Tasks.Task> GetGravatarUrlForEmailAddressWithHttpInfoAsync(string emailAddress, string size = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get latest email in all inboxes. Most recently received. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + System.Threading.Tasks.Task GetLatestEmailAsync(List inboxIds = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get latest email in all inboxes. Most recently received. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + System.Threading.Tasks.Task> GetLatestEmailWithHttpInfoAsync(List inboxIds = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + System.Threading.Tasks.Task GetLatestEmailInInbox1Async(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + System.Threading.Tasks.Task> GetLatestEmailInInbox1WithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all organization emails. List team or shared test email accounts + /// + /// + /// By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailProjection + System.Threading.Tasks.Task GetOrganizationEmailsPaginatedAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all organization emails. List team or shared test email accounts + /// + /// + /// By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailProjection) + System.Threading.Tasks.Task> GetOrganizationEmailsPaginatedWithHttpInfoAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task GetRawEmailContentsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> GetRawEmailContentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of RawEmailJson + System.Threading.Tasks.Task GetRawEmailJsonAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (RawEmailJson) + System.Threading.Tasks.Task> GetRawEmailJsonWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get unread email count + /// + /// + /// Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UnreadCount + System.Threading.Tasks.Task GetUnreadEmailCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get unread email count + /// + /// + /// Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UnreadCount) + System.Threading.Tasks.Task> GetUnreadEmailCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Mark an email as read on unread + /// + /// + /// Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreview + System.Threading.Tasks.Task MarkAsReadAsync(Guid emailId, bool? read = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Mark an email as read on unread + /// + /// + /// Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreview) + System.Threading.Tasks.Task> MarkAsReadWithHttpInfoAsync(Guid emailId, bool? read = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + System.Threading.Tasks.Task ReplyToEmailAsync(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reply to an email + /// + /// + /// Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + System.Threading.Tasks.Task> ReplyToEmailWithHttpInfoAsync(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send email + /// + /// + /// Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task SendEmailSourceOptionalAsync(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send email + /// + /// + /// Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> SendEmailSourceOptionalWithHttpInfoAsync(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Validate email HTML contents + /// + /// + /// Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ValidationDto + System.Threading.Tasks.Task ValidateEmailAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Validate email HTML contents + /// + /// + /// Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ValidationDto) + System.Threading.Tasks.Task> ValidateEmailWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IEmailControllerApi : IEmailControllerApiSync, IEmailControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class EmailControllerApi : IEmailControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public EmailControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public EmailControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public EmailControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public EmailControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// EmailPreview + public EmailPreview ApplyImapFlagOperation(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ApplyImapFlagOperationWithHttpInfo(emailId, imapFlagOperationOptions); + return localVarResponse.Data; + } + + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of EmailPreview + public mailslurp.Client.ApiResponse ApplyImapFlagOperationWithHttpInfo(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0) + { + // verify the required parameter 'imapFlagOperationOptions' is set + if (imapFlagOperationOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'imapFlagOperationOptions' when calling EmailControllerApi->ApplyImapFlagOperation"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = imapFlagOperationOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.ApplyImapFlagOperation"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/emails/{emailId}/imap-flag-operation", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApplyImapFlagOperation", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreview + public async System.Threading.Tasks.Task ApplyImapFlagOperationAsync(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ApplyImapFlagOperationWithHttpInfoAsync(emailId, imapFlagOperationOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Set IMAP flags associated with a message. Only supports '\\Seen' flag. Apply RFC3501 section-2.3.2 IMAP flag operations on an email + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreview) + public async System.Threading.Tasks.Task> ApplyImapFlagOperationWithHttpInfoAsync(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'imapFlagOperationOptions' is set + if (imapFlagOperationOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'imapFlagOperationOptions' when calling EmailControllerApi->ApplyImapFlagOperation"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = imapFlagOperationOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.ApplyImapFlagOperation"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/emails/{emailId}/imap-flag-operation", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApplyImapFlagOperation", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all emails in all inboxes. Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + public void DeleteAllEmails(int operationIndex = 0) + { + DeleteAllEmailsWithHttpInfo(); + } + + /// + /// Delete all emails in all inboxes. Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAllEmailsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "EmailControllerApi.DeleteAllEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all emails in all inboxes. Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAllEmailsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAllEmailsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all emails in all inboxes. Deletes all emails in your account. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAllEmailsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "EmailControllerApi.DeleteAllEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an email Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// + public void DeleteEmail(Guid emailId, int operationIndex = 0) + { + DeleteEmailWithHttpInfo(emailId); + } + + /// + /// Delete an email Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteEmailWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DeleteEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/emails/{emailId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an email Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteEmailAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteEmailWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete an email Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + /// + /// Thrown when fails to make API call + /// ID of email to delete + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteEmailWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DeleteEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/emails/{emailId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// byte[] + public byte[] DownloadAttachment(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DownloadAttachmentWithHttpInfo(emailId, attachmentId, apiKey); + return localVarResponse.Data; + } + + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// ApiResponse of byte[] + public mailslurp.Client.ApiResponse DownloadAttachmentWithHttpInfo(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling EmailControllerApi->DownloadAttachment"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + if (apiKey != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "apiKey", apiKey)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/attachments/{attachmentId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of byte[] + public async System.Threading.Tasks.Task DownloadAttachmentAsync(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DownloadAttachmentWithHttpInfoAsync(emailId, attachmentId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (byte[]) + public async System.Threading.Tasks.Task> DownloadAttachmentWithHttpInfoAsync(Guid emailId, string attachmentId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling EmailControllerApi->DownloadAttachment"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + if (apiKey != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "apiKey", apiKey)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/attachments/{attachmentId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// DownloadAttachmentDto + public DownloadAttachmentDto DownloadAttachmentBase64(Guid emailId, string attachmentId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DownloadAttachmentBase64WithHttpInfo(emailId, attachmentId); + return localVarResponse.Data; + } + + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of DownloadAttachmentDto + public mailslurp.Client.ApiResponse DownloadAttachmentBase64WithHttpInfo(Guid emailId, string attachmentId, int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling EmailControllerApi->DownloadAttachmentBase64"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadAttachmentBase64"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/attachments/{attachmentId}/base64", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachmentBase64", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DownloadAttachmentDto + public async System.Threading.Tasks.Task DownloadAttachmentBase64Async(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DownloadAttachmentBase64WithHttpInfoAsync(emailId, attachmentId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DownloadAttachmentDto) + public async System.Threading.Tasks.Task> DownloadAttachmentBase64WithHttpInfoAsync(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling EmailControllerApi->DownloadAttachmentBase64"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadAttachmentBase64"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/attachments/{attachmentId}/base64", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadAttachmentBase64", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email body as string. Returned as `plain/text` with content type header. Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// string + public string DownloadBody(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DownloadBodyWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get email body as string. Returned as `plain/text` with content type header. Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse DownloadBodyWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain", + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadBody"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/body", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadBody", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email body as string. Returned as `plain/text` with content type header. Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task DownloadBodyAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DownloadBodyWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email body as string. Returned as `plain/text` with content type header. Returns the specified email body for a given email as a string + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> DownloadBodyWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain", + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadBody"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/body", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadBody", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// byte[] + public byte[] DownloadBodyBytes(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DownloadBodyBytesWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of byte[] + public mailslurp.Client.ApiResponse DownloadBodyBytesWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadBodyBytes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/body-bytes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadBodyBytes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of byte[] + public async System.Threading.Tasks.Task DownloadBodyBytesAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DownloadBodyBytesWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email body in bytes. Returned as `octet-stream` with content type header. Returns the specified email body for a given email as a stream / array of bytes. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (byte[]) + public async System.Threading.Tasks.Task> DownloadBodyBytesWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.DownloadBodyBytes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/body-bytes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadBodyBytes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Forward email to recipients Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// SentEmailDto + public SentEmailDto ForwardEmail(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ForwardEmailWithHttpInfo(emailId, forwardEmailOptions); + return localVarResponse.Data; + } + + /// + /// Forward email to recipients Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + public mailslurp.Client.ApiResponse ForwardEmailWithHttpInfo(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'forwardEmailOptions' is set + if (forwardEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'forwardEmailOptions' when calling EmailControllerApi->ForwardEmail"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = forwardEmailOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.ForwardEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/emails/{emailId}/forward", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ForwardEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Forward email to recipients Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + public async System.Threading.Tasks.Task ForwardEmailAsync(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ForwardEmailWithHttpInfoAsync(emailId, forwardEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Forward email to recipients Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + /// + /// Thrown when fails to make API call + /// ID of email + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + public async System.Threading.Tasks.Task> ForwardEmailWithHttpInfoAsync(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'forwardEmailOptions' is set + if (forwardEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'forwardEmailOptions' when calling EmailControllerApi->ForwardEmail"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = forwardEmailOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.ForwardEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/emails/{emailId}/forward", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ForwardEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// AttachmentMetaData + public AttachmentMetaData GetAttachmentMetaData(Guid emailId, string attachmentId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAttachmentMetaDataWithHttpInfo(emailId, attachmentId); + return localVarResponse.Data; + } + + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// ApiResponse of AttachmentMetaData + public mailslurp.Client.ApiResponse GetAttachmentMetaDataWithHttpInfo(Guid emailId, string attachmentId, int operationIndex = 0) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling EmailControllerApi->GetAttachmentMetaData"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetAttachmentMetaData"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/attachments/{attachmentId}/metadata", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachmentMetaData", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AttachmentMetaData + public async System.Threading.Tasks.Task GetAttachmentMetaDataAsync(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAttachmentMetaDataWithHttpInfoAsync(emailId, attachmentId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. Returns the metadata such as name and content-type for a given attachment and email. + /// + /// Thrown when fails to make API call + /// ID of email + /// ID of attachment + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AttachmentMetaData) + public async System.Threading.Tasks.Task> GetAttachmentMetaDataWithHttpInfoAsync(Guid emailId, string attachmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'attachmentId' when calling EmailControllerApi->GetAttachmentMetaData"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.PathParameters.Add("attachmentId", mailslurp.Client.ClientUtils.ParameterToString(attachmentId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetAttachmentMetaData"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/attachments/{attachmentId}/metadata", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAttachmentMetaData", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// Email + public Email GetEmail(Guid emailId, bool? decode = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailWithHttpInfo(emailId, decode); + return localVarResponse.Data; + } + + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of Email + public mailslurp.Client.ApiResponse GetEmailWithHttpInfo(Guid emailId, bool? decode = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decode != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decode", decode)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + public async System.Threading.Tasks.Task GetEmailAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailWithHttpInfoAsync(emailId, decode, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + /// + /// Thrown when fails to make API call + /// + /// Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + public async System.Threading.Tasks.Task> GetEmailWithHttpInfoAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decode != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decode", decode)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// List<AttachmentMetaData> + public List GetEmailAttachments(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetEmailAttachmentsWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of List<AttachmentMetaData> + public mailslurp.Client.ApiResponse> GetEmailAttachmentsWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailAttachments"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/emails/{emailId}/attachments", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailAttachments", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<AttachmentMetaData> + public async System.Threading.Tasks.Task> GetEmailAttachmentsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetEmailAttachmentsWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all email attachment metadata. Metadata includes name and size of attachments. Returns an array of attachment metadata such as name and content-type for a given email if present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<AttachmentMetaData>) + public async System.Threading.Tasks.Task>> GetEmailAttachmentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailAttachments"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/emails/{emailId}/attachments", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailAttachments", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// EmailContentMatchResult + public EmailContentMatchResult GetEmailContentMatch(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailContentMatchWithHttpInfo(emailId, contentMatchOptions); + return localVarResponse.Data; + } + + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// ApiResponse of EmailContentMatchResult + public mailslurp.Client.ApiResponse GetEmailContentMatchWithHttpInfo(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0) + { + // verify the required parameter 'contentMatchOptions' is set + if (contentMatchOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'contentMatchOptions' when calling EmailControllerApi->GetEmailContentMatch"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = contentMatchOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailContentMatch"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/emails/{emailId}/contentMatch", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailContentMatch", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailContentMatchResult + public async System.Threading.Tasks.Task GetEmailContentMatchAsync(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailContentMatchWithHttpInfoAsync(emailId, contentMatchOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email content regex pattern match results. Runs regex against email body and returns match groups. Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Thrown when fails to make API call + /// ID of email to match against + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailContentMatchResult) + public async System.Threading.Tasks.Task> GetEmailContentMatchWithHttpInfoAsync(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'contentMatchOptions' is set + if (contentMatchOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'contentMatchOptions' when calling EmailControllerApi->GetEmailContentMatch"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = contentMatchOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailContentMatch"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/emails/{emailId}/contentMatch", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailContentMatch", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// CountDto + public CountDto GetEmailCount(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailCountWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get email count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of CountDto + public mailslurp.Client.ApiResponse GetEmailCountWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/emails/count", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CountDto + public async System.Threading.Tasks.Task GetEmailCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailCountWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CountDto) + public async System.Threading.Tasks.Task> GetEmailCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/emails/count", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content as HTML. For displaying emails in browser context. Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// string + public string GetEmailHTML(Guid emailId, bool? decode = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailHTMLWithHttpInfo(emailId, decode); + return localVarResponse.Data; + } + + /// + /// Get email content as HTML. For displaying emails in browser context. Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse GetEmailHTMLWithHttpInfo(Guid emailId, bool? decode = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/html;charset=utf-8", + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decode != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decode", decode)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailHTML"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/html", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailHTML", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content as HTML. For displaying emails in browser context. Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task GetEmailHTMLAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailHTMLWithHttpInfoAsync(emailId, decode, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email content as HTML. For displaying emails in browser context. Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> GetEmailHTMLWithHttpInfoAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/html;charset=utf-8", + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decode != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decode", decode)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailHTML"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/html", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailHTML", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// EmailHtmlDto + public EmailHtmlDto GetEmailHTMLJson(Guid emailId, bool? decode = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailHTMLJsonWithHttpInfo(emailId, decode); + return localVarResponse.Data; + } + + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of EmailHtmlDto + public mailslurp.Client.ApiResponse GetEmailHTMLJsonWithHttpInfo(Guid emailId, bool? decode = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decode != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decode", decode)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailHTMLJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/html/json", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailHTMLJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailHtmlDto + public async System.Threading.Tasks.Task GetEmailHTMLJsonAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailHTMLJsonWithHttpInfoAsync(emailId, decode, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailHtmlDto) + public async System.Threading.Tasks.Task> GetEmailHTMLJsonWithHttpInfoAsync(Guid emailId, bool? decode = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decode != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decode", decode)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailHTMLJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/html/json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailHTMLJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// EmailTextLinesResult + public EmailTextLinesResult GetEmailHTMLQuery(Guid emailId, string htmlSelector, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailHTMLQueryWithHttpInfo(emailId, htmlSelector); + return localVarResponse.Data; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// ApiResponse of EmailTextLinesResult + public mailslurp.Client.ApiResponse GetEmailHTMLQueryWithHttpInfo(Guid emailId, string htmlSelector, int operationIndex = 0) + { + // verify the required parameter 'htmlSelector' is set + if (htmlSelector == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'htmlSelector' when calling EmailControllerApi->GetEmailHTMLQuery"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "htmlSelector", htmlSelector)); + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailHTMLQuery"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/htmlQuery", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailHTMLQuery", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailTextLinesResult + public async System.Threading.Tasks.Task GetEmailHTMLQueryAsync(Guid emailId, string htmlSelector, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailHTMLQueryWithHttpInfoAsync(emailId, htmlSelector, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + /// + /// Thrown when fails to make API call + /// ID of email to perform HTML query on + /// HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailTextLinesResult) + public async System.Threading.Tasks.Task> GetEmailHTMLQueryWithHttpInfoAsync(Guid emailId, string htmlSelector, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'htmlSelector' is set + if (htmlSelector == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'htmlSelector' when calling EmailControllerApi->GetEmailHTMLQuery"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "htmlSelector", htmlSelector)); + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailHTMLQuery"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/htmlQuery", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailHTMLQuery", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Parse and return list of links found in an email (only works for HTML content) HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// EmailLinksResult + public EmailLinksResult GetEmailLinks(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailLinksWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Parse and return list of links found in an email (only works for HTML content) HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// ApiResponse of EmailLinksResult + public mailslurp.Client.ApiResponse GetEmailLinksWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailLinks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/links", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailLinks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Parse and return list of links found in an email (only works for HTML content) HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailLinksResult + public async System.Threading.Tasks.Task GetEmailLinksAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailLinksWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Parse and return list of links found in an email (only works for HTML content) HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailLinksResult) + public async System.Threading.Tasks.Task> GetEmailLinksWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailLinks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/links", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailLinks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email URLs for viewing in browser or downloading Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmailPreviewUrls + public EmailPreviewUrls GetEmailPreviewURLs(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailPreviewURLsWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get email URLs for viewing in browser or downloading Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmailPreviewUrls + public mailslurp.Client.ApiResponse GetEmailPreviewURLsWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailPreviewURLs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/urls", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailPreviewURLs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email URLs for viewing in browser or downloading Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreviewUrls + public async System.Threading.Tasks.Task GetEmailPreviewURLsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailPreviewURLsWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email URLs for viewing in browser or downloading Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreviewUrls) + public async System.Threading.Tasks.Task> GetEmailPreviewURLsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailPreviewURLs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/urls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailPreviewURLs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// EmailTextLinesResult + public EmailTextLinesResult GetEmailTextLines(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailTextLinesWithHttpInfo(emailId, decodeHtmlEntities, lineSeparator); + return localVarResponse.Data; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// ApiResponse of EmailTextLinesResult + public mailslurp.Client.ApiResponse GetEmailTextLinesWithHttpInfo(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decodeHtmlEntities != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decodeHtmlEntities", decodeHtmlEntities)); + } + if (lineSeparator != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "lineSeparator", lineSeparator)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailTextLines"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/textLines", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailTextLines", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailTextLinesResult + public async System.Threading.Tasks.Task GetEmailTextLinesAsync(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailTextLinesWithHttpInfoAsync(emailId, decodeHtmlEntities, lineSeparator, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Parse and return text from an email, stripping HTML and decoding encoded characters Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + /// + /// Thrown when fails to make API call + /// ID of email to fetch text for + /// Decode HTML entities (optional) + /// Line separator character (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailTextLinesResult) + public async System.Threading.Tasks.Task> GetEmailTextLinesWithHttpInfoAsync(Guid emailId, bool? decodeHtmlEntities = default(bool?), string lineSeparator = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (decodeHtmlEntities != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "decodeHtmlEntities", decodeHtmlEntities)); + } + if (lineSeparator != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "lineSeparator", lineSeparator)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailTextLines"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/textLines", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailTextLines", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all emails in all inboxes in paginated form. Email API list all. By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// PageEmailProjection + public PageEmailProjection GetEmailsPaginated(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmailsPaginatedWithHttpInfo(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get all emails in all inboxes in paginated form. Email API list all. By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailProjection + public mailslurp.Client.ApiResponse GetEmailsPaginatedWithHttpInfo(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all emails in all inboxes in paginated form. Email API list all. By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailProjection + public async System.Threading.Tasks.Task GetEmailsPaginatedAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmailsPaginatedWithHttpInfoAsync(inboxId, page, size, sort, unreadOnly, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all emails in all inboxes in paginated form. Email API list all. By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailProjection) + public async System.Threading.Tasks.Task> GetEmailsPaginatedWithHttpInfoAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetEmailsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmailsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// GravatarUrl + public GravatarUrl GetGravatarUrlForEmailAddress(string emailAddress, string size = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetGravatarUrlForEmailAddressWithHttpInfo(emailAddress, size); + return localVarResponse.Data; + } + + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// ApiResponse of GravatarUrl + public mailslurp.Client.ApiResponse GetGravatarUrlForEmailAddressWithHttpInfo(string emailAddress, string size = default(string), int operationIndex = 0) + { + // verify the required parameter 'emailAddress' is set + if (emailAddress == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'emailAddress' when calling EmailControllerApi->GetGravatarUrlForEmailAddress"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetGravatarUrlForEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/gravatarFor", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGravatarUrlForEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GravatarUrl + public async System.Threading.Tasks.Task GetGravatarUrlForEmailAddressAsync(string emailAddress, string size = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetGravatarUrlForEmailAddressWithHttpInfoAsync(emailAddress, size, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get gravatar url for email address + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GravatarUrl) + public async System.Threading.Tasks.Task> GetGravatarUrlForEmailAddressWithHttpInfoAsync(string emailAddress, string size = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'emailAddress' is set + if (emailAddress == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'emailAddress' when calling EmailControllerApi->GetGravatarUrlForEmailAddress"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetGravatarUrlForEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/gravatarFor", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGravatarUrlForEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get latest email in all inboxes. Most recently received. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// Email + public Email GetLatestEmail(List inboxIds = default(List), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetLatestEmailWithHttpInfo(inboxIds); + return localVarResponse.Data; + } + + /// + /// Get latest email in all inboxes. Most recently received. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// ApiResponse of Email + public mailslurp.Client.ApiResponse GetLatestEmailWithHttpInfo(List inboxIds = default(List), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxIds != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "inboxIds", inboxIds)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetLatestEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/latest", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get latest email in all inboxes. Most recently received. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + public async System.Threading.Tasks.Task GetLatestEmailAsync(List inboxIds = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetLatestEmailWithHttpInfoAsync(inboxIds, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get latest email in all inboxes. Most recently received. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + public async System.Threading.Tasks.Task> GetLatestEmailWithHttpInfoAsync(List inboxIds = default(List), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxIds != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "inboxIds", inboxIds)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetLatestEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/latest", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// Email + public Email GetLatestEmailInInbox1(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetLatestEmailInInbox1WithHttpInfo(inboxId); + return localVarResponse.Data; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// ApiResponse of Email + public mailslurp.Client.ApiResponse GetLatestEmailInInbox1WithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + + localVarRequestOptions.Operation = "EmailControllerApi.GetLatestEmailInInbox1"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/latestIn", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestEmailInInbox1", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + public async System.Threading.Tasks.Task GetLatestEmailInInbox1Async(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetLatestEmailInInbox1WithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in all inboxes or in a passed set of inbox IDs + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + public async System.Threading.Tasks.Task> GetLatestEmailInInbox1WithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + + localVarRequestOptions.Operation = "EmailControllerApi.GetLatestEmailInInbox1"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/latestIn", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestEmailInInbox1", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all organization emails. List team or shared test email accounts By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// PageEmailProjection + public PageEmailProjection GetOrganizationEmailsPaginated(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetOrganizationEmailsPaginatedWithHttpInfo(inboxId, page, size, sort, unreadOnly, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get all organization emails. List team or shared test email accounts By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailProjection + public mailslurp.Client.ApiResponse GetOrganizationEmailsPaginatedWithHttpInfo(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetOrganizationEmailsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/organization", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOrganizationEmailsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all organization emails. List team or shared test email accounts By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailProjection + public async System.Threading.Tasks.Task GetOrganizationEmailsPaginatedAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetOrganizationEmailsPaginatedWithHttpInfoAsync(inboxId, page, size, sort, unreadOnly, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all organization emails. List team or shared test email accounts By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) + /// Optional page index in email list pagination (optional, default to 0) + /// Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional search filter search filter for emails. (optional) + /// Optional filter emails received after given date time (optional) + /// Optional filter emails received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailProjection) + public async System.Threading.Tasks.Task> GetOrganizationEmailsPaginatedWithHttpInfoAsync(List inboxId = default(List), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.GetOrganizationEmailsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/organization", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOrganizationEmailsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// string + public string GetRawEmailContents(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetRawEmailContentsWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse GetRawEmailContentsWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetRawEmailContents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/raw", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawEmailContents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task GetRawEmailContentsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetRawEmailContentsWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get raw email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> GetRawEmailContentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetRawEmailContents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/raw", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawEmailContents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// RawEmailJson + public RawEmailJson GetRawEmailJson(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetRawEmailJsonWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of RawEmailJson + public mailslurp.Client.ApiResponse GetRawEmailJsonWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetRawEmailJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/{emailId}/raw/json", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawEmailJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of RawEmailJson + public async System.Threading.Tasks.Task GetRawEmailJsonAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetRawEmailJsonWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (RawEmailJson) + public async System.Threading.Tasks.Task> GetRawEmailJsonWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.GetRawEmailJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/{emailId}/raw/json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawEmailJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get unread email count Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// UnreadCount + public UnreadCount GetUnreadEmailCount(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetUnreadEmailCountWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get unread email count Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of UnreadCount + public mailslurp.Client.ApiResponse GetUnreadEmailCountWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "EmailControllerApi.GetUnreadEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/emails/unreadCount", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUnreadEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get unread email count Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UnreadCount + public async System.Threading.Tasks.Task GetUnreadEmailCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetUnreadEmailCountWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get unread email count Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UnreadCount) + public async System.Threading.Tasks.Task> GetUnreadEmailCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "EmailControllerApi.GetUnreadEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/emails/unreadCount", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUnreadEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Mark an email as read on unread Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// EmailPreview + public EmailPreview MarkAsRead(Guid emailId, bool? read = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = MarkAsReadWithHttpInfo(emailId, read); + return localVarResponse.Data; + } + + /// + /// Mark an email as read on unread Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// ApiResponse of EmailPreview + public mailslurp.Client.ApiResponse MarkAsReadWithHttpInfo(Guid emailId, bool? read = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (read != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "read", read)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.MarkAsRead"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/emails/{emailId}/read", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("MarkAsRead", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Mark an email as read on unread Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreview + public async System.Threading.Tasks.Task MarkAsReadAsync(Guid emailId, bool? read = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await MarkAsReadWithHttpInfoAsync(emailId, read, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Mark an email as read on unread Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + /// + /// Thrown when fails to make API call + /// + /// What value to assign to email read property. Default true. (optional, default to true) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreview) + public async System.Threading.Tasks.Task> MarkAsReadWithHttpInfoAsync(Guid emailId, bool? read = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + if (read != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "read", read)); + } + + localVarRequestOptions.Operation = "EmailControllerApi.MarkAsRead"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/emails/{emailId}/read", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("MarkAsRead", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// SentEmailDto + public SentEmailDto ReplyToEmail(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ReplyToEmailWithHttpInfo(emailId, replyToEmailOptions); + return localVarResponse.Data; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + public mailslurp.Client.ApiResponse ReplyToEmailWithHttpInfo(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'replyToEmailOptions' is set + if (replyToEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'replyToEmailOptions' when calling EmailControllerApi->ReplyToEmail"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = replyToEmailOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.ReplyToEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/emails/{emailId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ReplyToEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + public async System.Threading.Tasks.Task ReplyToEmailAsync(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ReplyToEmailWithHttpInfoAsync(emailId, replyToEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + /// + /// Thrown when fails to make API call + /// ID of the email that should be replied to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + public async System.Threading.Tasks.Task> ReplyToEmailWithHttpInfoAsync(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'replyToEmailOptions' is set + if (replyToEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'replyToEmailOptions' when calling EmailControllerApi->ReplyToEmail"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + localVarRequestOptions.Data = replyToEmailOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.ReplyToEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/emails/{emailId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ReplyToEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// + public void SendEmailSourceOptional(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0) + { + SendEmailSourceOptionalWithHttpInfo(sendEmailOptions, inboxId, useDomainPool, virtualSend); + } + + /// + /// Send email Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse SendEmailSourceOptionalWithHttpInfo(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling EmailControllerApi->SendEmailSourceOptional"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (virtualSend != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualSend", virtualSend)); + } + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.SendEmailSourceOptional"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailSourceOptional", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task SendEmailSourceOptionalAsync(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await SendEmailSourceOptionalWithHttpInfoAsync(sendEmailOptions, inboxId, useDomainPool, virtualSend, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Send email Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + /// + /// Thrown when fails to make API call + /// + /// ID of the inbox you want to send the email from (optional) + /// Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) + /// Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendEmailSourceOptionalWithHttpInfoAsync(SendEmailOptions sendEmailOptions, Guid? inboxId = default(Guid?), bool? useDomainPool = default(bool?), bool? virtualSend = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling EmailControllerApi->SendEmailSourceOptional"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (virtualSend != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualSend", virtualSend)); + } + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "EmailControllerApi.SendEmailSourceOptional"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailSourceOptional", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Validate email HTML contents Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ValidationDto + public ValidationDto ValidateEmail(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ValidateEmailWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Validate email HTML contents Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of ValidationDto + public mailslurp.Client.ApiResponse ValidateEmailWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.ValidateEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/emails/{emailId}/validate", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ValidateEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Validate email HTML contents Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ValidationDto + public async System.Threading.Tasks.Task ValidateEmailAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ValidateEmailWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Validate email HTML contents Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ValidationDto) + public async System.Threading.Tasks.Task> ValidateEmailWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "EmailControllerApi.ValidateEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/emails/{emailId}/validate", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ValidateEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/EmailVerificationControllerApi.cs b/src/mailslurp/Api/EmailVerificationControllerApi.cs new file mode 100644 index 00000000..974d6e3d --- /dev/null +++ b/src/mailslurp/Api/EmailVerificationControllerApi.cs @@ -0,0 +1,650 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IEmailVerificationControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// PageEmailValidationRequest + PageEmailValidationRequest GetValidationRequests(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0); + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailValidationRequest + ApiResponse GetValidationRequestsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0); + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ValidateEmailAddressListResult + ValidateEmailAddressListResult ValidateEmailAddressList(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0); + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ValidateEmailAddressListResult + ApiResponse ValidateEmailAddressListWithHttpInfo(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IEmailVerificationControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailValidationRequest + System.Threading.Tasks.Task GetValidationRequestsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailValidationRequest) + System.Threading.Tasks.Task> GetValidationRequestsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ValidateEmailAddressListResult + System.Threading.Tasks.Task ValidateEmailAddressListAsync(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ValidateEmailAddressListResult) + System.Threading.Tasks.Task> ValidateEmailAddressListWithHttpInfoAsync(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IEmailVerificationControllerApi : IEmailVerificationControllerApiSync, IEmailVerificationControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class EmailVerificationControllerApi : IEmailVerificationControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public EmailVerificationControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public EmailVerificationControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public EmailVerificationControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public EmailVerificationControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// PageEmailValidationRequest + public PageEmailValidationRequest GetValidationRequests(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetValidationRequestsWithHttpInfo(page, size, sort, searchFilter, since, before, isValid); + return localVarResponse.Data; + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailValidationRequest + public mailslurp.Client.ApiResponse GetValidationRequestsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (isValid != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "isValid", isValid)); + } + + localVarRequestOptions.Operation = "EmailVerificationControllerApi.GetValidationRequests"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/email-verification/validation-requests", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetValidationRequests", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailValidationRequest + public async System.Threading.Tasks.Task GetValidationRequestsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetValidationRequestsWithHttpInfoAsync(page, size, sort, searchFilter, since, before, isValid, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter where email is valid is true or false (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailValidationRequest) + public async System.Threading.Tasks.Task> GetValidationRequestsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? isValid = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (isValid != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "isValid", isValid)); + } + + localVarRequestOptions.Operation = "EmailVerificationControllerApi.GetValidationRequests"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/email-verification/validation-requests", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetValidationRequests", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ValidateEmailAddressListResult + public ValidateEmailAddressListResult ValidateEmailAddressList(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ValidateEmailAddressListWithHttpInfo(validateEmailAddressListOptions); + return localVarResponse.Data; + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ValidateEmailAddressListResult + public mailslurp.Client.ApiResponse ValidateEmailAddressListWithHttpInfo(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0) + { + // verify the required parameter 'validateEmailAddressListOptions' is set + if (validateEmailAddressListOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'validateEmailAddressListOptions' when calling EmailVerificationControllerApi->ValidateEmailAddressList"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = validateEmailAddressListOptions; + + localVarRequestOptions.Operation = "EmailVerificationControllerApi.ValidateEmailAddressList"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/email-verification/email-address-list", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ValidateEmailAddressList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ValidateEmailAddressListResult + public async System.Threading.Tasks.Task ValidateEmailAddressListAsync(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ValidateEmailAddressListWithHttpInfoAsync(validateEmailAddressListOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Validate a list of email addresses. Per unit billing. See your plan for pricing. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ValidateEmailAddressListResult) + public async System.Threading.Tasks.Task> ValidateEmailAddressListWithHttpInfoAsync(ValidateEmailAddressListOptions validateEmailAddressListOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'validateEmailAddressListOptions' is set + if (validateEmailAddressListOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'validateEmailAddressListOptions' when calling EmailVerificationControllerApi->ValidateEmailAddressList"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = validateEmailAddressListOptions; + + localVarRequestOptions.Operation = "EmailVerificationControllerApi.ValidateEmailAddressList"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/email-verification/email-address-list", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ValidateEmailAddressList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/ExpiredControllerApi.cs b/src/mailslurp/Api/ExpiredControllerApi.cs new file mode 100644 index 00000000..49578c3f --- /dev/null +++ b/src/mailslurp/Api/ExpiredControllerApi.cs @@ -0,0 +1,980 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IExpiredControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Get default expiration settings + /// + /// + /// Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ExpirationDefaults + ExpirationDefaults GetExpirationDefaults(int operationIndex = 0); + + /// + /// Get default expiration settings + /// + /// + /// Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of ExpirationDefaults + ApiResponse GetExpirationDefaultsWithHttpInfo(int operationIndex = 0); + /// + /// Get expired inbox record for a previously existing inbox + /// + /// + /// Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// ExpiredInboxDto + ExpiredInboxDto GetExpiredInboxByInboxId(Guid inboxId, int operationIndex = 0); + + /// + /// Get expired inbox record for a previously existing inbox + /// + /// + /// Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// ApiResponse of ExpiredInboxDto + ApiResponse GetExpiredInboxByInboxIdWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Get an expired inbox record + /// + /// + /// Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// ExpiredInboxDto + ExpiredInboxDto GetExpiredInboxRecord(Guid expiredId, int operationIndex = 0); + + /// + /// Get an expired inbox record + /// + /// + /// Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// ApiResponse of ExpiredInboxDto + ApiResponse GetExpiredInboxRecordWithHttpInfo(Guid expiredId, int operationIndex = 0); + /// + /// List records of expired inboxes + /// + /// + /// Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageExpiredInboxRecordProjection + PageExpiredInboxRecordProjection GetExpiredInboxes(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List records of expired inboxes + /// + /// + /// Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageExpiredInboxRecordProjection + ApiResponse GetExpiredInboxesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IExpiredControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Get default expiration settings + /// + /// + /// Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExpirationDefaults + System.Threading.Tasks.Task GetExpirationDefaultsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get default expiration settings + /// + /// + /// Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExpirationDefaults) + System.Threading.Tasks.Task> GetExpirationDefaultsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get expired inbox record for a previously existing inbox + /// + /// + /// Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExpiredInboxDto + System.Threading.Tasks.Task GetExpiredInboxByInboxIdAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get expired inbox record for a previously existing inbox + /// + /// + /// Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExpiredInboxDto) + System.Threading.Tasks.Task> GetExpiredInboxByInboxIdWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get an expired inbox record + /// + /// + /// Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExpiredInboxDto + System.Threading.Tasks.Task GetExpiredInboxRecordAsync(Guid expiredId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an expired inbox record + /// + /// + /// Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExpiredInboxDto) + System.Threading.Tasks.Task> GetExpiredInboxRecordWithHttpInfoAsync(Guid expiredId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List records of expired inboxes + /// + /// + /// Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageExpiredInboxRecordProjection + System.Threading.Tasks.Task GetExpiredInboxesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List records of expired inboxes + /// + /// + /// Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageExpiredInboxRecordProjection) + System.Threading.Tasks.Task> GetExpiredInboxesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IExpiredControllerApi : IExpiredControllerApiSync, IExpiredControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ExpiredControllerApi : IExpiredControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ExpiredControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ExpiredControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ExpiredControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public ExpiredControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Get default expiration settings Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ExpirationDefaults + public ExpirationDefaults GetExpirationDefaults(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetExpirationDefaultsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get default expiration settings Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of ExpirationDefaults + public mailslurp.Client.ApiResponse GetExpirationDefaultsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpirationDefaults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/expired/defaults", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpirationDefaults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get default expiration settings Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExpirationDefaults + public async System.Threading.Tasks.Task GetExpirationDefaultsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetExpirationDefaultsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get default expiration settings Return default times used for inbox expiration + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExpirationDefaults) + public async System.Threading.Tasks.Task> GetExpirationDefaultsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpirationDefaults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/expired/defaults", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpirationDefaults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get expired inbox record for a previously existing inbox Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// ExpiredInboxDto + public ExpiredInboxDto GetExpiredInboxByInboxId(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetExpiredInboxByInboxIdWithHttpInfo(inboxId); + return localVarResponse.Data; + } + + /// + /// Get expired inbox record for a previously existing inbox Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// ApiResponse of ExpiredInboxDto + public mailslurp.Client.ApiResponse GetExpiredInboxByInboxIdWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpiredInboxByInboxId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/expired/inbox/{inboxId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpiredInboxByInboxId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get expired inbox record for a previously existing inbox Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExpiredInboxDto + public async System.Threading.Tasks.Task GetExpiredInboxByInboxIdAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetExpiredInboxByInboxIdWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get expired inbox record for a previously existing inbox Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + /// + /// Thrown when fails to make API call + /// ID of inbox you want to retrieve (not the inbox ID) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExpiredInboxDto) + public async System.Threading.Tasks.Task> GetExpiredInboxByInboxIdWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpiredInboxByInboxId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/expired/inbox/{inboxId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpiredInboxByInboxId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an expired inbox record Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// ExpiredInboxDto + public ExpiredInboxDto GetExpiredInboxRecord(Guid expiredId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetExpiredInboxRecordWithHttpInfo(expiredId); + return localVarResponse.Data; + } + + /// + /// Get an expired inbox record Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// ApiResponse of ExpiredInboxDto + public mailslurp.Client.ApiResponse GetExpiredInboxRecordWithHttpInfo(Guid expiredId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("expiredId", mailslurp.Client.ClientUtils.ParameterToString(expiredId)); // path parameter + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpiredInboxRecord"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/expired/{expiredId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpiredInboxRecord", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an expired inbox record Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExpiredInboxDto + public async System.Threading.Tasks.Task GetExpiredInboxRecordAsync(Guid expiredId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetExpiredInboxRecordWithHttpInfoAsync(expiredId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get an expired inbox record Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExpiredInboxDto) + public async System.Threading.Tasks.Task> GetExpiredInboxRecordWithHttpInfoAsync(Guid expiredId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("expiredId", mailslurp.Client.ClientUtils.ParameterToString(expiredId)); // path parameter + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpiredInboxRecord"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/expired/{expiredId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpiredInboxRecord", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List records of expired inboxes Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageExpiredInboxRecordProjection + public PageExpiredInboxRecordProjection GetExpiredInboxes(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetExpiredInboxesWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// List records of expired inboxes Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageExpiredInboxRecordProjection + public mailslurp.Client.ApiResponse GetExpiredInboxesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpiredInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/expired", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpiredInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List records of expired inboxes Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageExpiredInboxRecordProjection + public async System.Threading.Tasks.Task GetExpiredInboxesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetExpiredInboxesWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List records of expired inboxes Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageExpiredInboxRecordProjection) + public async System.Threading.Tasks.Task> GetExpiredInboxesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "ExpiredControllerApi.GetExpiredInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/expired", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExpiredInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/ExportControllerApi.cs b/src/mailslurp/Api/ExportControllerApi.cs new file mode 100644 index 00000000..40bd1bbe --- /dev/null +++ b/src/mailslurp/Api/ExportControllerApi.cs @@ -0,0 +1,722 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IExportControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Export inboxes link callable via browser + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// List<byte[]> + List ExportEntities(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0); + + /// + /// Export inboxes link callable via browser + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of List<byte[]> + ApiResponse> ExportEntitiesWithHttpInfo(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0); + /// + /// Get export link + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// ExportLink + ExportLink GetExportLink(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0); + + /// + /// Get export link + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// ApiResponse of ExportLink + ApiResponse GetExportLinkWithHttpInfo(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IExportControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Export inboxes link callable via browser + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<byte[]> + System.Threading.Tasks.Task> ExportEntitiesAsync(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Export inboxes link callable via browser + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<byte[]>) + System.Threading.Tasks.Task>> ExportEntitiesWithHttpInfoAsync(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get export link + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExportLink + System.Threading.Tasks.Task GetExportLinkAsync(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get export link + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExportLink) + System.Threading.Tasks.Task> GetExportLinkWithHttpInfoAsync(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IExportControllerApi : IExportControllerApiSync, IExportControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ExportControllerApi : IExportControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ExportControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ExportControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ExportControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public ExportControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Export inboxes link callable via browser + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// List<byte[]> + public List ExportEntities(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = ExportEntitiesWithHttpInfo(exportType, apiKey, outputFormat, filter, listSeparatorToken, excludePreviouslyExported, createdEarliestTime, createdOldestTime); + return localVarResponse.Data; + } + + /// + /// Export inboxes link callable via browser + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of List<byte[]> + public mailslurp.Client.ApiResponse> ExportEntitiesWithHttpInfo(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0) + { + // verify the required parameter 'exportType' is set + if (exportType == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'exportType' when calling ExportControllerApi->ExportEntities"); + } + + // verify the required parameter 'apiKey' is set + if (apiKey == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'apiKey' when calling ExportControllerApi->ExportEntities"); + } + + // verify the required parameter 'outputFormat' is set + if (outputFormat == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'outputFormat' when calling ExportControllerApi->ExportEntities"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "exportType", exportType)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "apiKey", apiKey)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "outputFormat", outputFormat)); + if (filter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "filter", filter)); + } + if (listSeparatorToken != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "listSeparatorToken", listSeparatorToken)); + } + if (excludePreviouslyExported != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "excludePreviouslyExported", excludePreviouslyExported)); + } + if (createdEarliestTime != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "createdEarliestTime", createdEarliestTime)); + } + if (createdOldestTime != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "createdOldestTime", createdOldestTime)); + } + + localVarRequestOptions.Operation = "ExportControllerApi.ExportEntities"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/export", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ExportEntities", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Export inboxes link callable via browser + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<byte[]> + public async System.Threading.Tasks.Task> ExportEntitiesAsync(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await ExportEntitiesWithHttpInfoAsync(exportType, apiKey, outputFormat, filter, listSeparatorToken, excludePreviouslyExported, createdEarliestTime, createdOldestTime, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Export inboxes link callable via browser + /// + /// Thrown when fails to make API call + /// + /// + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<byte[]>) + public async System.Threading.Tasks.Task>> ExportEntitiesWithHttpInfoAsync(string exportType, string apiKey, string outputFormat, string filter = default(string), string listSeparatorToken = default(string), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'exportType' is set + if (exportType == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'exportType' when calling ExportControllerApi->ExportEntities"); + } + + // verify the required parameter 'apiKey' is set + if (apiKey == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'apiKey' when calling ExportControllerApi->ExportEntities"); + } + + // verify the required parameter 'outputFormat' is set + if (outputFormat == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'outputFormat' when calling ExportControllerApi->ExportEntities"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "exportType", exportType)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "apiKey", apiKey)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "outputFormat", outputFormat)); + if (filter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "filter", filter)); + } + if (listSeparatorToken != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "listSeparatorToken", listSeparatorToken)); + } + if (excludePreviouslyExported != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "excludePreviouslyExported", excludePreviouslyExported)); + } + if (createdEarliestTime != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "createdEarliestTime", createdEarliestTime)); + } + if (createdOldestTime != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "createdOldestTime", createdOldestTime)); + } + + localVarRequestOptions.Operation = "ExportControllerApi.ExportEntities"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/export", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ExportEntities", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get export link + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// ExportLink + public ExportLink GetExportLink(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetExportLinkWithHttpInfo(exportType, exportOptions, apiKey); + return localVarResponse.Data; + } + + /// + /// Get export link + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// ApiResponse of ExportLink + public mailslurp.Client.ApiResponse GetExportLinkWithHttpInfo(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0) + { + // verify the required parameter 'exportType' is set + if (exportType == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'exportType' when calling ExportControllerApi->GetExportLink"); + } + + // verify the required parameter 'exportOptions' is set + if (exportOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'exportOptions' when calling ExportControllerApi->GetExportLink"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "exportType", exportType)); + if (apiKey != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "apiKey", apiKey)); + } + localVarRequestOptions.Data = exportOptions; + + localVarRequestOptions.Operation = "ExportControllerApi.GetExportLink"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/export", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExportLink", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get export link + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExportLink + public async System.Threading.Tasks.Task GetExportLinkAsync(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetExportLinkWithHttpInfoAsync(exportType, exportOptions, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get export link + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExportLink) + public async System.Threading.Tasks.Task> GetExportLinkWithHttpInfoAsync(string exportType, ExportOptions exportOptions, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'exportType' is set + if (exportType == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'exportType' when calling ExportControllerApi->GetExportLink"); + } + + // verify the required parameter 'exportOptions' is set + if (exportOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'exportOptions' when calling ExportControllerApi->GetExportLink"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "exportType", exportType)); + if (apiKey != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "apiKey", apiKey)); + } + localVarRequestOptions.Data = exportOptions; + + localVarRequestOptions.Operation = "ExportControllerApi.GetExportLink"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/export", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetExportLink", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/FormControllerApi.cs b/src/mailslurp/Api/FormControllerApi.cs new file mode 100644 index 00000000..2f8d9dae --- /dev/null +++ b/src/mailslurp/Api/FormControllerApi.cs @@ -0,0 +1,451 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFormControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields + /// + /// + /// This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// string + string SubmitForm(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0); + + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields + /// + /// + /// This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse SubmitFormWithHttpInfo(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFormControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields + /// + /// + /// This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task SubmitFormAsync(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields + /// + /// + /// This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> SubmitFormWithHttpInfoAsync(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFormControllerApi : IFormControllerApiSync, IFormControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class FormControllerApi : IFormControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public FormControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public FormControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public FormControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public FormControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// string + public string SubmitForm(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = SubmitFormWithHttpInfo(to, subject, redirectTo, emailAddress, successMessage, spamCheck, otherParameters); + return localVarResponse.Data; + } + + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse SubmitFormWithHttpInfo(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (to != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_to", to)); + } + if (subject != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_subject", subject)); + } + if (redirectTo != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_redirectTo", redirectTo)); + } + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_emailAddress", emailAddress)); + } + if (successMessage != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_successMessage", successMessage)); + } + if (spamCheck != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_spamCheck", spamCheck)); + } + if (otherParameters != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "otherParameters", otherParameters)); + } + + localVarRequestOptions.Operation = "FormControllerApi.SubmitForm"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/forms", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SubmitForm", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task SubmitFormAsync(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await SubmitFormWithHttpInfoAsync(to, subject, redirectTo, emailAddress, successMessage, spamCheck, otherParameters, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Submit a form to be parsed and sent as an email to an address determined by the form fields This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://csharp.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://csharp.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`. + /// + /// Thrown when fails to make API call + /// The email address that submitted form should be sent to. (optional) + /// Optional subject of the email that will be sent. (optional) + /// Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) + /// Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) + /// Optional success message to display if no _redirectTo present. (optional) + /// Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) + /// All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> SubmitFormWithHttpInfoAsync(string to = default(string), string subject = default(string), string redirectTo = default(string), string emailAddress = default(string), string successMessage = default(string), string spamCheck = default(string), string otherParameters = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (to != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_to", to)); + } + if (subject != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_subject", subject)); + } + if (redirectTo != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_redirectTo", redirectTo)); + } + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_emailAddress", emailAddress)); + } + if (successMessage != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_successMessage", successMessage)); + } + if (spamCheck != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "_spamCheck", spamCheck)); + } + if (otherParameters != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "otherParameters", otherParameters)); + } + + localVarRequestOptions.Operation = "FormControllerApi.SubmitForm"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/forms", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SubmitForm", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/GroupControllerApi.cs b/src/mailslurp/Api/GroupControllerApi.cs new file mode 100644 index 00000000..cbd0b2b7 --- /dev/null +++ b/src/mailslurp/Api/GroupControllerApi.cs @@ -0,0 +1,2044 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Add contacts to a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// GroupContactsDto + GroupContactsDto AddContactsToGroup(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0); + + /// + /// Add contacts to a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of GroupContactsDto + ApiResponse AddContactsToGroupWithHttpInfo(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0); + /// + /// Create a group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// GroupDto + GroupDto CreateGroup(CreateGroupOptions createGroupOptions, int operationIndex = 0); + + /// + /// Create a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of GroupDto + ApiResponse CreateGroupWithHttpInfo(CreateGroupOptions createGroupOptions, int operationIndex = 0); + /// + /// Delete group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteGroup(Guid groupId, int operationIndex = 0); + + /// + /// Delete group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteGroupWithHttpInfo(Guid groupId, int operationIndex = 0); + /// + /// Get all Contact Groups in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageGroupProjection + PageGroupProjection GetAllGroups(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all Contact Groups in paginated format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageGroupProjection + ApiResponse GetAllGroupsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// GroupDto + GroupDto GetGroup(Guid groupId, int operationIndex = 0); + + /// + /// Get group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of GroupDto + ApiResponse GetGroupWithHttpInfo(Guid groupId, int operationIndex = 0); + /// + /// Get group and contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// GroupContactsDto + GroupContactsDto GetGroupWithContacts(Guid groupId, int operationIndex = 0); + + /// + /// Get group and contacts belonging to it + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of GroupContactsDto + ApiResponse GetGroupWithContactsWithHttpInfo(Guid groupId, int operationIndex = 0); + /// + /// + /// + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageContactProjection + PageContactProjection GetGroupWithContactsPaginated(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageContactProjection + ApiResponse GetGroupWithContactsPaginatedWithHttpInfo(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get all groups + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<GroupProjection> + List GetGroups(int operationIndex = 0); + + /// + /// Get all groups + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<GroupProjection> + ApiResponse> GetGroupsWithHttpInfo(int operationIndex = 0); + /// + /// Remove contacts from a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// GroupContactsDto + GroupContactsDto RemoveContactsFromGroup(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0); + + /// + /// Remove contacts from a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of GroupContactsDto + ApiResponse RemoveContactsFromGroupWithHttpInfo(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Add contacts to a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupContactsDto + System.Threading.Tasks.Task AddContactsToGroupAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Add contacts to a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupContactsDto) + System.Threading.Tasks.Task> AddContactsToGroupWithHttpInfoAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupDto + System.Threading.Tasks.Task CreateGroupAsync(CreateGroupOptions createGroupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupDto) + System.Threading.Tasks.Task> CreateGroupWithHttpInfoAsync(CreateGroupOptions createGroupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteGroupAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteGroupWithHttpInfoAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all Contact Groups in paginated format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageGroupProjection + System.Threading.Tasks.Task GetAllGroupsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all Contact Groups in paginated format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageGroupProjection) + System.Threading.Tasks.Task> GetAllGroupsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupDto + System.Threading.Tasks.Task GetGroupAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupDto) + System.Threading.Tasks.Task> GetGroupWithHttpInfoAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get group and contacts belonging to it + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupContactsDto + System.Threading.Tasks.Task GetGroupWithContactsAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get group and contacts belonging to it + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupContactsDto) + System.Threading.Tasks.Task> GetGroupWithContactsWithHttpInfoAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageContactProjection + System.Threading.Tasks.Task GetGroupWithContactsPaginatedAsync(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageContactProjection) + System.Threading.Tasks.Task> GetGroupWithContactsPaginatedWithHttpInfoAsync(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all groups + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<GroupProjection> + System.Threading.Tasks.Task> GetGroupsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all groups + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupProjection>) + System.Threading.Tasks.Task>> GetGroupsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Remove contacts from a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupContactsDto + System.Threading.Tasks.Task RemoveContactsFromGroupAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Remove contacts from a group + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupContactsDto) + System.Threading.Tasks.Task> RemoveContactsFromGroupWithHttpInfoAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupControllerApi : IGroupControllerApiSync, IGroupControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class GroupControllerApi : IGroupControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public GroupControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public GroupControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public GroupControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public GroupControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Add contacts to a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// GroupContactsDto + public GroupContactsDto AddContactsToGroup(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = AddContactsToGroupWithHttpInfo(groupId, updateGroupContacts); + return localVarResponse.Data; + } + + /// + /// Add contacts to a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of GroupContactsDto + public mailslurp.Client.ApiResponse AddContactsToGroupWithHttpInfo(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0) + { + // verify the required parameter 'updateGroupContacts' is set + if (updateGroupContacts == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateGroupContacts' when calling GroupControllerApi->AddContactsToGroup"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = updateGroupContacts; + + localVarRequestOptions.Operation = "GroupControllerApi.AddContactsToGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/groups/{groupId}/contacts", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddContactsToGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Add contacts to a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupContactsDto + public async System.Threading.Tasks.Task AddContactsToGroupAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await AddContactsToGroupWithHttpInfoAsync(groupId, updateGroupContacts, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Add contacts to a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupContactsDto) + public async System.Threading.Tasks.Task> AddContactsToGroupWithHttpInfoAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'updateGroupContacts' is set + if (updateGroupContacts == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateGroupContacts' when calling GroupControllerApi->AddContactsToGroup"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = updateGroupContacts; + + localVarRequestOptions.Operation = "GroupControllerApi.AddContactsToGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/groups/{groupId}/contacts", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddContactsToGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create a group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// GroupDto + public GroupDto CreateGroup(CreateGroupOptions createGroupOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateGroupWithHttpInfo(createGroupOptions); + return localVarResponse.Data; + } + + /// + /// Create a group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of GroupDto + public mailslurp.Client.ApiResponse CreateGroupWithHttpInfo(CreateGroupOptions createGroupOptions, int operationIndex = 0) + { + // verify the required parameter 'createGroupOptions' is set + if (createGroupOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createGroupOptions' when calling GroupControllerApi->CreateGroup"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createGroupOptions; + + localVarRequestOptions.Operation = "GroupControllerApi.CreateGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create a group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupDto + public async System.Threading.Tasks.Task CreateGroupAsync(CreateGroupOptions createGroupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateGroupWithHttpInfoAsync(createGroupOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create a group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupDto) + public async System.Threading.Tasks.Task> CreateGroupWithHttpInfoAsync(CreateGroupOptions createGroupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createGroupOptions' is set + if (createGroupOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createGroupOptions' when calling GroupControllerApi->CreateGroup"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createGroupOptions; + + localVarRequestOptions.Operation = "GroupControllerApi.CreateGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteGroup(Guid groupId, int operationIndex = 0) + { + DeleteGroupWithHttpInfo(groupId); + } + + /// + /// Delete group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteGroupWithHttpInfo(Guid groupId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + localVarRequestOptions.Operation = "GroupControllerApi.DeleteGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteGroupAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteGroupWithHttpInfoAsync(groupId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteGroupWithHttpInfoAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + localVarRequestOptions.Operation = "GroupControllerApi.DeleteGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all Contact Groups in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageGroupProjection + public PageGroupProjection GetAllGroups(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllGroupsWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all Contact Groups in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageGroupProjection + public mailslurp.Client.ApiResponse GetAllGroupsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "GroupControllerApi.GetAllGroups"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllGroups", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all Contact Groups in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageGroupProjection + public async System.Threading.Tasks.Task GetAllGroupsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllGroupsWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all Contact Groups in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageGroupProjection) + public async System.Threading.Tasks.Task> GetAllGroupsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "GroupControllerApi.GetAllGroups"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllGroups", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// GroupDto + public GroupDto GetGroup(Guid groupId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetGroupWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Get group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of GroupDto + public mailslurp.Client.ApiResponse GetGroupWithHttpInfo(Guid groupId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/{groupId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupDto + public async System.Threading.Tasks.Task GetGroupAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetGroupWithHttpInfoAsync(groupId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get group + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupDto) + public async System.Threading.Tasks.Task> GetGroupWithHttpInfoAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/{groupId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get group and contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// GroupContactsDto + public GroupContactsDto GetGroupWithContacts(Guid groupId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetGroupWithContactsWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Get group and contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of GroupContactsDto + public mailslurp.Client.ApiResponse GetGroupWithContactsWithHttpInfo(Guid groupId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroupWithContacts"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/{groupId}/contacts", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupWithContacts", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get group and contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupContactsDto + public async System.Threading.Tasks.Task GetGroupWithContactsAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetGroupWithContactsWithHttpInfoAsync(groupId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get group and contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupContactsDto) + public async System.Threading.Tasks.Task> GetGroupWithContactsWithHttpInfoAsync(Guid groupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroupWithContacts"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/{groupId}/contacts", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupWithContacts", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageContactProjection + public PageContactProjection GetGroupWithContactsPaginated(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetGroupWithContactsPaginatedWithHttpInfo(groupId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageContactProjection + public mailslurp.Client.ApiResponse GetGroupWithContactsPaginatedWithHttpInfo(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroupWithContactsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/{groupId}/contacts-paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupWithContactsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageContactProjection + public async System.Threading.Tasks.Task GetGroupWithContactsPaginatedAsync(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetGroupWithContactsPaginatedWithHttpInfoAsync(groupId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get group and paginated contacts belonging to it + /// + /// Thrown when fails to make API call + /// + /// Optional page index in group contact pagination (optional, default to 0) + /// Optional page size in group contact pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageContactProjection) + public async System.Threading.Tasks.Task> GetGroupWithContactsPaginatedWithHttpInfoAsync(Guid groupId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroupWithContactsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/{groupId}/contacts-paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupWithContactsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all groups + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<GroupProjection> + public List GetGroups(int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetGroupsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get all groups + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<GroupProjection> + public mailslurp.Client.ApiResponse> GetGroupsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroups"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroups", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all groups + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<GroupProjection> + public async System.Threading.Tasks.Task> GetGroupsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetGroupsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all groups + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupProjection>) + public async System.Threading.Tasks.Task>> GetGroupsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "GroupControllerApi.GetGroups"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroups", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Remove contacts from a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// GroupContactsDto + public GroupContactsDto RemoveContactsFromGroup(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = RemoveContactsFromGroupWithHttpInfo(groupId, updateGroupContacts); + return localVarResponse.Data; + } + + /// + /// Remove contacts from a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of GroupContactsDto + public mailslurp.Client.ApiResponse RemoveContactsFromGroupWithHttpInfo(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0) + { + // verify the required parameter 'updateGroupContacts' is set + if (updateGroupContacts == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateGroupContacts' when calling GroupControllerApi->RemoveContactsFromGroup"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = updateGroupContacts; + + localVarRequestOptions.Operation = "GroupControllerApi.RemoveContactsFromGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/contacts", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RemoveContactsFromGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Remove contacts from a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of GroupContactsDto + public async System.Threading.Tasks.Task RemoveContactsFromGroupAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await RemoveContactsFromGroupWithHttpInfoAsync(groupId, updateGroupContacts, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Remove contacts from a group + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupContactsDto) + public async System.Threading.Tasks.Task> RemoveContactsFromGroupWithHttpInfoAsync(Guid groupId, UpdateGroupContacts updateGroupContacts, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'updateGroupContacts' is set + if (updateGroupContacts == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateGroupContacts' when calling GroupControllerApi->RemoveContactsFromGroup"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("groupId", mailslurp.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = updateGroupContacts; + + localVarRequestOptions.Operation = "GroupControllerApi.RemoveContactsFromGroup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/contacts", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RemoveContactsFromGroup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/InboxControllerApi.cs b/src/mailslurp/Api/InboxControllerApi.cs new file mode 100644 index 00000000..dfe43f2b --- /dev/null +++ b/src/mailslurp/Api/InboxControllerApi.cs @@ -0,0 +1,9063 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Cancel a scheduled email job + /// + /// + /// Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ScheduledJobDto + ScheduledJobDto CancelScheduledJob(Guid jobId, int operationIndex = 0); + + /// + /// Cancel a scheduled email job + /// + /// + /// Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ScheduledJobDto + ApiResponse CancelScheduledJobWithHttpInfo(Guid jobId, int operationIndex = 0); + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + /// + /// + /// Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// InboxDto + InboxDto CreateInbox(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0); + + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + /// + /// + /// Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse CreateInboxWithHttpInfo(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0); + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// InboxRulesetDto + InboxRulesetDto CreateInboxRuleset(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0); + + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetDto + ApiResponse CreateInboxRulesetWithHttpInfo(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0); + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// InboxDto + InboxDto CreateInboxWithDefaults(int operationIndex = 0); + + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse CreateInboxWithDefaultsWithHttpInfo(int operationIndex = 0); + /// + /// Create an inbox with options. Extended options for inbox creation. + /// + /// + /// Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxDto + InboxDto CreateInboxWithOptions(CreateInboxDto createInboxDto, int operationIndex = 0); + + /// + /// Create an inbox with options. Extended options for inbox creation. + /// + /// + /// Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse CreateInboxWithOptionsWithHttpInfo(CreateInboxDto createInboxDto, int operationIndex = 0); + /// + /// Delete all emails in a given inboxes. + /// + /// + /// Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteAllInboxEmails(Guid inboxId, int operationIndex = 0); + + /// + /// Delete all emails in a given inboxes. + /// + /// + /// Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAllInboxEmailsWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Delete all inboxes + /// + /// + /// Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + void DeleteAllInboxes(int operationIndex = 0); + + /// + /// Delete all inboxes + /// + /// + /// Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAllInboxesWithHttpInfo(int operationIndex = 0); + /// + /// Delete inbox + /// + /// + /// Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteInbox(Guid inboxId, int operationIndex = 0); + + /// + /// Delete inbox + /// + /// + /// Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteInboxWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Does inbox exist + /// + /// + /// Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// InboxExistsDto + InboxExistsDto DoesInboxExist(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0); + + /// + /// Does inbox exist + /// + /// + /// Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// ApiResponse of InboxExistsDto + ApiResponse DoesInboxExistWithHttpInfo(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0); + /// + /// Remove expired inboxes + /// + /// + /// Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// FlushExpiredInboxesResult + FlushExpiredInboxesResult FlushExpired(DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Remove expired inboxes + /// + /// + /// Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// ApiResponse of FlushExpiredInboxesResult + ApiResponse FlushExpiredWithHttpInfo(DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// List All Inboxes Paginated + /// + /// + /// List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// PageInboxProjection + PageInboxProjection GetAllInboxes(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0); + + /// + /// List All Inboxes Paginated + /// + /// + /// List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxProjection + ApiResponse GetAllInboxesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0); + /// + /// Get all scheduled email sending jobs for account + /// + /// + /// Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageScheduledJobs + PageScheduledJobs GetAllScheduledJobs(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all scheduled email sending jobs for account + /// + /// + /// Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageScheduledJobs + ApiResponse GetAllScheduledJobsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageDeliveryStatus + PageDeliveryStatus GetDeliveryStatusesByInboxId(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageDeliveryStatus + ApiResponse GetDeliveryStatusesByInboxIdWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + /// + /// + /// List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// List<EmailPreview> + List GetEmails(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0); + + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + /// + /// + /// List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + ApiResponse> GetEmailsWithHttpInfo(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// ImapSmtpAccessDetails + ImapSmtpAccessDetails GetImapSmtpAccess(Guid? inboxId = default(Guid?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// ApiResponse of ImapSmtpAccessDetails + ApiResponse GetImapSmtpAccessWithHttpInfo(Guid? inboxId = default(Guid?), int operationIndex = 0); + /// + /// Get Inbox. Returns properties of an inbox. + /// + /// + /// Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxDto + InboxDto GetInbox(Guid inboxId, int operationIndex = 0); + + /// + /// Get Inbox. Returns properties of an inbox. + /// + /// + /// Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse GetInboxWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Search for an inbox with the provided email address + /// + /// + /// Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxByEmailAddressResult + InboxByEmailAddressResult GetInboxByEmailAddress(string emailAddress, int operationIndex = 0); + + /// + /// Search for an inbox with the provided email address + /// + /// + /// Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxByEmailAddressResult + ApiResponse GetInboxByEmailAddressWithHttpInfo(string emailAddress, int operationIndex = 0); + /// + /// Search for an inbox with the given name + /// + /// + /// Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxByNameResult + InboxByNameResult GetInboxByName(string name, int operationIndex = 0); + + /// + /// Search for an inbox with the given name + /// + /// + /// Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxByNameResult + ApiResponse GetInboxByNameWithHttpInfo(string name, int operationIndex = 0); + /// + /// Get total inbox count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// CountDto + CountDto GetInboxCount(int operationIndex = 0); + + /// + /// Get total inbox count + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of CountDto + ApiResponse GetInboxCountWithHttpInfo(int operationIndex = 0); + /// + /// Get email count in inbox + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// CountDto + CountDto GetInboxEmailCount(Guid inboxId, int operationIndex = 0); + + /// + /// Get email count in inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// ApiResponse of CountDto + ApiResponse GetInboxEmailCountWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Get inbox emails paginated + /// + /// + /// Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// PageEmailPreview + PageEmailPreview GetInboxEmailsPaginated(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get inbox emails paginated + /// + /// + /// Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailPreview + ApiResponse GetInboxEmailsPaginatedWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get all inbox IDs + /// + /// + /// Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// InboxIdsResult + InboxIdsResult GetInboxIds(int operationIndex = 0); + + /// + /// Get all inbox IDs + /// + /// + /// Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of InboxIdsResult + ApiResponse GetInboxIdsWithHttpInfo(int operationIndex = 0); + /// + /// Get Inbox Sent Emails + /// + /// + /// Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// PageSentEmailProjection + PageSentEmailProjection GetInboxSentEmails(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get Inbox Sent Emails + /// + /// + /// Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailProjection + ApiResponse GetInboxSentEmailsWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get inbox tags + /// + /// + /// Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<string> + List GetInboxTags(int operationIndex = 0); + + /// + /// Get inbox tags + /// + /// + /// Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<string> + ApiResponse> GetInboxTagsWithHttpInfo(int operationIndex = 0); + /// + /// List Inboxes and email addresses + /// + /// + /// List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// List<InboxDto> + [Obsolete] + List GetInboxes(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List Inboxes and email addresses + /// + /// + /// List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of List<InboxDto> + [Obsolete] + ApiResponse> GetInboxesWithHttpInfo(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// Email + Email GetLatestEmailInInbox(Guid inboxId, long timeoutMillis, int operationIndex = 0); + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// ApiResponse of Email + ApiResponse GetLatestEmailInInboxWithHttpInfo(Guid inboxId, long timeoutMillis, int operationIndex = 0); + /// + /// List Organization Inboxes Paginated + /// + /// + /// List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// PageOrganizationInboxProjection + PageOrganizationInboxProjection GetOrganizationInboxes(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List Organization Inboxes Paginated + /// + /// + /// List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageOrganizationInboxProjection + ApiResponse GetOrganizationInboxesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get a scheduled email job + /// + /// + /// Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ScheduledJobDto + ScheduledJobDto GetScheduledJob(Guid jobId, int operationIndex = 0); + + /// + /// Get a scheduled email job + /// + /// + /// Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ScheduledJobDto + ApiResponse GetScheduledJobWithHttpInfo(Guid jobId, int operationIndex = 0); + /// + /// Get all scheduled email sending jobs for the inbox + /// + /// + /// Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageScheduledJobs + PageScheduledJobs GetScheduledJobsByInboxId(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all scheduled email sending jobs for the inbox + /// + /// + /// Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageScheduledJobs + ApiResponse GetScheduledJobsByInboxIdWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// PageInboxRulesetDto + PageInboxRulesetDto ListInboxRulesets(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxRulesetDto + ApiResponse ListInboxRulesetsWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// List inbox tracking pixels + /// + /// + /// List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + PageTrackingPixelProjection ListInboxTrackingPixels(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List inbox tracking pixels + /// + /// + /// List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + ApiResponse ListInboxTrackingPixelsWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Send Email + /// + /// + /// Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// + void SendEmail(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0); + + /// + /// Send Email + /// + /// + /// Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse SendEmailWithHttpInfo(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0); + /// + /// Send email and return sent confirmation + /// + /// + /// Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// SentEmailDto + SentEmailDto SendEmailAndConfirm(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0); + + /// + /// Send email and return sent confirmation + /// + /// + /// Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + ApiResponse SendEmailAndConfirmWithHttpInfo(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0); + /// + /// Send email with queue + /// + /// + /// Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// + void SendEmailWithQueue(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0); + + /// + /// Send email with queue + /// + /// + /// Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse SendEmailWithQueueWithHttpInfo(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0); + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation + /// + /// + /// Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// SentEmailDto + SentEmailDto SendSmtpEnvelope(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0); + + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation + /// + /// + /// Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + ApiResponse SendSmtpEnvelopeWithHttpInfo(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0); + /// + /// Send a test email to inbox + /// + /// + /// Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void SendTestEmail(Guid inboxId, int operationIndex = 0); + + /// + /// Send a test email to inbox + /// + /// + /// Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse SendTestEmailWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Send email with with delay or schedule + /// + /// + /// Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// ScheduledJobDto + ScheduledJobDto SendWithSchedule(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0); + + /// + /// Send email with with delay or schedule + /// + /// + /// Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// ApiResponse of ScheduledJobDto + ApiResponse SendWithScheduleWithHttpInfo(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0); + /// + /// Set inbox favourited state + /// + /// + /// Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// InboxDto + InboxDto SetInboxFavourited(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0); + + /// + /// Set inbox favourited state + /// + /// + /// Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse SetInboxFavouritedWithHttpInfo(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0); + /// + /// Update Inbox. Change name and description. Email address is not editable. + /// + /// + /// Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// InboxDto + InboxDto UpdateInbox(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0); + + /// + /// Update Inbox. Change name and description. Email address is not editable. + /// + /// + /// Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + ApiResponse UpdateInboxWithHttpInfo(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Cancel a scheduled email job + /// + /// + /// Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ScheduledJobDto + System.Threading.Tasks.Task CancelScheduledJobAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Cancel a scheduled email job + /// + /// + /// Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ScheduledJobDto) + System.Threading.Tasks.Task> CancelScheduledJobWithHttpInfoAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + /// + /// + /// Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task CreateInboxAsync(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + /// + /// + /// Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> CreateInboxWithHttpInfoAsync(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetDto + System.Threading.Tasks.Task CreateInboxRulesetAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetDto) + System.Threading.Tasks.Task> CreateInboxRulesetWithHttpInfoAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task CreateInboxWithDefaultsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> CreateInboxWithDefaultsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create an inbox with options. Extended options for inbox creation. + /// + /// + /// Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task CreateInboxWithOptionsAsync(CreateInboxDto createInboxDto, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create an inbox with options. Extended options for inbox creation. + /// + /// + /// Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> CreateInboxWithOptionsWithHttpInfoAsync(CreateInboxDto createInboxDto, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete all emails in a given inboxes. + /// + /// + /// Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAllInboxEmailsAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all emails in a given inboxes. + /// + /// + /// Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAllInboxEmailsWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete all inboxes + /// + /// + /// Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAllInboxesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all inboxes + /// + /// + /// Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAllInboxesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete inbox + /// + /// + /// Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteInboxAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete inbox + /// + /// + /// Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteInboxWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Does inbox exist + /// + /// + /// Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxExistsDto + System.Threading.Tasks.Task DoesInboxExistAsync(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Does inbox exist + /// + /// + /// Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxExistsDto) + System.Threading.Tasks.Task> DoesInboxExistWithHttpInfoAsync(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Remove expired inboxes + /// + /// + /// Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FlushExpiredInboxesResult + System.Threading.Tasks.Task FlushExpiredAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Remove expired inboxes + /// + /// + /// Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FlushExpiredInboxesResult) + System.Threading.Tasks.Task> FlushExpiredWithHttpInfoAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List All Inboxes Paginated + /// + /// + /// List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxProjection + System.Threading.Tasks.Task GetAllInboxesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List All Inboxes Paginated + /// + /// + /// List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxProjection) + System.Threading.Tasks.Task> GetAllInboxesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all scheduled email sending jobs for account + /// + /// + /// Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageScheduledJobs + System.Threading.Tasks.Task GetAllScheduledJobsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all scheduled email sending jobs for account + /// + /// + /// Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageScheduledJobs) + System.Threading.Tasks.Task> GetAllScheduledJobsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageDeliveryStatus + System.Threading.Tasks.Task GetDeliveryStatusesByInboxIdAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageDeliveryStatus) + System.Threading.Tasks.Task> GetDeliveryStatusesByInboxIdWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + /// + /// + /// List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + System.Threading.Tasks.Task> GetEmailsAsync(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + /// + /// + /// List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + System.Threading.Tasks.Task>> GetEmailsWithHttpInfoAsync(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ImapSmtpAccessDetails + System.Threading.Tasks.Task GetImapSmtpAccessAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ImapSmtpAccessDetails) + System.Threading.Tasks.Task> GetImapSmtpAccessWithHttpInfoAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Inbox. Returns properties of an inbox. + /// + /// + /// Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task GetInboxAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Inbox. Returns properties of an inbox. + /// + /// + /// Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> GetInboxWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Search for an inbox with the provided email address + /// + /// + /// Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxByEmailAddressResult + System.Threading.Tasks.Task GetInboxByEmailAddressAsync(string emailAddress, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Search for an inbox with the provided email address + /// + /// + /// Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxByEmailAddressResult) + System.Threading.Tasks.Task> GetInboxByEmailAddressWithHttpInfoAsync(string emailAddress, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Search for an inbox with the given name + /// + /// + /// Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxByNameResult + System.Threading.Tasks.Task GetInboxByNameAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Search for an inbox with the given name + /// + /// + /// Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxByNameResult) + System.Threading.Tasks.Task> GetInboxByNameWithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get total inbox count + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CountDto + System.Threading.Tasks.Task GetInboxCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get total inbox count + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CountDto) + System.Threading.Tasks.Task> GetInboxCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get email count in inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CountDto + System.Threading.Tasks.Task GetInboxEmailCountAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get email count in inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CountDto) + System.Threading.Tasks.Task> GetInboxEmailCountWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get inbox emails paginated + /// + /// + /// Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailPreview + System.Threading.Tasks.Task GetInboxEmailsPaginatedAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get inbox emails paginated + /// + /// + /// Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailPreview) + System.Threading.Tasks.Task> GetInboxEmailsPaginatedWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all inbox IDs + /// + /// + /// Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxIdsResult + System.Threading.Tasks.Task GetInboxIdsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all inbox IDs + /// + /// + /// Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxIdsResult) + System.Threading.Tasks.Task> GetInboxIdsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Inbox Sent Emails + /// + /// + /// Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailProjection + System.Threading.Tasks.Task GetInboxSentEmailsAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Inbox Sent Emails + /// + /// + /// Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailProjection) + System.Threading.Tasks.Task> GetInboxSentEmailsWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get inbox tags + /// + /// + /// Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + System.Threading.Tasks.Task> GetInboxTagsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get inbox tags + /// + /// + /// Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> GetInboxTagsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List Inboxes and email addresses + /// + /// + /// List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<InboxDto> + [Obsolete] + System.Threading.Tasks.Task> GetInboxesAsync(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List Inboxes and email addresses + /// + /// + /// List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<InboxDto>) + [Obsolete] + System.Threading.Tasks.Task>> GetInboxesWithHttpInfoAsync(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + System.Threading.Tasks.Task GetLatestEmailInInboxAsync(Guid inboxId, long timeoutMillis, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + /// + /// + /// Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + System.Threading.Tasks.Task> GetLatestEmailInInboxWithHttpInfoAsync(Guid inboxId, long timeoutMillis, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List Organization Inboxes Paginated + /// + /// + /// List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageOrganizationInboxProjection + System.Threading.Tasks.Task GetOrganizationInboxesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List Organization Inboxes Paginated + /// + /// + /// List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageOrganizationInboxProjection) + System.Threading.Tasks.Task> GetOrganizationInboxesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a scheduled email job + /// + /// + /// Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ScheduledJobDto + System.Threading.Tasks.Task GetScheduledJobAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a scheduled email job + /// + /// + /// Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ScheduledJobDto) + System.Threading.Tasks.Task> GetScheduledJobWithHttpInfoAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all scheduled email sending jobs for the inbox + /// + /// + /// Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageScheduledJobs + System.Threading.Tasks.Task GetScheduledJobsByInboxIdAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all scheduled email sending jobs for the inbox + /// + /// + /// Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageScheduledJobs) + System.Threading.Tasks.Task> GetScheduledJobsByInboxIdWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxRulesetDto + System.Threading.Tasks.Task ListInboxRulesetsAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxRulesetDto) + System.Threading.Tasks.Task> ListInboxRulesetsWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List inbox tracking pixels + /// + /// + /// List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + System.Threading.Tasks.Task ListInboxTrackingPixelsAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List inbox tracking pixels + /// + /// + /// List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + System.Threading.Tasks.Task> ListInboxTrackingPixelsWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send Email + /// + /// + /// Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task SendEmailAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send Email + /// + /// + /// Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> SendEmailWithHttpInfoAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send email and return sent confirmation + /// + /// + /// Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + System.Threading.Tasks.Task SendEmailAndConfirmAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send email and return sent confirmation + /// + /// + /// Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + System.Threading.Tasks.Task> SendEmailAndConfirmWithHttpInfoAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send email with queue + /// + /// + /// Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task SendEmailWithQueueAsync(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send email with queue + /// + /// + /// Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> SendEmailWithQueueWithHttpInfoAsync(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation + /// + /// + /// Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + System.Threading.Tasks.Task SendSmtpEnvelopeAsync(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation + /// + /// + /// Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + System.Threading.Tasks.Task> SendSmtpEnvelopeWithHttpInfoAsync(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send a test email to inbox + /// + /// + /// Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task SendTestEmailAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send a test email to inbox + /// + /// + /// Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> SendTestEmailWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send email with with delay or schedule + /// + /// + /// Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ScheduledJobDto + System.Threading.Tasks.Task SendWithScheduleAsync(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send email with with delay or schedule + /// + /// + /// Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ScheduledJobDto) + System.Threading.Tasks.Task> SendWithScheduleWithHttpInfoAsync(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Set inbox favourited state + /// + /// + /// Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task SetInboxFavouritedAsync(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Set inbox favourited state + /// + /// + /// Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> SetInboxFavouritedWithHttpInfoAsync(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update Inbox. Change name and description. Email address is not editable. + /// + /// + /// Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + System.Threading.Tasks.Task UpdateInboxAsync(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update Inbox. Change name and description. Email address is not editable. + /// + /// + /// Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + System.Threading.Tasks.Task> UpdateInboxWithHttpInfoAsync(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxControllerApi : IInboxControllerApiSync, IInboxControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class InboxControllerApi : IInboxControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public InboxControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public InboxControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public InboxControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public InboxControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Cancel a scheduled email job Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ScheduledJobDto + public ScheduledJobDto CancelScheduledJob(Guid jobId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CancelScheduledJobWithHttpInfo(jobId); + return localVarResponse.Data; + } + + /// + /// Cancel a scheduled email job Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ScheduledJobDto + public mailslurp.Client.ApiResponse CancelScheduledJobWithHttpInfo(Guid jobId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("jobId", mailslurp.Client.ClientUtils.ParameterToString(jobId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.CancelScheduledJob"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/inboxes/scheduled-jobs/{jobId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CancelScheduledJob", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Cancel a scheduled email job Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ScheduledJobDto + public async System.Threading.Tasks.Task CancelScheduledJobAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CancelScheduledJobWithHttpInfoAsync(jobId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Cancel a scheduled email job Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ScheduledJobDto) + public async System.Threading.Tasks.Task> CancelScheduledJobWithHttpInfoAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("jobId", mailslurp.Client.ClientUtils.ParameterToString(jobId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.CancelScheduledJob"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/inboxes/scheduled-jobs/{jobId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CancelScheduledJob", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// InboxDto + public InboxDto CreateInbox(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateInboxWithHttpInfo(emailAddress, tags, name, description, useDomainPool, favourite, expiresAt, expiresIn, allowTeamAccess, inboxType, virtualInbox, useShortAddress); + return localVarResponse.Data; + } + + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse CreateInboxWithHttpInfo(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + } + if (tags != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "tags", tags)); + } + if (name != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + } + if (description != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "description", description)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (expiresAt != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresAt", expiresAt)); + } + if (expiresIn != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresIn", expiresIn)); + } + if (allowTeamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowTeamAccess", allowTeamAccess)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (virtualInbox != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualInbox", virtualInbox)); + } + if (useShortAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useShortAddress", useShortAddress)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task CreateInboxAsync(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateInboxWithHttpInfoAsync(emailAddress, tags, name, description, useDomainPool, favourite, expiresAt, expiresIn, allowTeamAccess, inboxType, virtualInbox, useShortAddress, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + /// + /// Thrown when fails to make API call + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) + /// Number of milliseconds that inbox should exist for (optional) + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) + /// HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + /// Use a shorter email address under 31 characters (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> CreateInboxWithHttpInfoAsync(string emailAddress = default(string), List tags = default(List), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), bool? favourite = default(bool?), DateTime? expiresAt = default(DateTime?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), string inboxType = default(string), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (emailAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + } + if (tags != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("multi", "tags", tags)); + } + if (name != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + } + if (description != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "description", description)); + } + if (useDomainPool != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useDomainPool", useDomainPool)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (expiresAt != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresAt", expiresAt)); + } + if (expiresIn != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "expiresIn", expiresIn)); + } + if (allowTeamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowTeamAccess", allowTeamAccess)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (virtualInbox != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "virtualInbox", virtualInbox)); + } + if (useShortAddress != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "useShortAddress", useShortAddress)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// InboxRulesetDto + public InboxRulesetDto CreateInboxRuleset(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateInboxRulesetWithHttpInfo(inboxId, createInboxRulesetOptions); + return localVarResponse.Data; + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetDto + public mailslurp.Client.ApiResponse CreateInboxRulesetWithHttpInfo(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0) + { + // verify the required parameter 'createInboxRulesetOptions' is set + if (createInboxRulesetOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxRulesetOptions' when calling InboxControllerApi->CreateInboxRuleset"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = createInboxRulesetOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}/rulesets", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetDto + public async System.Threading.Tasks.Task CreateInboxRulesetAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateInboxRulesetWithHttpInfoAsync(inboxId, createInboxRulesetOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// inboxId + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetDto) + public async System.Threading.Tasks.Task> CreateInboxRulesetWithHttpInfoAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createInboxRulesetOptions' is set + if (createInboxRulesetOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxRulesetOptions' when calling InboxControllerApi->CreateInboxRuleset"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = createInboxRulesetOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}/rulesets", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// InboxDto + public InboxDto CreateInboxWithDefaults(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateInboxWithDefaultsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse CreateInboxWithDefaultsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInboxWithDefaults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/withDefaults", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInboxWithDefaults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task CreateInboxWithDefaultsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateInboxWithDefaultsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create an inbox with default options. Uses MailSlurp domain pool address and is private. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> CreateInboxWithDefaultsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInboxWithDefaults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/withDefaults", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInboxWithDefaults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox with options. Extended options for inbox creation. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxDto + public InboxDto CreateInboxWithOptions(CreateInboxDto createInboxDto, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateInboxWithOptionsWithHttpInfo(createInboxDto); + return localVarResponse.Data; + } + + /// + /// Create an inbox with options. Extended options for inbox creation. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse CreateInboxWithOptionsWithHttpInfo(CreateInboxDto createInboxDto, int operationIndex = 0) + { + // verify the required parameter 'createInboxDto' is set + if (createInboxDto == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxDto' when calling InboxControllerApi->CreateInboxWithOptions"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createInboxDto; + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInboxWithOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/withOptions", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInboxWithOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox with options. Extended options for inbox creation. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task CreateInboxWithOptionsAsync(CreateInboxDto createInboxDto, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateInboxWithOptionsWithHttpInfoAsync(createInboxDto, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create an inbox with options. Extended options for inbox creation. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> CreateInboxWithOptionsWithHttpInfoAsync(CreateInboxDto createInboxDto, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createInboxDto' is set + if (createInboxDto == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxDto' when calling InboxControllerApi->CreateInboxWithOptions"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createInboxDto; + + localVarRequestOptions.Operation = "InboxControllerApi.CreateInboxWithOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/withOptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateInboxWithOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all emails in a given inboxes. Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteAllInboxEmails(Guid inboxId, int operationIndex = 0) + { + DeleteAllInboxEmailsWithHttpInfo(inboxId); + } + + /// + /// Delete all emails in a given inboxes. Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAllInboxEmailsWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.DeleteAllInboxEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/inboxes/{inboxId}/deleteAllInboxEmails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllInboxEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all emails in a given inboxes. Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAllInboxEmailsAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAllInboxEmailsWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all emails in a given inboxes. Deletes all emails in an inbox. Be careful as emails cannot be recovered + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAllInboxEmailsWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.DeleteAllInboxEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/inboxes/{inboxId}/deleteAllInboxEmails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllInboxEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all inboxes Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + public void DeleteAllInboxes(int operationIndex = 0) + { + DeleteAllInboxesWithHttpInfo(); + } + + /// + /// Delete all inboxes Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAllInboxesWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.DeleteAllInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/inboxes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all inboxes Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAllInboxesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAllInboxesWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all inboxes Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAllInboxesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.DeleteAllInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/inboxes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteInbox(Guid inboxId, int operationIndex = 0) + { + DeleteInboxWithHttpInfo(inboxId); + } + + /// + /// Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteInboxWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.DeleteInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteInboxAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteInboxWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteInboxWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.DeleteInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Does inbox exist Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// InboxExistsDto + public InboxExistsDto DoesInboxExist(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DoesInboxExistWithHttpInfo(emailAddress, allowCatchAll); + return localVarResponse.Data; + } + + /// + /// Does inbox exist Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// ApiResponse of InboxExistsDto + public mailslurp.Client.ApiResponse DoesInboxExistWithHttpInfo(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0) + { + // verify the required parameter 'emailAddress' is set + if (emailAddress == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'emailAddress' when calling InboxControllerApi->DoesInboxExist"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + if (allowCatchAll != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowCatchAll", allowCatchAll)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.DoesInboxExist"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/exists", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DoesInboxExist", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Does inbox exist Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxExistsDto + public async System.Threading.Tasks.Task DoesInboxExistAsync(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DoesInboxExistWithHttpInfoAsync(emailAddress, allowCatchAll, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Does inbox exist Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + /// + /// Thrown when fails to make API call + /// Email address + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxExistsDto) + public async System.Threading.Tasks.Task> DoesInboxExistWithHttpInfoAsync(string emailAddress, bool? allowCatchAll = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'emailAddress' is set + if (emailAddress == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'emailAddress' when calling InboxControllerApi->DoesInboxExist"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + if (allowCatchAll != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "allowCatchAll", allowCatchAll)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.DoesInboxExist"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/exists", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DoesInboxExist", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Remove expired inboxes Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// FlushExpiredInboxesResult + public FlushExpiredInboxesResult FlushExpired(DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = FlushExpiredWithHttpInfo(before); + return localVarResponse.Data; + } + + /// + /// Remove expired inboxes Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// ApiResponse of FlushExpiredInboxesResult + public mailslurp.Client.ApiResponse FlushExpiredWithHttpInfo(DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.FlushExpired"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/inboxes/expired", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FlushExpired", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Remove expired inboxes Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FlushExpiredInboxesResult + public async System.Threading.Tasks.Task FlushExpiredAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await FlushExpiredWithHttpInfoAsync(before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Remove expired inboxes Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + /// + /// Thrown when fails to make API call + /// Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FlushExpiredInboxesResult) + public async System.Threading.Tasks.Task> FlushExpiredWithHttpInfoAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.FlushExpired"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/inboxes/expired", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FlushExpired", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List All Inboxes Paginated List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// PageInboxProjection + public PageInboxProjection GetAllInboxes(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllInboxesWithHttpInfo(page, size, sort, favourite, search, tag, teamAccess, since, before, inboxType, domainId); + return localVarResponse.Data; + } + + /// + /// List All Inboxes Paginated List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxProjection + public mailslurp.Client.ApiResponse GetAllInboxesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (search != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "search", search)); + } + if (tag != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "tag", tag)); + } + if (teamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "teamAccess", teamAccess)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (domainId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "domainId", domainId)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetAllInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List All Inboxes Paginated List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxProjection + public async System.Threading.Tasks.Task GetAllInboxesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllInboxesWithHttpInfoAsync(page, size, sort, favourite, search, tag, teamAccess, since, before, inboxType, domainId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List All Inboxes Paginated List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optionally filter results for favourites only (optional, default to false) + /// Optionally filter by search words partial matching ID, tags, name, and email address (optional) + /// Optionally filter by tags. Will return inboxes that include given tags (optional) + /// DEPRECATED. Optionally filter by team access. (optional) (deprecated) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Optional filter by inbox type (optional) + /// Optional domain ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxProjection) + public async System.Threading.Tasks.Task> GetAllInboxesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), bool? favourite = default(bool?), string search = default(string), string tag = default(string), bool? teamAccess = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string inboxType = default(string), Guid? domainId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (favourite != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "favourite", favourite)); + } + if (search != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "search", search)); + } + if (tag != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "tag", tag)); + } + if (teamAccess != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "teamAccess", teamAccess)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (inboxType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxType", inboxType)); + } + if (domainId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "domainId", domainId)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetAllInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all scheduled email sending jobs for account Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageScheduledJobs + public PageScheduledJobs GetAllScheduledJobs(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllScheduledJobsWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all scheduled email sending jobs for account Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageScheduledJobs + public mailslurp.Client.ApiResponse GetAllScheduledJobsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetAllScheduledJobs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/scheduled-jobs", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllScheduledJobs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all scheduled email sending jobs for account Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageScheduledJobs + public async System.Threading.Tasks.Task GetAllScheduledJobsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllScheduledJobsWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all scheduled email sending jobs for account Schedule sending of emails using scheduled jobs. These can be inbox or account level. + /// + /// Thrown when fails to make API call + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageScheduledJobs) + public async System.Threading.Tasks.Task> GetAllScheduledJobsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetAllScheduledJobs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/scheduled-jobs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllScheduledJobs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageDeliveryStatus + public PageDeliveryStatus GetDeliveryStatusesByInboxId(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetDeliveryStatusesByInboxIdWithHttpInfo(inboxId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageDeliveryStatus + public mailslurp.Client.ApiResponse GetDeliveryStatusesByInboxIdWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetDeliveryStatusesByInboxId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/delivery-status", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeliveryStatusesByInboxId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageDeliveryStatus + public async System.Threading.Tasks.Task GetDeliveryStatusesByInboxIdAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetDeliveryStatusesByInboxIdWithHttpInfoAsync(inboxId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all email delivery statuses for an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageDeliveryStatus) + public async System.Threading.Tasks.Task> GetDeliveryStatusesByInboxIdWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetDeliveryStatusesByInboxId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/delivery-status", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeliveryStatusesByInboxId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// List<EmailPreview> + public List GetEmails(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetEmailsWithHttpInfo(inboxId, size, limit, sort, retryTimeout, delayTimeout, minCount, unreadOnly, before, since); + return localVarResponse.Data; + } + + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + public mailslurp.Client.ApiResponse> GetEmailsWithHttpInfo(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (retryTimeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "retryTimeout", retryTimeout)); + } + if (delayTimeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delayTimeout", delayTimeout)); + } + if (minCount != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "minCount", minCount)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/inboxes/{inboxId}/emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + public async System.Threading.Tasks.Task> GetEmailsAsync(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetEmailsWithHttpInfoAsync(inboxId, size, limit, sort, retryTimeout, delayTimeout, minCount, unreadOnly, before, since, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Alias for limit. Assessed first before assessing any passed limit. (optional) + /// Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) + /// Sort the results by received date and direction ASC or DESC (optional) + /// Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) + /// (optional) + /// Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) + /// (optional) + /// Exclude emails received after this ISO 8601 date time (optional) + /// Exclude emails received before this ISO 8601 date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + public async System.Threading.Tasks.Task>> GetEmailsWithHttpInfoAsync(Guid inboxId, int? size = default(int?), int? limit = default(int?), string sort = default(string), long? retryTimeout = default(long?), long? delayTimeout = default(long?), long? minCount = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (retryTimeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "retryTimeout", retryTimeout)); + } + if (delayTimeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delayTimeout", delayTimeout)); + } + if (minCount != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "minCount", minCount)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/inboxes/{inboxId}/emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// ImapSmtpAccessDetails + public ImapSmtpAccessDetails GetImapSmtpAccess(Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetImapSmtpAccessWithHttpInfo(inboxId); + return localVarResponse.Data; + } + + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// ApiResponse of ImapSmtpAccessDetails + public mailslurp.Client.ApiResponse GetImapSmtpAccessWithHttpInfo(Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetImapSmtpAccess"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/imap-smtp-access", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetImapSmtpAccess", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ImapSmtpAccessDetails + public async System.Threading.Tasks.Task GetImapSmtpAccessAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetImapSmtpAccessWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get IMAP and SMTP access usernames and passwords + /// + /// Thrown when fails to make API call + /// Inbox ID (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ImapSmtpAccessDetails) + public async System.Threading.Tasks.Task> GetImapSmtpAccessWithHttpInfoAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetImapSmtpAccess"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/imap-smtp-access", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetImapSmtpAccess", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Inbox. Returns properties of an inbox. Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxDto + public InboxDto GetInbox(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxWithHttpInfo(inboxId); + return localVarResponse.Data; + } + + /// + /// Get Inbox. Returns properties of an inbox. Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse GetInboxWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.GetInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Inbox. Returns properties of an inbox. Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task GetInboxAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Inbox. Returns properties of an inbox. Returns an inbox's properties, including its email address and ID. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> GetInboxWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.GetInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Search for an inbox with the provided email address Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxByEmailAddressResult + public InboxByEmailAddressResult GetInboxByEmailAddress(string emailAddress, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxByEmailAddressWithHttpInfo(emailAddress); + return localVarResponse.Data; + } + + /// + /// Search for an inbox with the provided email address Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxByEmailAddressResult + public mailslurp.Client.ApiResponse GetInboxByEmailAddressWithHttpInfo(string emailAddress, int operationIndex = 0) + { + // verify the required parameter 'emailAddress' is set + if (emailAddress == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'emailAddress' when calling InboxControllerApi->GetInboxByEmailAddress"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxByEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/byEmailAddress", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxByEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Search for an inbox with the provided email address Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxByEmailAddressResult + public async System.Threading.Tasks.Task GetInboxByEmailAddressAsync(string emailAddress, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxByEmailAddressWithHttpInfoAsync(emailAddress, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Search for an inbox with the provided email address Get a inbox result by email address + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxByEmailAddressResult) + public async System.Threading.Tasks.Task> GetInboxByEmailAddressWithHttpInfoAsync(string emailAddress, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'emailAddress' is set + if (emailAddress == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'emailAddress' when calling InboxControllerApi->GetInboxByEmailAddress"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "emailAddress", emailAddress)); + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxByEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/byEmailAddress", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxByEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Search for an inbox with the given name Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxByNameResult + public InboxByNameResult GetInboxByName(string name, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxByNameWithHttpInfo(name); + return localVarResponse.Data; + } + + /// + /// Search for an inbox with the given name Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxByNameResult + public mailslurp.Client.ApiResponse GetInboxByNameWithHttpInfo(string name, int operationIndex = 0) + { + // verify the required parameter 'name' is set + if (name == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'name' when calling InboxControllerApi->GetInboxByName"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxByName"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/byName", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxByName", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Search for an inbox with the given name Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxByNameResult + public async System.Threading.Tasks.Task GetInboxByNameAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxByNameWithHttpInfoAsync(name, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Search for an inbox with the given name Get a inbox result by name + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxByNameResult) + public async System.Threading.Tasks.Task> GetInboxByNameWithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'name' is set + if (name == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'name' when calling InboxControllerApi->GetInboxByName"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxByName"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/byName", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxByName", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get total inbox count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// CountDto + public CountDto GetInboxCount(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxCountWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get total inbox count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of CountDto + public mailslurp.Client.ApiResponse GetInboxCountWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/count", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get total inbox count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CountDto + public async System.Threading.Tasks.Task GetInboxCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxCountWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get total inbox count + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CountDto) + public async System.Threading.Tasks.Task> GetInboxCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/count", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email count in inbox + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// CountDto + public CountDto GetInboxEmailCount(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxEmailCountWithHttpInfo(inboxId); + return localVarResponse.Data; + } + + /// + /// Get email count in inbox + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// ApiResponse of CountDto + public mailslurp.Client.ApiResponse GetInboxEmailCountWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/emails/count", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get email count in inbox + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CountDto + public async System.Threading.Tasks.Task GetInboxEmailCountAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxEmailCountWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get email count in inbox + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CountDto) + public async System.Threading.Tasks.Task> GetInboxEmailCountWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/emails/count", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get inbox emails paginated Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// PageEmailPreview + public PageEmailPreview GetInboxEmailsPaginated(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxEmailsPaginatedWithHttpInfo(inboxId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get inbox emails paginated Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageEmailPreview + public mailslurp.Client.ApiResponse GetInboxEmailsPaginatedWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxEmailsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/emails/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxEmailsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get inbox emails paginated Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageEmailPreview + public async System.Threading.Tasks.Task GetInboxEmailsPaginatedAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxEmailsPaginatedWithHttpInfoAsync(inboxId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get inbox emails paginated Get a paginated list of emails in an inbox. Does not hold connections open. + /// + /// Thrown when fails to make API call + /// Id of inbox that emails belongs to + /// Optional page index in inbox emails list pagination (optional, default to 0) + /// Optional page size in inbox emails list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by received after given date time (optional) + /// Optional filter by received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageEmailPreview) + public async System.Threading.Tasks.Task> GetInboxEmailsPaginatedWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxEmailsPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/emails/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxEmailsPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all inbox IDs Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// InboxIdsResult + public InboxIdsResult GetInboxIds(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxIdsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get all inbox IDs Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of InboxIdsResult + public mailslurp.Client.ApiResponse GetInboxIdsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxIds"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/ids", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxIds", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all inbox IDs Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxIdsResult + public async System.Threading.Tasks.Task GetInboxIdsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxIdsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all inbox IDs Get list of inbox IDs + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxIdsResult) + public async System.Threading.Tasks.Task> GetInboxIdsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxIds"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/ids", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxIds", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Inbox Sent Emails Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// PageSentEmailProjection + public PageSentEmailProjection GetInboxSentEmails(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxSentEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get Inbox Sent Emails Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailProjection + public mailslurp.Client.ApiResponse GetInboxSentEmailsWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxSentEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/sent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxSentEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Inbox Sent Emails Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailProjection + public async System.Threading.Tasks.Task GetInboxSentEmailsAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxSentEmailsWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Inbox Sent Emails Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional sent email search (optional) + /// Optional filter by sent after given date time (optional) + /// Optional filter by sent before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailProjection) + public async System.Threading.Tasks.Task> GetInboxSentEmailsWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxSentEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/sent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxSentEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get inbox tags Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<string> + public List GetInboxTags(int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetInboxTagsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get inbox tags Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<string> + public mailslurp.Client.ApiResponse> GetInboxTagsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxTags"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/inboxes/tags", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxTags", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get inbox tags Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<string> + public async System.Threading.Tasks.Task> GetInboxTagsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetInboxTagsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get inbox tags Get all inbox tags + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> GetInboxTagsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxTags"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/inboxes/tags", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxTags", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Inboxes and email addresses List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// List<InboxDto> + [Obsolete] + public List GetInboxes(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetInboxesWithHttpInfo(size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// List Inboxes and email addresses List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of List<InboxDto> + [Obsolete] + public mailslurp.Client.ApiResponse> GetInboxesWithHttpInfo(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/inboxes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Inboxes and email addresses List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<InboxDto> + [Obsolete] + public async System.Threading.Tasks.Task> GetInboxesAsync(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetInboxesWithHttpInfoAsync(size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Inboxes and email addresses List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + /// + /// Thrown when fails to make API call + /// Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional, default to 100) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<InboxDto>) + [Obsolete] + public async System.Threading.Tasks.Task>> GetInboxesWithHttpInfoAsync(int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/inboxes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// Email + public Email GetLatestEmailInInbox(Guid inboxId, long timeoutMillis, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetLatestEmailInInboxWithHttpInfo(inboxId, timeoutMillis); + return localVarResponse.Data; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// ApiResponse of Email + public mailslurp.Client.ApiResponse GetLatestEmailInInboxWithHttpInfo(Guid inboxId, long timeoutMillis, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeoutMillis", timeoutMillis)); + + localVarRequestOptions.Operation = "InboxControllerApi.GetLatestEmailInInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/getLatestEmail", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestEmailInInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + public async System.Threading.Tasks.Task GetLatestEmailInInboxAsync(Guid inboxId, long timeoutMillis, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetLatestEmailInInboxWithHttpInfoAsync(inboxId, timeoutMillis, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. Get the newest email in an inbox or wait for one to arrive + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to get the latest email from + /// Timeout milliseconds to wait for latest email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + public async System.Threading.Tasks.Task> GetLatestEmailInInboxWithHttpInfoAsync(Guid inboxId, long timeoutMillis, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeoutMillis", timeoutMillis)); + + localVarRequestOptions.Operation = "InboxControllerApi.GetLatestEmailInInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/getLatestEmail", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestEmailInInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// PageOrganizationInboxProjection + public PageOrganizationInboxProjection GetOrganizationInboxes(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetOrganizationInboxesWithHttpInfo(page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageOrganizationInboxProjection + public mailslurp.Client.ApiResponse GetOrganizationInboxesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetOrganizationInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/organization", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOrganizationInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageOrganizationInboxProjection + public async System.Threading.Tasks.Task GetOrganizationInboxesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetOrganizationInboxesWithHttpInfoAsync(page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageOrganizationInboxProjection) + public async System.Threading.Tasks.Task> GetOrganizationInboxesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetOrganizationInboxes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/organization", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOrganizationInboxes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a scheduled email job Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ScheduledJobDto + public ScheduledJobDto GetScheduledJob(Guid jobId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetScheduledJobWithHttpInfo(jobId); + return localVarResponse.Data; + } + + /// + /// Get a scheduled email job Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of ScheduledJobDto + public mailslurp.Client.ApiResponse GetScheduledJobWithHttpInfo(Guid jobId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("jobId", mailslurp.Client.ClientUtils.ParameterToString(jobId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.GetScheduledJob"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/scheduled-jobs/{jobId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetScheduledJob", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a scheduled email job Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ScheduledJobDto + public async System.Threading.Tasks.Task GetScheduledJobAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetScheduledJobWithHttpInfoAsync(jobId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a scheduled email job Get a scheduled email job details. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ScheduledJobDto) + public async System.Threading.Tasks.Task> GetScheduledJobWithHttpInfoAsync(Guid jobId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("jobId", mailslurp.Client.ClientUtils.ParameterToString(jobId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.GetScheduledJob"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/scheduled-jobs/{jobId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetScheduledJob", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all scheduled email sending jobs for the inbox Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageScheduledJobs + public PageScheduledJobs GetScheduledJobsByInboxId(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetScheduledJobsByInboxIdWithHttpInfo(inboxId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all scheduled email sending jobs for the inbox Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageScheduledJobs + public mailslurp.Client.ApiResponse GetScheduledJobsByInboxIdWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetScheduledJobsByInboxId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/scheduled-jobs", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetScheduledJobsByInboxId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all scheduled email sending jobs for the inbox Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageScheduledJobs + public async System.Threading.Tasks.Task GetScheduledJobsByInboxIdAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetScheduledJobsByInboxIdWithHttpInfoAsync(inboxId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all scheduled email sending jobs for the inbox Schedule sending of emails using scheduled jobs. + /// + /// Thrown when fails to make API call + /// + /// Optional page index in scheduled job list pagination (optional, default to 0) + /// Optional page size in scheduled job list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageScheduledJobs) + public async System.Threading.Tasks.Task> GetScheduledJobsByInboxIdWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.GetScheduledJobsByInboxId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/scheduled-jobs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetScheduledJobsByInboxId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// PageInboxRulesetDto + public PageInboxRulesetDto ListInboxRulesets(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ListInboxRulesetsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxRulesetDto + public mailslurp.Client.ApiResponse ListInboxRulesetsWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.ListInboxRulesets"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/rulesets", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListInboxRulesets", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxRulesetDto + public async System.Threading.Tasks.Task ListInboxRulesetsAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ListInboxRulesetsWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxRulesetDto) + public async System.Threading.Tasks.Task> ListInboxRulesetsWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.ListInboxRulesets"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/rulesets", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListInboxRulesets", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox tracking pixels List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + public PageTrackingPixelProjection ListInboxTrackingPixels(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = ListInboxTrackingPixelsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// List inbox tracking pixels List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + public mailslurp.Client.ApiResponse ListInboxTrackingPixelsWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.ListInboxTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/tracking-pixels", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListInboxTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox tracking pixels List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + public async System.Threading.Tasks.Task ListInboxTrackingPixelsAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await ListInboxTrackingPixelsWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List inbox tracking pixels List all tracking pixels sent from an inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in inbox tracking pixel list pagination (optional, default to 0) + /// Optional page size in inbox tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Optional filter by created after given date time (optional) + /// Optional filter by created before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + public async System.Threading.Tasks.Task> ListInboxTrackingPixelsWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxControllerApi.ListInboxTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/tracking-pixels", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListInboxTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send Email Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// + public void SendEmail(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + SendEmailWithHttpInfo(inboxId, sendEmailOptions); + } + + /// + /// Send Email Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse SendEmailWithHttpInfo(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendEmail"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send Email Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task SendEmailAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await SendEmailWithHttpInfoAsync(inboxId, sendEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Send Email Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendEmailWithHttpInfoAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendEmail"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email and return sent confirmation Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// SentEmailDto + public SentEmailDto SendEmailAndConfirm(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = SendEmailAndConfirmWithHttpInfo(inboxId, sendEmailOptions); + return localVarResponse.Data; + } + + /// + /// Send email and return sent confirmation Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + public mailslurp.Client.ApiResponse SendEmailAndConfirmWithHttpInfo(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendEmailAndConfirm"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendEmailAndConfirm"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}/confirm", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailAndConfirm", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email and return sent confirmation Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + public async System.Threading.Tasks.Task SendEmailAndConfirmAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await SendEmailAndConfirmWithHttpInfoAsync(inboxId, sendEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Send email and return sent confirmation Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + public async System.Threading.Tasks.Task> SendEmailAndConfirmWithHttpInfoAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendEmailAndConfirm"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendEmailAndConfirm"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}/confirm", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailAndConfirm", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email with queue Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// + public void SendEmailWithQueue(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + SendEmailWithQueueWithHttpInfo(inboxId, validateBeforeEnqueue, sendEmailOptions); + } + + /// + /// Send email with queue Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse SendEmailWithQueueWithHttpInfo(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendEmailWithQueue"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "validateBeforeEnqueue", validateBeforeEnqueue)); + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendEmailWithQueue"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}/with-queue", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailWithQueue", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email with queue Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task SendEmailWithQueueAsync(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await SendEmailWithQueueWithHttpInfoAsync(inboxId, validateBeforeEnqueue, sendEmailOptions, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Send email with queue Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// Validate before adding to queue + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendEmailWithQueueWithHttpInfoAsync(Guid inboxId, bool validateBeforeEnqueue, SendEmailOptions sendEmailOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendEmailWithQueue"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "validateBeforeEnqueue", validateBeforeEnqueue)); + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendEmailWithQueue"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}/with-queue", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendEmailWithQueue", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// SentEmailDto + public SentEmailDto SendSmtpEnvelope(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = SendSmtpEnvelopeWithHttpInfo(inboxId, sendSMTPEnvelopeOptions); + return localVarResponse.Data; + } + + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + public mailslurp.Client.ApiResponse SendSmtpEnvelopeWithHttpInfo(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0) + { + // verify the required parameter 'sendSMTPEnvelopeOptions' is set + if (sendSMTPEnvelopeOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendSMTPEnvelopeOptions' when calling InboxControllerApi->SendSmtpEnvelope"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = sendSMTPEnvelopeOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendSmtpEnvelope"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}/smtp-envelope", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendSmtpEnvelope", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + public async System.Threading.Tasks.Task SendSmtpEnvelopeAsync(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await SendSmtpEnvelopeWithHttpInfoAsync(inboxId, sendSMTPEnvelopeOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Send email using an SMTP mail envelope and message body and return sent confirmation Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + public async System.Threading.Tasks.Task> SendSmtpEnvelopeWithHttpInfoAsync(Guid inboxId, SendSMTPEnvelopeOptions sendSMTPEnvelopeOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'sendSMTPEnvelopeOptions' is set + if (sendSMTPEnvelopeOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendSMTPEnvelopeOptions' when calling InboxControllerApi->SendSmtpEnvelope"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = sendSMTPEnvelopeOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendSmtpEnvelope"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}/smtp-envelope", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendSmtpEnvelope", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send a test email to inbox Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void SendTestEmail(Guid inboxId, int operationIndex = 0) + { + SendTestEmailWithHttpInfo(inboxId); + } + + /// + /// Send a test email to inbox Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse SendTestEmailWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.SendTestEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}/send-test-email", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendTestEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send a test email to inbox Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task SendTestEmailAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await SendTestEmailWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Send a test email to inbox Send an inbox a test email to test email receiving is working + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendTestEmailWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "InboxControllerApi.SendTestEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}/send-test-email", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendTestEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email with with delay or schedule Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// ScheduledJobDto + public ScheduledJobDto SendWithSchedule(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = SendWithScheduleWithHttpInfo(inboxId, sendEmailOptions, sendAtTimestamp, sendAtNowPlusSeconds, validateBeforeEnqueue); + return localVarResponse.Data; + } + + /// + /// Send email with with delay or schedule Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// ApiResponse of ScheduledJobDto + public mailslurp.Client.ApiResponse SendWithScheduleWithHttpInfo(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendWithSchedule"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (sendAtTimestamp != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sendAtTimestamp", sendAtTimestamp)); + } + if (sendAtNowPlusSeconds != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sendAtNowPlusSeconds", sendAtNowPlusSeconds)); + } + if (validateBeforeEnqueue != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "validateBeforeEnqueue", validateBeforeEnqueue)); + } + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendWithSchedule"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}/with-schedule", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendWithSchedule", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send email with with delay or schedule Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ScheduledJobDto + public async System.Threading.Tasks.Task SendWithScheduleAsync(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await SendWithScheduleWithHttpInfoAsync(inboxId, sendEmailOptions, sendAtTimestamp, sendAtNowPlusSeconds, validateBeforeEnqueue, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Send email with with delay or schedule Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. + /// + /// Thrown when fails to make API call + /// ID of the inbox you want to send the email from + /// + /// Sending timestamp (optional) + /// Send after n seconds (optional) + /// Validate before adding to queue (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ScheduledJobDto) + public async System.Threading.Tasks.Task> SendWithScheduleWithHttpInfoAsync(Guid inboxId, SendEmailOptions sendEmailOptions, DateTime? sendAtTimestamp = default(DateTime?), long? sendAtNowPlusSeconds = default(long?), bool? validateBeforeEnqueue = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'sendEmailOptions' is set + if (sendEmailOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'sendEmailOptions' when calling InboxControllerApi->SendWithSchedule"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (sendAtTimestamp != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sendAtTimestamp", sendAtTimestamp)); + } + if (sendAtNowPlusSeconds != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sendAtNowPlusSeconds", sendAtNowPlusSeconds)); + } + if (validateBeforeEnqueue != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "validateBeforeEnqueue", validateBeforeEnqueue)); + } + localVarRequestOptions.Data = sendEmailOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SendWithSchedule"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}/with-schedule", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendWithSchedule", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set inbox favourited state Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// InboxDto + public InboxDto SetInboxFavourited(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = SetInboxFavouritedWithHttpInfo(inboxId, setInboxFavouritedOptions); + return localVarResponse.Data; + } + + /// + /// Set inbox favourited state Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse SetInboxFavouritedWithHttpInfo(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0) + { + // verify the required parameter 'setInboxFavouritedOptions' is set + if (setInboxFavouritedOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'setInboxFavouritedOptions' when calling InboxControllerApi->SetInboxFavourited"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = setInboxFavouritedOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SetInboxFavourited"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/inboxes/{inboxId}/favourite", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetInboxFavourited", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set inbox favourited state Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task SetInboxFavouritedAsync(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await SetInboxFavouritedWithHttpInfoAsync(inboxId, setInboxFavouritedOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Set inbox favourited state Set and return new favourite state for an inbox + /// + /// Thrown when fails to make API call + /// ID of inbox to set favourite state + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> SetInboxFavouritedWithHttpInfoAsync(Guid inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'setInboxFavouritedOptions' is set + if (setInboxFavouritedOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'setInboxFavouritedOptions' when calling InboxControllerApi->SetInboxFavourited"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = setInboxFavouritedOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.SetInboxFavourited"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/inboxes/{inboxId}/favourite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetInboxFavourited", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update Inbox. Change name and description. Email address is not editable. Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// InboxDto + public InboxDto UpdateInbox(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = UpdateInboxWithHttpInfo(inboxId, updateInboxOptions); + return localVarResponse.Data; + } + + /// + /// Update Inbox. Change name and description. Email address is not editable. Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of InboxDto + public mailslurp.Client.ApiResponse UpdateInboxWithHttpInfo(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0) + { + // verify the required parameter 'updateInboxOptions' is set + if (updateInboxOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateInboxOptions' when calling InboxControllerApi->UpdateInbox"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = updateInboxOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.UpdateInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update Inbox. Change name and description. Email address is not editable. Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxDto + public async System.Threading.Tasks.Task UpdateInboxAsync(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await UpdateInboxWithHttpInfoAsync(inboxId, updateInboxOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update Inbox. Change name and description. Email address is not editable. Update editable fields on an inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxDto) + public async System.Threading.Tasks.Task> UpdateInboxWithHttpInfoAsync(Guid inboxId, UpdateInboxOptions updateInboxOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'updateInboxOptions' is set + if (updateInboxOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'updateInboxOptions' when calling InboxControllerApi->UpdateInbox"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = updateInboxOptions; + + localVarRequestOptions.Operation = "InboxControllerApi.UpdateInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/inboxes/{inboxId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/InboxForwarderControllerApi.cs b/src/mailslurp/Api/InboxForwarderControllerApi.cs new file mode 100644 index 00000000..735eb10a --- /dev/null +++ b/src/mailslurp/Api/InboxForwarderControllerApi.cs @@ -0,0 +1,2318 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxForwarderControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create an inbox forwarder + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// InboxForwarderDto + InboxForwarderDto CreateNewInboxForwarder(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0); + + /// + /// Create an inbox forwarder + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderDto + ApiResponse CreateNewInboxForwarderWithHttpInfo(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0); + /// + /// Delete an inbox forwarder + /// + /// + /// Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// + void DeleteInboxForwarder(Guid id, int operationIndex = 0); + + /// + /// Delete an inbox forwarder + /// + /// + /// Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteInboxForwarderWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Delete inbox forwarders + /// + /// + /// Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// + void DeleteInboxForwarders(Guid? inboxId = default(Guid?), int operationIndex = 0); + + /// + /// Delete inbox forwarders + /// + /// + /// Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteInboxForwardersWithHttpInfo(Guid? inboxId = default(Guid?), int operationIndex = 0); + /// + /// Get an inbox forwarder + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// InboxForwarderDto + InboxForwarderDto GetInboxForwarder(Guid id, int operationIndex = 0); + + /// + /// Get an inbox forwarder + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// ApiResponse of InboxForwarderDto + ApiResponse GetInboxForwarderWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get an inbox forwarder event list + /// + /// + /// Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// PageInboxForwarderEvents + PageInboxForwarderEvents GetInboxForwarderEvents(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0); + + /// + /// Get an inbox forwarder event list + /// + /// + /// Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// ApiResponse of PageInboxForwarderEvents + ApiResponse GetInboxForwarderEventsWithHttpInfo(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0); + /// + /// List inbox forwarders + /// + /// + /// List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageInboxForwarderDto + PageInboxForwarderDto GetInboxForwarders(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List inbox forwarders + /// + /// + /// List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxForwarderDto + ApiResponse GetInboxForwardersWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Test an inbox forwarder + /// + /// + /// Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// InboxForwarderTestResult + InboxForwarderTestResult TestInboxForwarder(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0); + + /// + /// Test an inbox forwarder + /// + /// + /// Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderTestResult + ApiResponse TestInboxForwarderWithHttpInfo(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0); + /// + /// Test inbox forwarders for inbox + /// + /// + /// Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// InboxForwarderTestResult + InboxForwarderTestResult TestInboxForwardersForInbox(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0); + + /// + /// Test inbox forwarders for inbox + /// + /// + /// Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderTestResult + ApiResponse TestInboxForwardersForInboxWithHttpInfo(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0); + /// + /// Test new inbox forwarder + /// + /// + /// Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxForwarderTestResult + InboxForwarderTestResult TestNewInboxForwarder(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0); + + /// + /// Test new inbox forwarder + /// + /// + /// Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderTestResult + ApiResponse TestNewInboxForwarderWithHttpInfo(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0); + /// + /// Update an inbox forwarder + /// + /// + /// Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// InboxForwarderDto + InboxForwarderDto UpdateInboxForwarder(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0); + + /// + /// Update an inbox forwarder + /// + /// + /// Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderDto + ApiResponse UpdateInboxForwarderWithHttpInfo(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxForwarderControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create an inbox forwarder + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderDto + System.Threading.Tasks.Task CreateNewInboxForwarderAsync(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create an inbox forwarder + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderDto) + System.Threading.Tasks.Task> CreateNewInboxForwarderWithHttpInfoAsync(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete an inbox forwarder + /// + /// + /// Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteInboxForwarderAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete an inbox forwarder + /// + /// + /// Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteInboxForwarderWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete inbox forwarders + /// + /// + /// Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteInboxForwardersAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete inbox forwarders + /// + /// + /// Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteInboxForwardersWithHttpInfoAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get an inbox forwarder + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderDto + System.Threading.Tasks.Task GetInboxForwarderAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an inbox forwarder + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderDto) + System.Threading.Tasks.Task> GetInboxForwarderWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get an inbox forwarder event list + /// + /// + /// Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxForwarderEvents + System.Threading.Tasks.Task GetInboxForwarderEventsAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an inbox forwarder event list + /// + /// + /// Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxForwarderEvents) + System.Threading.Tasks.Task> GetInboxForwarderEventsWithHttpInfoAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List inbox forwarders + /// + /// + /// List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxForwarderDto + System.Threading.Tasks.Task GetInboxForwardersAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List inbox forwarders + /// + /// + /// List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxForwarderDto) + System.Threading.Tasks.Task> GetInboxForwardersWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Test an inbox forwarder + /// + /// + /// Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderTestResult + System.Threading.Tasks.Task TestInboxForwarderAsync(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Test an inbox forwarder + /// + /// + /// Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderTestResult) + System.Threading.Tasks.Task> TestInboxForwarderWithHttpInfoAsync(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Test inbox forwarders for inbox + /// + /// + /// Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderTestResult + System.Threading.Tasks.Task TestInboxForwardersForInboxAsync(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Test inbox forwarders for inbox + /// + /// + /// Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderTestResult) + System.Threading.Tasks.Task> TestInboxForwardersForInboxWithHttpInfoAsync(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Test new inbox forwarder + /// + /// + /// Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderTestResult + System.Threading.Tasks.Task TestNewInboxForwarderAsync(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Test new inbox forwarder + /// + /// + /// Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderTestResult) + System.Threading.Tasks.Task> TestNewInboxForwarderWithHttpInfoAsync(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update an inbox forwarder + /// + /// + /// Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderDto + System.Threading.Tasks.Task UpdateInboxForwarderAsync(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update an inbox forwarder + /// + /// + /// Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderDto) + System.Threading.Tasks.Task> UpdateInboxForwarderWithHttpInfoAsync(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxForwarderControllerApi : IInboxForwarderControllerApiSync, IInboxForwarderControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class InboxForwarderControllerApi : IInboxForwarderControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public InboxForwarderControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public InboxForwarderControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public InboxForwarderControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public InboxForwarderControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create an inbox forwarder Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// InboxForwarderDto + public InboxForwarderDto CreateNewInboxForwarder(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateNewInboxForwarderWithHttpInfo(inboxId, createInboxForwarderOptions); + return localVarResponse.Data; + } + + /// + /// Create an inbox forwarder Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderDto + public mailslurp.Client.ApiResponse CreateNewInboxForwarderWithHttpInfo(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0) + { + // verify the required parameter 'createInboxForwarderOptions' is set + if (createInboxForwarderOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxForwarderOptions' when calling InboxForwarderControllerApi->CreateNewInboxForwarder"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = createInboxForwarderOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.CreateNewInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/forwarders", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateNewInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox forwarder Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderDto + public async System.Threading.Tasks.Task CreateNewInboxForwarderAsync(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateNewInboxForwarderWithHttpInfoAsync(inboxId, createInboxForwarderOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create an inbox forwarder Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach forwarder to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderDto) + public async System.Threading.Tasks.Task> CreateNewInboxForwarderWithHttpInfoAsync(Guid inboxId, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createInboxForwarderOptions' is set + if (createInboxForwarderOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxForwarderOptions' when calling InboxForwarderControllerApi->CreateNewInboxForwarder"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = createInboxForwarderOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.CreateNewInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/forwarders", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateNewInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an inbox forwarder Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// + public void DeleteInboxForwarder(Guid id, int operationIndex = 0) + { + DeleteInboxForwarderWithHttpInfo(id); + } + + /// + /// Delete an inbox forwarder Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteInboxForwarderWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.DeleteInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/forwarders/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an inbox forwarder Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteInboxForwarderAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteInboxForwarderWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete an inbox forwarder Delete inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteInboxForwarderWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.DeleteInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/forwarders/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox forwarders Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// + public void DeleteInboxForwarders(Guid? inboxId = default(Guid?), int operationIndex = 0) + { + DeleteInboxForwardersWithHttpInfo(inboxId); + } + + /// + /// Delete inbox forwarders Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteInboxForwardersWithHttpInfo(Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.DeleteInboxForwarders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/forwarders", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxForwarders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox forwarders Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteInboxForwardersAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteInboxForwardersWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete inbox forwarders Delete inbox forwarders. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach forwarder to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteInboxForwardersWithHttpInfoAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.DeleteInboxForwarders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/forwarders", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxForwarders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an inbox forwarder Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// InboxForwarderDto + public InboxForwarderDto GetInboxForwarder(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxForwarderWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get an inbox forwarder Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// ApiResponse of InboxForwarderDto + public mailslurp.Client.ApiResponse GetInboxForwarderWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.GetInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/forwarders/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an inbox forwarder Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderDto + public async System.Threading.Tasks.Task GetInboxForwarderAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxForwarderWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get an inbox forwarder Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderDto) + public async System.Threading.Tasks.Task> GetInboxForwarderWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.GetInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/forwarders/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an inbox forwarder event list Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// PageInboxForwarderEvents + public PageInboxForwarderEvents GetInboxForwarderEvents(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxForwarderEventsWithHttpInfo(id, page, size, sort); + return localVarResponse.Data; + } + + /// + /// Get an inbox forwarder event list Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// ApiResponse of PageInboxForwarderEvents + public mailslurp.Client.ApiResponse GetInboxForwarderEventsWithHttpInfo(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.GetInboxForwarderEvents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/forwarders/{id}/events", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxForwarderEvents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an inbox forwarder event list Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxForwarderEvents + public async System.Threading.Tasks.Task GetInboxForwarderEventsAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxForwarderEventsWithHttpInfoAsync(id, page, size, sort, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get an inbox forwarder event list Get inbox ruleset events + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// Optional page index in inbox forwarder event list pagination (optional, default to 0) + /// Optional page size in inbox forwarder event list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxForwarderEvents) + public async System.Threading.Tasks.Task> GetInboxForwarderEventsWithHttpInfoAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.GetInboxForwarderEvents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/forwarders/{id}/events", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxForwarderEvents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox forwarders List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageInboxForwarderDto + public PageInboxForwarderDto GetInboxForwarders(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxForwardersWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// List inbox forwarders List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxForwarderDto + public mailslurp.Client.ApiResponse GetInboxForwardersWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.GetInboxForwarders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/forwarders", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxForwarders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox forwarders List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxForwarderDto + public async System.Threading.Tasks.Task GetInboxForwardersAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxForwardersWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List inbox forwarders List all forwarders attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get forwarders from (optional) + /// Optional page index in inbox forwarder list pagination (optional, default to 0) + /// Optional page size in inbox forwarder list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxForwarderDto) + public async System.Threading.Tasks.Task> GetInboxForwardersWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.GetInboxForwarders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/forwarders", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxForwarders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test an inbox forwarder Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// InboxForwarderTestResult + public InboxForwarderTestResult TestInboxForwarder(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = TestInboxForwarderWithHttpInfo(id, inboxForwarderTestOptions); + return localVarResponse.Data; + } + + /// + /// Test an inbox forwarder Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderTestResult + public mailslurp.Client.ApiResponse TestInboxForwarderWithHttpInfo(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0) + { + // verify the required parameter 'inboxForwarderTestOptions' is set + if (inboxForwarderTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxForwarderTestOptions' when calling InboxForwarderControllerApi->TestInboxForwarder"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = inboxForwarderTestOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.TestInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/forwarders/{id}/test", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test an inbox forwarder Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderTestResult + public async System.Threading.Tasks.Task TestInboxForwarderAsync(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await TestInboxForwarderWithHttpInfoAsync(id, inboxForwarderTestOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test an inbox forwarder Test an inbox forwarder + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderTestResult) + public async System.Threading.Tasks.Task> TestInboxForwarderWithHttpInfoAsync(Guid id, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'inboxForwarderTestOptions' is set + if (inboxForwarderTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxForwarderTestOptions' when calling InboxForwarderControllerApi->TestInboxForwarder"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = inboxForwarderTestOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.TestInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/forwarders/{id}/test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test inbox forwarders for inbox Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// InboxForwarderTestResult + public InboxForwarderTestResult TestInboxForwardersForInbox(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = TestInboxForwardersForInboxWithHttpInfo(inboxId, inboxForwarderTestOptions); + return localVarResponse.Data; + } + + /// + /// Test inbox forwarders for inbox Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderTestResult + public mailslurp.Client.ApiResponse TestInboxForwardersForInboxWithHttpInfo(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0) + { + // verify the required parameter 'inboxForwarderTestOptions' is set + if (inboxForwarderTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxForwarderTestOptions' when calling InboxForwarderControllerApi->TestInboxForwardersForInbox"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = inboxForwarderTestOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.TestInboxForwardersForInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/forwarders", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxForwardersForInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test inbox forwarders for inbox Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderTestResult + public async System.Threading.Tasks.Task TestInboxForwardersForInboxAsync(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await TestInboxForwardersForInboxWithHttpInfoAsync(inboxId, inboxForwarderTestOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test inbox forwarders for inbox Test inbox forwarders for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderTestResult) + public async System.Threading.Tasks.Task> TestInboxForwardersForInboxWithHttpInfoAsync(Guid inboxId, InboxForwarderTestOptions inboxForwarderTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'inboxForwarderTestOptions' is set + if (inboxForwarderTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxForwarderTestOptions' when calling InboxForwarderControllerApi->TestInboxForwardersForInbox"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = inboxForwarderTestOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.TestInboxForwardersForInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/forwarders", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxForwardersForInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test new inbox forwarder Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxForwarderTestResult + public InboxForwarderTestResult TestNewInboxForwarder(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = TestNewInboxForwarderWithHttpInfo(testNewInboxForwarderOptions); + return localVarResponse.Data; + } + + /// + /// Test new inbox forwarder Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderTestResult + public mailslurp.Client.ApiResponse TestNewInboxForwarderWithHttpInfo(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0) + { + // verify the required parameter 'testNewInboxForwarderOptions' is set + if (testNewInboxForwarderOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'testNewInboxForwarderOptions' when calling InboxForwarderControllerApi->TestNewInboxForwarder"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = testNewInboxForwarderOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.TestNewInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/forwarders", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestNewInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test new inbox forwarder Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderTestResult + public async System.Threading.Tasks.Task TestNewInboxForwarderAsync(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await TestNewInboxForwarderWithHttpInfoAsync(testNewInboxForwarderOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test new inbox forwarder Test new inbox forwarder + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderTestResult) + public async System.Threading.Tasks.Task> TestNewInboxForwarderWithHttpInfoAsync(TestNewInboxForwarderOptions testNewInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'testNewInboxForwarderOptions' is set + if (testNewInboxForwarderOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'testNewInboxForwarderOptions' when calling InboxForwarderControllerApi->TestNewInboxForwarder"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = testNewInboxForwarderOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.TestNewInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/forwarders", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestNewInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update an inbox forwarder Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// InboxForwarderDto + public InboxForwarderDto UpdateInboxForwarder(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = UpdateInboxForwarderWithHttpInfo(id, createInboxForwarderOptions); + return localVarResponse.Data; + } + + /// + /// Update an inbox forwarder Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// ApiResponse of InboxForwarderDto + public mailslurp.Client.ApiResponse UpdateInboxForwarderWithHttpInfo(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0) + { + // verify the required parameter 'createInboxForwarderOptions' is set + if (createInboxForwarderOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxForwarderOptions' when calling InboxForwarderControllerApi->UpdateInboxForwarder"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = createInboxForwarderOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.UpdateInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/forwarders/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update an inbox forwarder Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxForwarderDto + public async System.Threading.Tasks.Task UpdateInboxForwarderAsync(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await UpdateInboxForwarderWithHttpInfoAsync(id, createInboxForwarderOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update an inbox forwarder Update inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox forwarder + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxForwarderDto) + public async System.Threading.Tasks.Task> UpdateInboxForwarderWithHttpInfoAsync(Guid id, CreateInboxForwarderOptions createInboxForwarderOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createInboxForwarderOptions' is set + if (createInboxForwarderOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxForwarderOptions' when calling InboxForwarderControllerApi->UpdateInboxForwarder"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = createInboxForwarderOptions; + + localVarRequestOptions.Operation = "InboxForwarderControllerApi.UpdateInboxForwarder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/forwarders/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateInboxForwarder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/InboxRulesetControllerApi.cs b/src/mailslurp/Api/InboxRulesetControllerApi.cs new file mode 100644 index 00000000..1a75de0d --- /dev/null +++ b/src/mailslurp/Api/InboxRulesetControllerApi.cs @@ -0,0 +1,1866 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxRulesetControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// InboxRulesetDto + InboxRulesetDto CreateNewInboxRuleset(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0); + + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetDto + ApiResponse CreateNewInboxRulesetWithHttpInfo(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0); + /// + /// Delete an inbox ruleset + /// + /// + /// Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// + void DeleteInboxRuleset(Guid id, int operationIndex = 0); + + /// + /// Delete an inbox ruleset + /// + /// + /// Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteInboxRulesetWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Delete inbox rulesets + /// + /// + /// Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// + void DeleteInboxRulesets(Guid? inboxId = default(Guid?), int operationIndex = 0); + + /// + /// Delete inbox rulesets + /// + /// + /// Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteInboxRulesetsWithHttpInfo(Guid? inboxId = default(Guid?), int operationIndex = 0); + /// + /// Get an inbox ruleset + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// InboxRulesetDto + InboxRulesetDto GetInboxRuleset(Guid id, int operationIndex = 0); + + /// + /// Get an inbox ruleset + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// ApiResponse of InboxRulesetDto + ApiResponse GetInboxRulesetWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageInboxRulesetDto + PageInboxRulesetDto GetInboxRulesets(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxRulesetDto + ApiResponse GetInboxRulesetsWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Test an inbox ruleset + /// + /// + /// Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// InboxRulesetTestResult + InboxRulesetTestResult TestInboxRuleset(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0); + + /// + /// Test an inbox ruleset + /// + /// + /// Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetTestResult + ApiResponse TestInboxRulesetWithHttpInfo(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0); + /// + /// Test inbox rulesets for inbox + /// + /// + /// Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// InboxRulesetTestResult + InboxRulesetTestResult TestInboxRulesetsForInbox(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0); + + /// + /// Test inbox rulesets for inbox + /// + /// + /// Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetTestResult + ApiResponse TestInboxRulesetsForInboxWithHttpInfo(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0); + /// + /// Test new inbox ruleset + /// + /// + /// Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxRulesetTestResult + InboxRulesetTestResult TestNewInboxRuleset(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0); + + /// + /// Test new inbox ruleset + /// + /// + /// Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetTestResult + ApiResponse TestNewInboxRulesetWithHttpInfo(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxRulesetControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetDto + System.Threading.Tasks.Task CreateNewInboxRulesetAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create an inbox ruleset + /// + /// + /// Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetDto) + System.Threading.Tasks.Task> CreateNewInboxRulesetWithHttpInfoAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete an inbox ruleset + /// + /// + /// Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteInboxRulesetAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete an inbox ruleset + /// + /// + /// Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteInboxRulesetWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete inbox rulesets + /// + /// + /// Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteInboxRulesetsAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete inbox rulesets + /// + /// + /// Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteInboxRulesetsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get an inbox ruleset + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetDto + System.Threading.Tasks.Task GetInboxRulesetAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an inbox ruleset + /// + /// + /// Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetDto) + System.Threading.Tasks.Task> GetInboxRulesetWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxRulesetDto + System.Threading.Tasks.Task GetInboxRulesetsAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List inbox rulesets + /// + /// + /// List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxRulesetDto) + System.Threading.Tasks.Task> GetInboxRulesetsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Test an inbox ruleset + /// + /// + /// Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetTestResult + System.Threading.Tasks.Task TestInboxRulesetAsync(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Test an inbox ruleset + /// + /// + /// Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetTestResult) + System.Threading.Tasks.Task> TestInboxRulesetWithHttpInfoAsync(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Test inbox rulesets for inbox + /// + /// + /// Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetTestResult + System.Threading.Tasks.Task TestInboxRulesetsForInboxAsync(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Test inbox rulesets for inbox + /// + /// + /// Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetTestResult) + System.Threading.Tasks.Task> TestInboxRulesetsForInboxWithHttpInfoAsync(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Test new inbox ruleset + /// + /// + /// Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetTestResult + System.Threading.Tasks.Task TestNewInboxRulesetAsync(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Test new inbox ruleset + /// + /// + /// Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetTestResult) + System.Threading.Tasks.Task> TestNewInboxRulesetWithHttpInfoAsync(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInboxRulesetControllerApi : IInboxRulesetControllerApiSync, IInboxRulesetControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class InboxRulesetControllerApi : IInboxRulesetControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public InboxRulesetControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public InboxRulesetControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public InboxRulesetControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public InboxRulesetControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// InboxRulesetDto + public InboxRulesetDto CreateNewInboxRuleset(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateNewInboxRulesetWithHttpInfo(inboxId, createInboxRulesetOptions); + return localVarResponse.Data; + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetDto + public mailslurp.Client.ApiResponse CreateNewInboxRulesetWithHttpInfo(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0) + { + // verify the required parameter 'createInboxRulesetOptions' is set + if (createInboxRulesetOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxRulesetOptions' when calling InboxRulesetControllerApi->CreateNewInboxRuleset"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = createInboxRulesetOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.CreateNewInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/rulesets", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateNewInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetDto + public async System.Threading.Tasks.Task CreateNewInboxRulesetAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateNewInboxRulesetWithHttpInfoAsync(inboxId, createInboxRulesetOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create an inbox ruleset Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + /// + /// Thrown when fails to make API call + /// Inbox id to attach ruleset to + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetDto) + public async System.Threading.Tasks.Task> CreateNewInboxRulesetWithHttpInfoAsync(Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createInboxRulesetOptions' is set + if (createInboxRulesetOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createInboxRulesetOptions' when calling InboxRulesetControllerApi->CreateNewInboxRuleset"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = createInboxRulesetOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.CreateNewInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/rulesets", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateNewInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an inbox ruleset Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// + public void DeleteInboxRuleset(Guid id, int operationIndex = 0) + { + DeleteInboxRulesetWithHttpInfo(id); + } + + /// + /// Delete an inbox ruleset Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteInboxRulesetWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.DeleteInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/rulesets/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete an inbox ruleset Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteInboxRulesetAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteInboxRulesetWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete an inbox ruleset Delete inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteInboxRulesetWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.DeleteInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/rulesets/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox rulesets Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// + public void DeleteInboxRulesets(Guid? inboxId = default(Guid?), int operationIndex = 0) + { + DeleteInboxRulesetsWithHttpInfo(inboxId); + } + + /// + /// Delete inbox rulesets Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteInboxRulesetsWithHttpInfo(Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.DeleteInboxRulesets"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/rulesets", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxRulesets", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete inbox rulesets Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteInboxRulesetsAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteInboxRulesetsWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete inbox rulesets Delete inbox rulesets. Accepts optional inboxId filter. + /// + /// Thrown when fails to make API call + /// Optional inbox id to attach ruleset to (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteInboxRulesetsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.DeleteInboxRulesets"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/rulesets", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteInboxRulesets", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an inbox ruleset Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// InboxRulesetDto + public InboxRulesetDto GetInboxRuleset(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxRulesetWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get an inbox ruleset Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// ApiResponse of InboxRulesetDto + public mailslurp.Client.ApiResponse GetInboxRulesetWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.GetInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/rulesets/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an inbox ruleset Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetDto + public async System.Threading.Tasks.Task GetInboxRulesetAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxRulesetWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get an inbox ruleset Get inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetDto) + public async System.Threading.Tasks.Task> GetInboxRulesetWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.GetInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/rulesets/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageInboxRulesetDto + public PageInboxRulesetDto GetInboxRulesets(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxRulesetsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageInboxRulesetDto + public mailslurp.Client.ApiResponse GetInboxRulesetsWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.GetInboxRulesets"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/rulesets", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxRulesets", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageInboxRulesetDto + public async System.Threading.Tasks.Task GetInboxRulesetsAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxRulesetsWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List inbox rulesets List all rulesets attached to an inbox + /// + /// Thrown when fails to make API call + /// Optional inbox id to get rulesets from (optional) + /// Optional page index in inbox ruleset list pagination (optional, default to 0) + /// Optional page size in inbox ruleset list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageInboxRulesetDto) + public async System.Threading.Tasks.Task> GetInboxRulesetsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.GetInboxRulesets"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/rulesets", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxRulesets", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test an inbox ruleset Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// InboxRulesetTestResult + public InboxRulesetTestResult TestInboxRuleset(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = TestInboxRulesetWithHttpInfo(id, inboxRulesetTestOptions); + return localVarResponse.Data; + } + + /// + /// Test an inbox ruleset Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetTestResult + public mailslurp.Client.ApiResponse TestInboxRulesetWithHttpInfo(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0) + { + // verify the required parameter 'inboxRulesetTestOptions' is set + if (inboxRulesetTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxRulesetTestOptions' when calling InboxRulesetControllerApi->TestInboxRuleset"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = inboxRulesetTestOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.TestInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/rulesets/{id}/test", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test an inbox ruleset Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetTestResult + public async System.Threading.Tasks.Task TestInboxRulesetAsync(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await TestInboxRulesetWithHttpInfoAsync(id, inboxRulesetTestOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test an inbox ruleset Test an inbox ruleset + /// + /// Thrown when fails to make API call + /// ID of inbox ruleset + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetTestResult) + public async System.Threading.Tasks.Task> TestInboxRulesetWithHttpInfoAsync(Guid id, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'inboxRulesetTestOptions' is set + if (inboxRulesetTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxRulesetTestOptions' when calling InboxRulesetControllerApi->TestInboxRuleset"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = inboxRulesetTestOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.TestInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/rulesets/{id}/test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test inbox rulesets for inbox Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// InboxRulesetTestResult + public InboxRulesetTestResult TestInboxRulesetsForInbox(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = TestInboxRulesetsForInboxWithHttpInfo(inboxId, inboxRulesetTestOptions); + return localVarResponse.Data; + } + + /// + /// Test inbox rulesets for inbox Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetTestResult + public mailslurp.Client.ApiResponse TestInboxRulesetsForInboxWithHttpInfo(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0) + { + // verify the required parameter 'inboxRulesetTestOptions' is set + if (inboxRulesetTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxRulesetTestOptions' when calling InboxRulesetControllerApi->TestInboxRulesetsForInbox"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = inboxRulesetTestOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.TestInboxRulesetsForInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/rulesets", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxRulesetsForInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test inbox rulesets for inbox Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetTestResult + public async System.Threading.Tasks.Task TestInboxRulesetsForInboxAsync(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await TestInboxRulesetsForInboxWithHttpInfoAsync(inboxId, inboxRulesetTestOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test inbox rulesets for inbox Test inbox rulesets for inbox + /// + /// Thrown when fails to make API call + /// ID of inbox + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetTestResult) + public async System.Threading.Tasks.Task> TestInboxRulesetsForInboxWithHttpInfoAsync(Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'inboxRulesetTestOptions' is set + if (inboxRulesetTestOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'inboxRulesetTestOptions' when calling InboxRulesetControllerApi->TestInboxRulesetsForInbox"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.Data = inboxRulesetTestOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.TestInboxRulesetsForInbox"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/rulesets", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInboxRulesetsForInbox", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test new inbox ruleset Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// InboxRulesetTestResult + public InboxRulesetTestResult TestNewInboxRuleset(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = TestNewInboxRulesetWithHttpInfo(testNewInboxRulesetOptions); + return localVarResponse.Data; + } + + /// + /// Test new inbox ruleset Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of InboxRulesetTestResult + public mailslurp.Client.ApiResponse TestNewInboxRulesetWithHttpInfo(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0) + { + // verify the required parameter 'testNewInboxRulesetOptions' is set + if (testNewInboxRulesetOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'testNewInboxRulesetOptions' when calling InboxRulesetControllerApi->TestNewInboxRuleset"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = testNewInboxRulesetOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.TestNewInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/rulesets", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestNewInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test new inbox ruleset Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InboxRulesetTestResult + public async System.Threading.Tasks.Task TestNewInboxRulesetAsync(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await TestNewInboxRulesetWithHttpInfoAsync(testNewInboxRulesetOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test new inbox ruleset Test new inbox ruleset + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InboxRulesetTestResult) + public async System.Threading.Tasks.Task> TestNewInboxRulesetWithHttpInfoAsync(TestNewInboxRulesetOptions testNewInboxRulesetOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'testNewInboxRulesetOptions' is set + if (testNewInboxRulesetOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'testNewInboxRulesetOptions' when calling InboxRulesetControllerApi->TestNewInboxRuleset"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = testNewInboxRulesetOptions; + + localVarRequestOptions.Operation = "InboxRulesetControllerApi.TestNewInboxRuleset"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/rulesets", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestNewInboxRuleset", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/MailServerControllerApi.cs b/src/mailslurp/Api/MailServerControllerApi.cs new file mode 100644 index 00000000..c22da417 --- /dev/null +++ b/src/mailslurp/Api/MailServerControllerApi.cs @@ -0,0 +1,970 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMailServerControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Get DNS Mail Server records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DescribeMailServerDomainResult + DescribeMailServerDomainResult DescribeMailServerDomain(DescribeDomainOptions describeDomainOptions, int operationIndex = 0); + + /// + /// Get DNS Mail Server records for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DescribeMailServerDomainResult + ApiResponse DescribeMailServerDomainWithHttpInfo(DescribeDomainOptions describeDomainOptions, int operationIndex = 0); + /// + /// Lookup DNS records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DNSLookupResults + DNSLookupResults GetDnsLookup(DNSLookupOptions dNSLookupOptions, int operationIndex = 0); + + /// + /// Lookup DNS records for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DNSLookupResults + ApiResponse GetDnsLookupWithHttpInfo(DNSLookupOptions dNSLookupOptions, int operationIndex = 0); + /// + /// Get IP address for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// IPAddressResult + IPAddressResult GetIpAddress(string name, int operationIndex = 0); + + /// + /// Get IP address for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of IPAddressResult + ApiResponse GetIpAddressWithHttpInfo(string name, int operationIndex = 0); + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmailVerificationResult + [Obsolete] + EmailVerificationResult VerifyEmailAddress(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0); + + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmailVerificationResult + [Obsolete] + ApiResponse VerifyEmailAddressWithHttpInfo(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMailServerControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Get DNS Mail Server records for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DescribeMailServerDomainResult + System.Threading.Tasks.Task DescribeMailServerDomainAsync(DescribeDomainOptions describeDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get DNS Mail Server records for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DescribeMailServerDomainResult) + System.Threading.Tasks.Task> DescribeMailServerDomainWithHttpInfoAsync(DescribeDomainOptions describeDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Lookup DNS records for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DNSLookupResults + System.Threading.Tasks.Task GetDnsLookupAsync(DNSLookupOptions dNSLookupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Lookup DNS records for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DNSLookupResults) + System.Threading.Tasks.Task> GetDnsLookupWithHttpInfoAsync(DNSLookupOptions dNSLookupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get IP address for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of IPAddressResult + System.Threading.Tasks.Task GetIpAddressAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get IP address for a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (IPAddressResult) + System.Threading.Tasks.Task> GetIpAddressWithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailVerificationResult + [Obsolete] + System.Threading.Tasks.Task VerifyEmailAddressAsync(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailVerificationResult) + [Obsolete] + System.Threading.Tasks.Task> VerifyEmailAddressWithHttpInfoAsync(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMailServerControllerApi : IMailServerControllerApiSync, IMailServerControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class MailServerControllerApi : IMailServerControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public MailServerControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public MailServerControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public MailServerControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public MailServerControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Get DNS Mail Server records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DescribeMailServerDomainResult + public DescribeMailServerDomainResult DescribeMailServerDomain(DescribeDomainOptions describeDomainOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DescribeMailServerDomainWithHttpInfo(describeDomainOptions); + return localVarResponse.Data; + } + + /// + /// Get DNS Mail Server records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DescribeMailServerDomainResult + public mailslurp.Client.ApiResponse DescribeMailServerDomainWithHttpInfo(DescribeDomainOptions describeDomainOptions, int operationIndex = 0) + { + // verify the required parameter 'describeDomainOptions' is set + if (describeDomainOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'describeDomainOptions' when calling MailServerControllerApi->DescribeMailServerDomain"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = describeDomainOptions; + + localVarRequestOptions.Operation = "MailServerControllerApi.DescribeMailServerDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/mail-server/describe/domain", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DescribeMailServerDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get DNS Mail Server records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DescribeMailServerDomainResult + public async System.Threading.Tasks.Task DescribeMailServerDomainAsync(DescribeDomainOptions describeDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DescribeMailServerDomainWithHttpInfoAsync(describeDomainOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get DNS Mail Server records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DescribeMailServerDomainResult) + public async System.Threading.Tasks.Task> DescribeMailServerDomainWithHttpInfoAsync(DescribeDomainOptions describeDomainOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'describeDomainOptions' is set + if (describeDomainOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'describeDomainOptions' when calling MailServerControllerApi->DescribeMailServerDomain"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = describeDomainOptions; + + localVarRequestOptions.Operation = "MailServerControllerApi.DescribeMailServerDomain"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/mail-server/describe/domain", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DescribeMailServerDomain", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Lookup DNS records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DNSLookupResults + public DNSLookupResults GetDnsLookup(DNSLookupOptions dNSLookupOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetDnsLookupWithHttpInfo(dNSLookupOptions); + return localVarResponse.Data; + } + + /// + /// Lookup DNS records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DNSLookupResults + public mailslurp.Client.ApiResponse GetDnsLookupWithHttpInfo(DNSLookupOptions dNSLookupOptions, int operationIndex = 0) + { + // verify the required parameter 'dNSLookupOptions' is set + if (dNSLookupOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'dNSLookupOptions' when calling MailServerControllerApi->GetDnsLookup"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = dNSLookupOptions; + + localVarRequestOptions.Operation = "MailServerControllerApi.GetDnsLookup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/mail-server/describe/dns-lookup", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDnsLookup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Lookup DNS records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DNSLookupResults + public async System.Threading.Tasks.Task GetDnsLookupAsync(DNSLookupOptions dNSLookupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetDnsLookupWithHttpInfoAsync(dNSLookupOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Lookup DNS records for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DNSLookupResults) + public async System.Threading.Tasks.Task> GetDnsLookupWithHttpInfoAsync(DNSLookupOptions dNSLookupOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'dNSLookupOptions' is set + if (dNSLookupOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'dNSLookupOptions' when calling MailServerControllerApi->GetDnsLookup"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = dNSLookupOptions; + + localVarRequestOptions.Operation = "MailServerControllerApi.GetDnsLookup"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/mail-server/describe/dns-lookup", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDnsLookup", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get IP address for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// IPAddressResult + public IPAddressResult GetIpAddress(string name, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetIpAddressWithHttpInfo(name); + return localVarResponse.Data; + } + + /// + /// Get IP address for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of IPAddressResult + public mailslurp.Client.ApiResponse GetIpAddressWithHttpInfo(string name, int operationIndex = 0) + { + // verify the required parameter 'name' is set + if (name == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'name' when calling MailServerControllerApi->GetIpAddress"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + + localVarRequestOptions.Operation = "MailServerControllerApi.GetIpAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/mail-server/describe/ip-address", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetIpAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get IP address for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of IPAddressResult + public async System.Threading.Tasks.Task GetIpAddressAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetIpAddressWithHttpInfoAsync(name, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get IP address for a domain + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (IPAddressResult) + public async System.Threading.Tasks.Task> GetIpAddressWithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'name' is set + if (name == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'name' when calling MailServerControllerApi->GetIpAddress"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "name", name)); + + localVarRequestOptions.Operation = "MailServerControllerApi.GetIpAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/mail-server/describe/ip-address", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetIpAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmailVerificationResult + [Obsolete] + public EmailVerificationResult VerifyEmailAddress(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = VerifyEmailAddressWithHttpInfo(verifyEmailAddressOptions); + return localVarResponse.Data; + } + + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmailVerificationResult + [Obsolete] + public mailslurp.Client.ApiResponse VerifyEmailAddressWithHttpInfo(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0) + { + // verify the required parameter 'verifyEmailAddressOptions' is set + if (verifyEmailAddressOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'verifyEmailAddressOptions' when calling MailServerControllerApi->VerifyEmailAddress"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = verifyEmailAddressOptions; + + localVarRequestOptions.Operation = "MailServerControllerApi.VerifyEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/mail-server/verify/email-address", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("VerifyEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailVerificationResult + [Obsolete] + public async System.Threading.Tasks.Task VerifyEmailAddressAsync(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await VerifyEmailAddressWithHttpInfoAsync(verifyEmailAddressOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailVerificationResult) + [Obsolete] + public async System.Threading.Tasks.Task> VerifyEmailAddressWithHttpInfoAsync(VerifyEmailAddressOptions verifyEmailAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'verifyEmailAddressOptions' is set + if (verifyEmailAddressOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'verifyEmailAddressOptions' when calling MailServerControllerApi->VerifyEmailAddress"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = verifyEmailAddressOptions; + + localVarRequestOptions.Operation = "MailServerControllerApi.VerifyEmailAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/mail-server/verify/email-address", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("VerifyEmailAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/MissedEmailControllerApi.cs b/src/mailslurp/Api/MissedEmailControllerApi.cs new file mode 100644 index 00000000..8bb7e8d0 --- /dev/null +++ b/src/mailslurp/Api/MissedEmailControllerApi.cs @@ -0,0 +1,1361 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMissedEmailControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Get all MissedEmails in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// PageMissedEmailProjection + PageMissedEmailProjection GetAllMissedEmails(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0); + + /// + /// Get all MissedEmails in paginated format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// ApiResponse of PageMissedEmailProjection + ApiResponse GetAllMissedEmailsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0); + /// + /// Get all unknown missed emails in paginated format + /// + /// + /// Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// PageUnknownMissedEmailProjection + PageUnknownMissedEmailProjection GetAllUnknownMissedEmails(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0); + + /// + /// Get all unknown missed emails in paginated format + /// + /// + /// Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// ApiResponse of PageUnknownMissedEmailProjection + ApiResponse GetAllUnknownMissedEmailsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0); + /// + /// Get MissedEmail + /// + /// + /// List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// MissedEmailDto + MissedEmailDto GetMissedEmail(Guid missedEmailId, int operationIndex = 0); + + /// + /// Get MissedEmail + /// + /// + /// List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of MissedEmailDto + ApiResponse GetMissedEmailWithHttpInfo(Guid missedEmailId, int operationIndex = 0); + /// + /// Restore missed emails + /// + /// + /// If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + void RestoreMissedEmails(int operationIndex = 0); + + /// + /// Restore missed emails + /// + /// + /// If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse RestoreMissedEmailsWithHttpInfo(int operationIndex = 0); + /// + /// Wait for Nth missed email + /// + /// + /// Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// MissedEmailDto + MissedEmailDto WaitForNthMissedEmail(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Wait for Nth missed email + /// + /// + /// Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of MissedEmailDto + ApiResponse WaitForNthMissedEmailWithHttpInfo(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMissedEmailControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Get all MissedEmails in paginated format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageMissedEmailProjection + System.Threading.Tasks.Task GetAllMissedEmailsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all MissedEmails in paginated format + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageMissedEmailProjection) + System.Threading.Tasks.Task> GetAllMissedEmailsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all unknown missed emails in paginated format + /// + /// + /// Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageUnknownMissedEmailProjection + System.Threading.Tasks.Task GetAllUnknownMissedEmailsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all unknown missed emails in paginated format + /// + /// + /// Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageUnknownMissedEmailProjection) + System.Threading.Tasks.Task> GetAllUnknownMissedEmailsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get MissedEmail + /// + /// + /// List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of MissedEmailDto + System.Threading.Tasks.Task GetMissedEmailAsync(Guid missedEmailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get MissedEmail + /// + /// + /// List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (MissedEmailDto) + System.Threading.Tasks.Task> GetMissedEmailWithHttpInfoAsync(Guid missedEmailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Restore missed emails + /// + /// + /// If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RestoreMissedEmailsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Restore missed emails + /// + /// + /// If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RestoreMissedEmailsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Wait for Nth missed email + /// + /// + /// Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of MissedEmailDto + System.Threading.Tasks.Task WaitForNthMissedEmailAsync(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait for Nth missed email + /// + /// + /// Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (MissedEmailDto) + System.Threading.Tasks.Task> WaitForNthMissedEmailWithHttpInfoAsync(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMissedEmailControllerApi : IMissedEmailControllerApiSync, IMissedEmailControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class MissedEmailControllerApi : IMissedEmailControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public MissedEmailControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public MissedEmailControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public MissedEmailControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public MissedEmailControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Get all MissedEmails in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// PageMissedEmailProjection + public PageMissedEmailProjection GetAllMissedEmails(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllMissedEmailsWithHttpInfo(page, size, sort, searchFilter, since, before, inboxId); + return localVarResponse.Data; + } + + /// + /// Get all MissedEmails in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// ApiResponse of PageMissedEmailProjection + public mailslurp.Client.ApiResponse GetAllMissedEmailsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "MissedEmailControllerApi.GetAllMissedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/missed-emails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllMissedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all MissedEmails in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageMissedEmailProjection + public async System.Threading.Tasks.Task GetAllMissedEmailsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllMissedEmailsWithHttpInfoAsync(page, size, sort, searchFilter, since, before, inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all MissedEmails in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageMissedEmailProjection) + public async System.Threading.Tasks.Task> GetAllMissedEmailsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "MissedEmailControllerApi.GetAllMissedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/missed-emails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllMissedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all unknown missed emails in paginated format Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// PageUnknownMissedEmailProjection + public PageUnknownMissedEmailProjection GetAllUnknownMissedEmails(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllUnknownMissedEmailsWithHttpInfo(page, size, sort, searchFilter, since, before, inboxId); + return localVarResponse.Data; + } + + /// + /// Get all unknown missed emails in paginated format Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// ApiResponse of PageUnknownMissedEmailProjection + public mailslurp.Client.ApiResponse GetAllUnknownMissedEmailsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "MissedEmailControllerApi.GetAllUnknownMissedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/missed-emails/unknown", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllUnknownMissedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all unknown missed emails in paginated format Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageUnknownMissedEmailProjection + public async System.Threading.Tasks.Task GetAllUnknownMissedEmailsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllUnknownMissedEmailsWithHttpInfoAsync(page, size, sort, searchFilter, since, before, inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all unknown missed emails in paginated format Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Optional inbox ID filter (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageUnknownMissedEmailProjection) + public async System.Threading.Tasks.Task> GetAllUnknownMissedEmailsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), Guid? inboxId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + + localVarRequestOptions.Operation = "MissedEmailControllerApi.GetAllUnknownMissedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/missed-emails/unknown", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllUnknownMissedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get MissedEmail List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// MissedEmailDto + public MissedEmailDto GetMissedEmail(Guid missedEmailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetMissedEmailWithHttpInfo(missedEmailId); + return localVarResponse.Data; + } + + /// + /// Get MissedEmail List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of MissedEmailDto + public mailslurp.Client.ApiResponse GetMissedEmailWithHttpInfo(Guid missedEmailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("missedEmailId", mailslurp.Client.ClientUtils.ParameterToString(missedEmailId)); // path parameter + + localVarRequestOptions.Operation = "MissedEmailControllerApi.GetMissedEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/missed-emails/{missedEmailId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetMissedEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get MissedEmail List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of MissedEmailDto + public async System.Threading.Tasks.Task GetMissedEmailAsync(Guid missedEmailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetMissedEmailWithHttpInfoAsync(missedEmailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get MissedEmail List emails that were missed due to plan limits. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (MissedEmailDto) + public async System.Threading.Tasks.Task> GetMissedEmailWithHttpInfoAsync(Guid missedEmailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("missedEmailId", mailslurp.Client.ClientUtils.ParameterToString(missedEmailId)); // path parameter + + localVarRequestOptions.Operation = "MissedEmailControllerApi.GetMissedEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/missed-emails/{missedEmailId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetMissedEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Restore missed emails If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + public void RestoreMissedEmails(int operationIndex = 0) + { + RestoreMissedEmailsWithHttpInfo(); + } + + /// + /// Restore missed emails If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse RestoreMissedEmailsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MissedEmailControllerApi.RestoreMissedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/missed-emails/restore", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RestoreMissedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Restore missed emails If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RestoreMissedEmailsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RestoreMissedEmailsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restore missed emails If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RestoreMissedEmailsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MissedEmailControllerApi.RestoreMissedEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/missed-emails/restore", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RestoreMissedEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for Nth missed email Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// MissedEmailDto + public MissedEmailDto WaitForNthMissedEmail(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = WaitForNthMissedEmailWithHttpInfo(index, inboxId, timeout, since, before); + return localVarResponse.Data; + } + + /// + /// Wait for Nth missed email Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of MissedEmailDto + public mailslurp.Client.ApiResponse WaitForNthMissedEmailWithHttpInfo(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "index", index)); + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "MissedEmailControllerApi.WaitForNthMissedEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/missed-emails/waitForNthMissedEmail", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForNthMissedEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for Nth missed email Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of MissedEmailDto + public async System.Threading.Tasks.Task WaitForNthMissedEmailAsync(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await WaitForNthMissedEmailWithHttpInfoAsync(index, inboxId, timeout, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for Nth missed email Wait for 0 based index missed email + /// + /// Thrown when fails to make API call + /// Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (MissedEmailDto) + public async System.Threading.Tasks.Task> WaitForNthMissedEmailWithHttpInfoAsync(int index, Guid? inboxId = default(Guid?), long? timeout = default(long?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "index", index)); + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "MissedEmailControllerApi.WaitForNthMissedEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/missed-emails/waitForNthMissedEmail", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForNthMissedEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/PhoneControllerApi.cs b/src/mailslurp/Api/PhoneControllerApi.cs new file mode 100644 index 00000000..680af0aa --- /dev/null +++ b/src/mailslurp/Api/PhoneControllerApi.cs @@ -0,0 +1,1955 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPhoneControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmergencyAddress + EmergencyAddress CreateEmergencyAddress(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmergencyAddress + ApiResponse CreateEmergencyAddressWithHttpInfo(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmptyResponseDto + EmptyResponseDto DeleteEmergencyAddress(Guid addressId, int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmptyResponseDto + ApiResponse DeleteEmergencyAddressWithHttpInfo(Guid addressId, int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeletePhoneNumber(Guid phoneNumberId, int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeletePhoneNumberWithHttpInfo(Guid phoneNumberId, int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmergencyAddress + EmergencyAddress GetEmergencyAddress(Guid addressId, int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmergencyAddress + ApiResponse GetEmergencyAddressWithHttpInfo(Guid addressId, int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<EmergencyAddressDto> + List GetEmergencyAddresses(int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<EmergencyAddressDto> + ApiResponse> GetEmergencyAddressesWithHttpInfo(int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// PhoneNumberDto + PhoneNumberDto GetPhoneNumber(Guid phoneNumberId, int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of PhoneNumberDto + ApiResponse GetPhoneNumberWithHttpInfo(Guid phoneNumberId, int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PagePhoneNumberProjection + PagePhoneNumberProjection GetPhoneNumbers(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PagePhoneNumberProjection + ApiResponse GetPhoneNumbersWithHttpInfo(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<PhonePlanDto> + List GetPhonePlans(int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<PhonePlanDto> + ApiResponse> GetPhonePlansWithHttpInfo(int operationIndex = 0); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// + void TestPhoneNumberSendSms(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse TestPhoneNumberSendSmsWithHttpInfo(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPhoneControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmergencyAddress + System.Threading.Tasks.Task CreateEmergencyAddressAsync(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmergencyAddress) + System.Threading.Tasks.Task> CreateEmergencyAddressWithHttpInfoAsync(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmptyResponseDto + System.Threading.Tasks.Task DeleteEmergencyAddressAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmptyResponseDto) + System.Threading.Tasks.Task> DeleteEmergencyAddressWithHttpInfoAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeletePhoneNumberAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeletePhoneNumberWithHttpInfoAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmergencyAddress + System.Threading.Tasks.Task GetEmergencyAddressAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmergencyAddress) + System.Threading.Tasks.Task> GetEmergencyAddressWithHttpInfoAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmergencyAddressDto> + System.Threading.Tasks.Task> GetEmergencyAddressesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmergencyAddressDto>) + System.Threading.Tasks.Task>> GetEmergencyAddressesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PhoneNumberDto + System.Threading.Tasks.Task GetPhoneNumberAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PhoneNumberDto) + System.Threading.Tasks.Task> GetPhoneNumberWithHttpInfoAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PagePhoneNumberProjection + System.Threading.Tasks.Task GetPhoneNumbersAsync(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PagePhoneNumberProjection) + System.Threading.Tasks.Task> GetPhoneNumbersWithHttpInfoAsync(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<PhonePlanDto> + System.Threading.Tasks.Task> GetPhonePlansAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<PhonePlanDto>) + System.Threading.Tasks.Task>> GetPhonePlansWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestPhoneNumberSendSmsAsync(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestPhoneNumberSendSmsWithHttpInfoAsync(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPhoneControllerApi : IPhoneControllerApiSync, IPhoneControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PhoneControllerApi : IPhoneControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public PhoneControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PhoneControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public PhoneControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public PhoneControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmergencyAddress + public EmergencyAddress CreateEmergencyAddress(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateEmergencyAddressWithHttpInfo(createEmergencyAddressOptions); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmergencyAddress + public mailslurp.Client.ApiResponse CreateEmergencyAddressWithHttpInfo(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0) + { + // verify the required parameter 'createEmergencyAddressOptions' is set + if (createEmergencyAddressOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createEmergencyAddressOptions' when calling PhoneControllerApi->CreateEmergencyAddress"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createEmergencyAddressOptions; + + localVarRequestOptions.Operation = "PhoneControllerApi.CreateEmergencyAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/phone/emergency-addresses", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateEmergencyAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmergencyAddress + public async System.Threading.Tasks.Task CreateEmergencyAddressAsync(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateEmergencyAddressWithHttpInfoAsync(createEmergencyAddressOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmergencyAddress) + public async System.Threading.Tasks.Task> CreateEmergencyAddressWithHttpInfoAsync(CreateEmergencyAddressOptions createEmergencyAddressOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createEmergencyAddressOptions' is set + if (createEmergencyAddressOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createEmergencyAddressOptions' when calling PhoneControllerApi->CreateEmergencyAddress"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createEmergencyAddressOptions; + + localVarRequestOptions.Operation = "PhoneControllerApi.CreateEmergencyAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/phone/emergency-addresses", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateEmergencyAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmptyResponseDto + public EmptyResponseDto DeleteEmergencyAddress(Guid addressId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = DeleteEmergencyAddressWithHttpInfo(addressId); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmptyResponseDto + public mailslurp.Client.ApiResponse DeleteEmergencyAddressWithHttpInfo(Guid addressId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("addressId", mailslurp.Client.ClientUtils.ParameterToString(addressId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.DeleteEmergencyAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/phone/emergency-addresses/{addressId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteEmergencyAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmptyResponseDto + public async System.Threading.Tasks.Task DeleteEmergencyAddressAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await DeleteEmergencyAddressWithHttpInfoAsync(addressId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmptyResponseDto) + public async System.Threading.Tasks.Task> DeleteEmergencyAddressWithHttpInfoAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("addressId", mailslurp.Client.ClientUtils.ParameterToString(addressId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.DeleteEmergencyAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/phone/emergency-addresses/{addressId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteEmergencyAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeletePhoneNumber(Guid phoneNumberId, int operationIndex = 0) + { + DeletePhoneNumberWithHttpInfo(phoneNumberId); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeletePhoneNumberWithHttpInfo(Guid phoneNumberId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.DeletePhoneNumber"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/phone/numbers/{phoneNumberId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeletePhoneNumber", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeletePhoneNumberAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeletePhoneNumberWithHttpInfoAsync(phoneNumberId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeletePhoneNumberWithHttpInfoAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.DeletePhoneNumber"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/phone/numbers/{phoneNumberId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeletePhoneNumber", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmergencyAddress + public EmergencyAddress GetEmergencyAddress(Guid addressId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetEmergencyAddressWithHttpInfo(addressId); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmergencyAddress + public mailslurp.Client.ApiResponse GetEmergencyAddressWithHttpInfo(Guid addressId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("addressId", mailslurp.Client.ClientUtils.ParameterToString(addressId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.GetEmergencyAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/phone/emergency-addresses/{addressId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmergencyAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmergencyAddress + public async System.Threading.Tasks.Task GetEmergencyAddressAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetEmergencyAddressWithHttpInfoAsync(addressId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmergencyAddress) + public async System.Threading.Tasks.Task> GetEmergencyAddressWithHttpInfoAsync(Guid addressId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("addressId", mailslurp.Client.ClientUtils.ParameterToString(addressId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.GetEmergencyAddress"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/phone/emergency-addresses/{addressId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmergencyAddress", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<EmergencyAddressDto> + public List GetEmergencyAddresses(int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetEmergencyAddressesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<EmergencyAddressDto> + public mailslurp.Client.ApiResponse> GetEmergencyAddressesWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "PhoneControllerApi.GetEmergencyAddresses"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/phone/emergency-addresses", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmergencyAddresses", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmergencyAddressDto> + public async System.Threading.Tasks.Task> GetEmergencyAddressesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetEmergencyAddressesWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmergencyAddressDto>) + public async System.Threading.Tasks.Task>> GetEmergencyAddressesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "PhoneControllerApi.GetEmergencyAddresses"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/phone/emergency-addresses", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEmergencyAddresses", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// PhoneNumberDto + public PhoneNumberDto GetPhoneNumber(Guid phoneNumberId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetPhoneNumberWithHttpInfo(phoneNumberId); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of PhoneNumberDto + public mailslurp.Client.ApiResponse GetPhoneNumberWithHttpInfo(Guid phoneNumberId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.GetPhoneNumber"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/phone/numbers/{phoneNumberId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhoneNumber", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PhoneNumberDto + public async System.Threading.Tasks.Task GetPhoneNumberAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetPhoneNumberWithHttpInfoAsync(phoneNumberId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PhoneNumberDto) + public async System.Threading.Tasks.Task> GetPhoneNumberWithHttpInfoAsync(Guid phoneNumberId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + + localVarRequestOptions.Operation = "PhoneControllerApi.GetPhoneNumber"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/phone/numbers/{phoneNumberId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhoneNumber", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PagePhoneNumberProjection + public PagePhoneNumberProjection GetPhoneNumbers(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetPhoneNumbersWithHttpInfo(phoneCountry, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PagePhoneNumberProjection + public mailslurp.Client.ApiResponse GetPhoneNumbersWithHttpInfo(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (phoneCountry != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneCountry", phoneCountry)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "PhoneControllerApi.GetPhoneNumbers"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/phone/numbers", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhoneNumbers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PagePhoneNumberProjection + public async System.Threading.Tasks.Task GetPhoneNumbersAsync(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetPhoneNumbersWithHttpInfoAsync(phoneCountry, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Optional phone country (optional) + /// Optional page index for list pagination (optional, default to 0) + /// Optional page size for list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PagePhoneNumberProjection) + public async System.Threading.Tasks.Task> GetPhoneNumbersWithHttpInfoAsync(string phoneCountry = default(string), int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (phoneCountry != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneCountry", phoneCountry)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "PhoneControllerApi.GetPhoneNumbers"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/phone/numbers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhoneNumbers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<PhonePlanDto> + public List GetPhonePlans(int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetPhonePlansWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<PhonePlanDto> + public mailslurp.Client.ApiResponse> GetPhonePlansWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "PhoneControllerApi.GetPhonePlans"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/phone/plans", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhonePlans", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<PhonePlanDto> + public async System.Threading.Tasks.Task> GetPhonePlansAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetPhonePlansWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<PhonePlanDto>) + public async System.Threading.Tasks.Task>> GetPhonePlansWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "PhoneControllerApi.GetPhonePlans"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/phone/plans", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhonePlans", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// + public void TestPhoneNumberSendSms(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0) + { + TestPhoneNumberSendSmsWithHttpInfo(phoneNumberId, testPhoneNumberOptions, xTestId); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse TestPhoneNumberSendSmsWithHttpInfo(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0) + { + // verify the required parameter 'testPhoneNumberOptions' is set + if (testPhoneNumberOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'testPhoneNumberOptions' when calling PhoneControllerApi->TestPhoneNumberSendSms"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + if (xTestId != null) + { + localVarRequestOptions.HeaderParameters.Add("x-test-id", mailslurp.Client.ClientUtils.ParameterToString(xTestId)); // header parameter + } + localVarRequestOptions.Data = testPhoneNumberOptions; + + localVarRequestOptions.Operation = "PhoneControllerApi.TestPhoneNumberSendSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/phone/numbers/{phoneNumberId}/test", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestPhoneNumberSendSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestPhoneNumberSendSmsAsync(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestPhoneNumberSendSmsWithHttpInfoAsync(phoneNumberId, testPhoneNumberOptions, xTestId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestPhoneNumberSendSmsWithHttpInfoAsync(Guid phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, string xTestId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'testPhoneNumberOptions' is set + if (testPhoneNumberOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'testPhoneNumberOptions' when calling PhoneControllerApi->TestPhoneNumberSendSms"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + if (xTestId != null) + { + localVarRequestOptions.HeaderParameters.Add("x-test-id", mailslurp.Client.ClientUtils.ParameterToString(xTestId)); // header parameter + } + localVarRequestOptions.Data = testPhoneNumberOptions; + + localVarRequestOptions.Operation = "PhoneControllerApi.TestPhoneNumberSendSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/phone/numbers/{phoneNumberId}/test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestPhoneNumberSendSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/SentEmailsControllerApi.cs b/src/mailslurp/Api/SentEmailsControllerApi.cs new file mode 100644 index 00000000..059f1701 --- /dev/null +++ b/src/mailslurp/Api/SentEmailsControllerApi.cs @@ -0,0 +1,3856 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISentEmailsControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete all sent email receipts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + void DeleteAllSentEmails(int operationIndex = 0); + + /// + /// Delete all sent email receipts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAllSentEmailsWithHttpInfo(int operationIndex = 0); + /// + /// Delete sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteSentEmail(Guid id, int operationIndex = 0); + + /// + /// Delete sent email receipt + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteSentEmailWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// + /// + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + PageTrackingPixelProjection GetAllSentTrackingPixels(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + ApiResponse GetAllSentTrackingPixelsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// string + string GetRawSentEmailContents(Guid emailId, int operationIndex = 0); + + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse GetRawSentEmailContentsWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// RawEmailJson + RawEmailJson GetRawSentEmailJson(Guid emailId, int operationIndex = 0); + + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of RawEmailJson + ApiResponse GetRawSentEmailJsonWithHttpInfo(Guid emailId, int operationIndex = 0); + /// + /// + /// + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DeliveryStatusDto + DeliveryStatusDto GetSentDeliveryStatus(Guid deliveryId, int operationIndex = 0); + + /// + /// + /// + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DeliveryStatusDto + ApiResponse GetSentDeliveryStatusWithHttpInfo(Guid deliveryId, int operationIndex = 0); + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageDeliveryStatus + PageDeliveryStatus GetSentDeliveryStatuses(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageDeliveryStatus + ApiResponse GetSentDeliveryStatusesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageDeliveryStatus + PageDeliveryStatus GetSentDeliveryStatusesBySentId(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageDeliveryStatus + ApiResponse GetSentDeliveryStatusesBySentIdWithHttpInfo(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// SentEmailDto + SentEmailDto GetSentEmail(Guid id, int operationIndex = 0); + + /// + /// Get sent email receipt + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + ApiResponse GetSentEmailWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get sent email HTML content + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// string + string GetSentEmailHTMLContent(Guid id, int operationIndex = 0); + + /// + /// Get sent email HTML content + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse GetSentEmailHTMLContentWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// Get sent email URL for viewing in browser or downloading + /// + /// + /// Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmailPreviewUrls + EmailPreviewUrls GetSentEmailPreviewURLs(Guid id, int operationIndex = 0); + + /// + /// Get sent email URL for viewing in browser or downloading + /// + /// + /// Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmailPreviewUrls + ApiResponse GetSentEmailPreviewURLsWithHttpInfo(Guid id, int operationIndex = 0); + /// + /// + /// + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + PageTrackingPixelProjection GetSentEmailTrackingPixels(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + ApiResponse GetSentEmailTrackingPixelsWithHttpInfo(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get all sent emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageSentEmailProjection + PageSentEmailProjection GetSentEmails(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all sent emails in paginated form + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailProjection + ApiResponse GetSentEmailsWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get results of email sent with queues in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageSentEmailWithQueueProjection + PageSentEmailWithQueueProjection GetSentEmailsWithQueueResults(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get results of email sent with queues in paginated form + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailWithQueueProjection + ApiResponse GetSentEmailsWithQueueResultsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageSentEmailProjection + PageSentEmailProjection GetSentOrganizationEmails(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailProjection + ApiResponse GetSentOrganizationEmailsWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// DeliveryStatusDto + DeliveryStatusDto WaitForDeliveryStatuses(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// + /// + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of DeliveryStatusDto + ApiResponse WaitForDeliveryStatusesWithHttpInfo(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISentEmailsControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Delete all sent email receipts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAllSentEmailsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all sent email receipts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAllSentEmailsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete sent email receipt + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteSentEmailAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete sent email receipt + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteSentEmailWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + System.Threading.Tasks.Task GetAllSentTrackingPixelsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + System.Threading.Tasks.Task> GetAllSentTrackingPixelsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task GetRawSentEmailContentsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> GetRawSentEmailContentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of RawEmailJson + System.Threading.Tasks.Task GetRawSentEmailJsonAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + /// + /// + /// Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (RawEmailJson) + System.Threading.Tasks.Task> GetRawSentEmailJsonWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DeliveryStatusDto + System.Threading.Tasks.Task GetSentDeliveryStatusAsync(Guid deliveryId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeliveryStatusDto) + System.Threading.Tasks.Task> GetSentDeliveryStatusWithHttpInfoAsync(Guid deliveryId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageDeliveryStatus + System.Threading.Tasks.Task GetSentDeliveryStatusesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageDeliveryStatus) + System.Threading.Tasks.Task> GetSentDeliveryStatusesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageDeliveryStatus + System.Threading.Tasks.Task GetSentDeliveryStatusesBySentIdAsync(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageDeliveryStatus) + System.Threading.Tasks.Task> GetSentDeliveryStatusesBySentIdWithHttpInfoAsync(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get sent email receipt + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + System.Threading.Tasks.Task GetSentEmailAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get sent email receipt + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + System.Threading.Tasks.Task> GetSentEmailWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get sent email HTML content + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task GetSentEmailHTMLContentAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get sent email HTML content + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> GetSentEmailHTMLContentWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get sent email URL for viewing in browser or downloading + /// + /// + /// Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreviewUrls + System.Threading.Tasks.Task GetSentEmailPreviewURLsAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get sent email URL for viewing in browser or downloading + /// + /// + /// Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreviewUrls) + System.Threading.Tasks.Task> GetSentEmailPreviewURLsWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + System.Threading.Tasks.Task GetSentEmailTrackingPixelsAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + System.Threading.Tasks.Task> GetSentEmailTrackingPixelsWithHttpInfoAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all sent emails in paginated form + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailProjection + System.Threading.Tasks.Task GetSentEmailsAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all sent emails in paginated form + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailProjection) + System.Threading.Tasks.Task> GetSentEmailsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get results of email sent with queues in paginated form + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailWithQueueProjection + System.Threading.Tasks.Task GetSentEmailsWithQueueResultsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get results of email sent with queues in paginated form + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailWithQueueProjection) + System.Threading.Tasks.Task> GetSentEmailsWithQueueResultsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailProjection + System.Threading.Tasks.Task GetSentOrganizationEmailsAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailProjection) + System.Threading.Tasks.Task> GetSentOrganizationEmailsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DeliveryStatusDto + System.Threading.Tasks.Task WaitForDeliveryStatusesAsync(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeliveryStatusDto) + System.Threading.Tasks.Task> WaitForDeliveryStatusesWithHttpInfoAsync(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISentEmailsControllerApi : ISentEmailsControllerApiSync, ISentEmailsControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class SentEmailsControllerApi : ISentEmailsControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public SentEmailsControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public SentEmailsControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public SentEmailsControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public SentEmailsControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Delete all sent email receipts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + public void DeleteAllSentEmails(int operationIndex = 0) + { + DeleteAllSentEmailsWithHttpInfo(); + } + + /// + /// Delete all sent email receipts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAllSentEmailsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SentEmailsControllerApi.DeleteAllSentEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/sent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllSentEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all sent email receipts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAllSentEmailsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAllSentEmailsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all sent email receipts + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAllSentEmailsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SentEmailsControllerApi.DeleteAllSentEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/sent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllSentEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteSentEmail(Guid id, int operationIndex = 0) + { + DeleteSentEmailWithHttpInfo(id); + } + + /// + /// Delete sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteSentEmailWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.DeleteSentEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/sent/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteSentEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteSentEmailAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteSentEmailWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteSentEmailWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.DeleteSentEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/sent/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteSentEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + public PageTrackingPixelProjection GetAllSentTrackingPixels(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllSentTrackingPixelsWithHttpInfo(page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + public mailslurp.Client.ApiResponse GetAllSentTrackingPixelsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetAllSentTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/tracking-pixels", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllSentTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + public async System.Threading.Tasks.Task GetAllSentTrackingPixelsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllSentTrackingPixelsWithHttpInfoAsync(page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all sent email tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + public async System.Threading.Tasks.Task> GetAllSentTrackingPixelsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetAllSentTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/tracking-pixels", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllSentTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// string + public string GetRawSentEmailContents(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetRawSentEmailContentsWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse GetRawSentEmailContentsWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetRawSentEmailContents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/{emailId}/raw", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawSentEmailContents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task GetRawSentEmailContentsAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetRawSentEmailContentsWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get raw sent email string. Returns unparsed raw SMTP message with headers and body. Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> GetRawSentEmailContentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetRawSentEmailContents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/{emailId}/raw", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawSentEmailContents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// RawEmailJson + public RawEmailJson GetRawSentEmailJson(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetRawSentEmailJsonWithHttpInfo(emailId); + return localVarResponse.Data; + } + + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// ApiResponse of RawEmailJson + public mailslurp.Client.ApiResponse GetRawSentEmailJsonWithHttpInfo(Guid emailId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetRawSentEmailJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/{emailId}/raw/json", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawSentEmailJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of RawEmailJson + public async System.Threading.Tasks.Task GetRawSentEmailJsonAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetRawSentEmailJsonWithHttpInfoAsync(emailId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + /// + /// Thrown when fails to make API call + /// ID of email + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (RawEmailJson) + public async System.Threading.Tasks.Task> GetRawSentEmailJsonWithHttpInfoAsync(Guid emailId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("emailId", mailslurp.Client.ClientUtils.ParameterToString(emailId)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetRawSentEmailJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/{emailId}/raw/json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRawSentEmailJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// DeliveryStatusDto + public DeliveryStatusDto GetSentDeliveryStatus(Guid deliveryId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentDeliveryStatusWithHttpInfo(deliveryId); + return localVarResponse.Data; + } + + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of DeliveryStatusDto + public mailslurp.Client.ApiResponse GetSentDeliveryStatusWithHttpInfo(Guid deliveryId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("deliveryId", mailslurp.Client.ClientUtils.ParameterToString(deliveryId)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentDeliveryStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/delivery-status/{deliveryId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentDeliveryStatus", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DeliveryStatusDto + public async System.Threading.Tasks.Task GetSentDeliveryStatusAsync(Guid deliveryId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentDeliveryStatusWithHttpInfoAsync(deliveryId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a sent email delivery status + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeliveryStatusDto) + public async System.Threading.Tasks.Task> GetSentDeliveryStatusWithHttpInfoAsync(Guid deliveryId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("deliveryId", mailslurp.Client.ClientUtils.ParameterToString(deliveryId)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentDeliveryStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/delivery-status/{deliveryId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentDeliveryStatus", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageDeliveryStatus + public PageDeliveryStatus GetSentDeliveryStatuses(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentDeliveryStatusesWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageDeliveryStatus + public mailslurp.Client.ApiResponse GetSentDeliveryStatusesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentDeliveryStatuses"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/delivery-status", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentDeliveryStatuses", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageDeliveryStatus + public async System.Threading.Tasks.Task GetSentDeliveryStatusesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentDeliveryStatusesWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageDeliveryStatus) + public async System.Threading.Tasks.Task> GetSentDeliveryStatusesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentDeliveryStatuses"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/delivery-status", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentDeliveryStatuses", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageDeliveryStatus + public PageDeliveryStatus GetSentDeliveryStatusesBySentId(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentDeliveryStatusesBySentIdWithHttpInfo(sentId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageDeliveryStatus + public mailslurp.Client.ApiResponse GetSentDeliveryStatusesBySentIdWithHttpInfo(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("sentId", mailslurp.Client.ClientUtils.ParameterToString(sentId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentDeliveryStatusesBySentId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/{sentId}/delivery-status", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentDeliveryStatusesBySentId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageDeliveryStatus + public async System.Threading.Tasks.Task GetSentDeliveryStatusesBySentIdAsync(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentDeliveryStatusesBySentIdWithHttpInfoAsync(sentId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all sent email delivery statuses + /// + /// Thrown when fails to make API call + /// + /// Optional page index in delivery status list pagination (optional, default to 0) + /// Optional page size in delivery status list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageDeliveryStatus) + public async System.Threading.Tasks.Task> GetSentDeliveryStatusesBySentIdWithHttpInfoAsync(Guid sentId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("sentId", mailslurp.Client.ClientUtils.ParameterToString(sentId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentDeliveryStatusesBySentId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/{sentId}/delivery-status", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentDeliveryStatusesBySentId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// SentEmailDto + public SentEmailDto GetSentEmail(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentEmailWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of SentEmailDto + public mailslurp.Client.ApiResponse GetSentEmailWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SentEmailDto + public async System.Threading.Tasks.Task GetSentEmailAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentEmailWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get sent email receipt + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SentEmailDto) + public async System.Threading.Tasks.Task> GetSentEmailWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get sent email HTML content + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// string + public string GetSentEmailHTMLContent(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentEmailHTMLContentWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get sent email HTML content + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse GetSentEmailHTMLContentWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailHTMLContent"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/{id}/html", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailHTMLContent", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get sent email HTML content + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task GetSentEmailHTMLContentAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentEmailHTMLContentWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get sent email HTML content + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> GetSentEmailHTMLContentWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailHTMLContent"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/{id}/html", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailHTMLContent", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get sent email URL for viewing in browser or downloading Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// EmailPreviewUrls + public EmailPreviewUrls GetSentEmailPreviewURLs(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentEmailPreviewURLsWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get sent email URL for viewing in browser or downloading Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of EmailPreviewUrls + public mailslurp.Client.ApiResponse GetSentEmailPreviewURLsWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailPreviewURLs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/{id}/urls", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailPreviewURLs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get sent email URL for viewing in browser or downloading Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of EmailPreviewUrls + public async System.Threading.Tasks.Task GetSentEmailPreviewURLsAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentEmailPreviewURLsWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get sent email URL for viewing in browser or downloading Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (EmailPreviewUrls) + public async System.Threading.Tasks.Task> GetSentEmailPreviewURLsWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailPreviewURLs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/{id}/urls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailPreviewURLs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + public PageTrackingPixelProjection GetSentEmailTrackingPixels(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentEmailTrackingPixelsWithHttpInfo(id, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + public mailslurp.Client.ApiResponse GetSentEmailTrackingPixelsWithHttpInfo(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/{id}/tracking-pixels", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + public async System.Threading.Tasks.Task GetSentEmailTrackingPixelsAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentEmailTrackingPixelsWithHttpInfoAsync(id, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all tracking pixels for a sent email in paginated form + /// + /// Thrown when fails to make API call + /// + /// Optional page index in sent email tracking pixel list pagination (optional, default to 0) + /// Optional page size in sent email tracking pixel list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + public async System.Threading.Tasks.Task> GetSentEmailTrackingPixelsWithHttpInfoAsync(Guid id, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/{id}/tracking-pixels", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageSentEmailProjection + public PageSentEmailProjection GetSentEmails(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get all sent emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailProjection + public mailslurp.Client.ApiResponse GetSentEmailsWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailProjection + public async System.Threading.Tasks.Task GetSentEmailsAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentEmailsWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all sent emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailProjection) + public async System.Threading.Tasks.Task> GetSentEmailsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get results of email sent with queues in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageSentEmailWithQueueProjection + public PageSentEmailWithQueueProjection GetSentEmailsWithQueueResults(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentEmailsWithQueueResultsWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get results of email sent with queues in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailWithQueueProjection + public mailslurp.Client.ApiResponse GetSentEmailsWithQueueResultsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailsWithQueueResults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/queue-results", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailsWithQueueResults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get results of email sent with queues in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailWithQueueProjection + public async System.Threading.Tasks.Task GetSentEmailsWithQueueResultsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentEmailsWithQueueResultsWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get results of email sent with queues in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in inbox sent email list pagination (optional, default to 0) + /// Optional page size in inbox sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailWithQueueProjection) + public async System.Threading.Tasks.Task> GetSentEmailsWithQueueResultsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentEmailsWithQueueResults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/queue-results", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentEmailsWithQueueResults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageSentEmailProjection + public PageSentEmailProjection GetSentOrganizationEmails(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSentOrganizationEmailsWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageSentEmailProjection + public mailslurp.Client.ApiResponse GetSentOrganizationEmailsWithHttpInfo(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentOrganizationEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/organization", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentOrganizationEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSentEmailProjection + public async System.Threading.Tasks.Task GetSentOrganizationEmailsAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSentOrganizationEmailsWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all sent organization emails in paginated form + /// + /// Thrown when fails to make API call + /// Optional inboxId to filter sender of sent emails by (optional) + /// Optional page index in sent email list pagination (optional, default to 0) + /// Optional page size in sent email list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSentEmailProjection) + public async System.Threading.Tasks.Task> GetSentOrganizationEmailsWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.GetSentOrganizationEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/organization", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSentOrganizationEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// DeliveryStatusDto + public DeliveryStatusDto WaitForDeliveryStatuses(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = WaitForDeliveryStatusesWithHttpInfo(sentId, inboxId, timeout, index, since, before); + return localVarResponse.Data; + } + + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of DeliveryStatusDto + public mailslurp.Client.ApiResponse WaitForDeliveryStatusesWithHttpInfo(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (sentId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sentId", sentId)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (index != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "index", index)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.WaitForDeliveryStatuses"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sent/delivery-status/wait-for", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForDeliveryStatuses", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DeliveryStatusDto + public async System.Threading.Tasks.Task WaitForDeliveryStatusesAsync(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await WaitForDeliveryStatusesWithHttpInfoAsync(sentId, inboxId, timeout, index, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for delivery statuses + /// + /// Thrown when fails to make API call + /// Optional sent email ID filter (optional) + /// Optional inbox ID filter (optional) + /// Optional timeout milliseconds (optional) + /// Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeliveryStatusDto) + public async System.Threading.Tasks.Task> WaitForDeliveryStatusesWithHttpInfoAsync(Guid? sentId = default(Guid?), Guid? inboxId = default(Guid?), long? timeout = default(long?), int? index = default(int?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (sentId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sentId", sentId)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (index != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "index", index)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SentEmailsControllerApi.WaitForDeliveryStatuses"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sent/delivery-status/wait-for", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForDeliveryStatuses", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/SmsControllerApi.cs b/src/mailslurp/Api/SmsControllerApi.cs new file mode 100644 index 00000000..0a5431f6 --- /dev/null +++ b/src/mailslurp/Api/SmsControllerApi.cs @@ -0,0 +1,1020 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISmsControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete SMS message. + /// + /// + /// Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteSmsMessage(Guid smsId, int operationIndex = 0); + + /// + /// Delete SMS message. + /// + /// + /// Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteSmsMessageWithHttpInfo(Guid smsId, int operationIndex = 0); + /// + /// Delete all SMS messages + /// + /// + /// Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// + void DeleteSmsMessages(Guid? phoneNumberId = default(Guid?), int operationIndex = 0); + + /// + /// Delete all SMS messages + /// + /// + /// Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteSmsMessagesWithHttpInfo(Guid? phoneNumberId = default(Guid?), int operationIndex = 0); + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// SmsDto + SmsDto GetSmsMessage(Guid smsId, int operationIndex = 0); + + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of SmsDto + ApiResponse GetSmsMessageWithHttpInfo(Guid smsId, int operationIndex = 0); + /// + /// Get all SMS messages in all phone numbers in paginated form. . + /// + /// + /// By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// PageSmsProjection + PageSmsProjection GetSmsMessagesPaginated(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get all SMS messages in all phone numbers in paginated form. . + /// + /// + /// By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageSmsProjection + ApiResponse GetSmsMessagesPaginatedWithHttpInfo(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISmsControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Delete SMS message. + /// + /// + /// Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteSmsMessageAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete SMS message. + /// + /// + /// Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteSmsMessageWithHttpInfoAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete all SMS messages + /// + /// + /// Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteSmsMessagesAsync(Guid? phoneNumberId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all SMS messages + /// + /// + /// Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteSmsMessagesWithHttpInfoAsync(Guid? phoneNumberId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SmsDto + System.Threading.Tasks.Task GetSmsMessageAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + /// + /// + /// Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SmsDto) + System.Threading.Tasks.Task> GetSmsMessageWithHttpInfoAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all SMS messages in all phone numbers in paginated form. . + /// + /// + /// By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSmsProjection + System.Threading.Tasks.Task GetSmsMessagesPaginatedAsync(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all SMS messages in all phone numbers in paginated form. . + /// + /// + /// By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSmsProjection) + System.Threading.Tasks.Task> GetSmsMessagesPaginatedWithHttpInfoAsync(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISmsControllerApi : ISmsControllerApiSync, ISmsControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class SmsControllerApi : ISmsControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public SmsControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public SmsControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public SmsControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public SmsControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Delete SMS message. Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteSmsMessage(Guid smsId, int operationIndex = 0) + { + DeleteSmsMessageWithHttpInfo(smsId); + } + + /// + /// Delete SMS message. Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteSmsMessageWithHttpInfo(Guid smsId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("smsId", mailslurp.Client.ClientUtils.ParameterToString(smsId)); // path parameter + + localVarRequestOptions.Operation = "SmsControllerApi.DeleteSmsMessage"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/sms/{smsId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteSmsMessage", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete SMS message. Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteSmsMessageAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteSmsMessageWithHttpInfoAsync(smsId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete SMS message. Delete an SMS message + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteSmsMessageWithHttpInfoAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("smsId", mailslurp.Client.ClientUtils.ParameterToString(smsId)); // path parameter + + localVarRequestOptions.Operation = "SmsControllerApi.DeleteSmsMessage"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/sms/{smsId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteSmsMessage", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all SMS messages Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// + public void DeleteSmsMessages(Guid? phoneNumberId = default(Guid?), int operationIndex = 0) + { + DeleteSmsMessagesWithHttpInfo(phoneNumberId); + } + + /// + /// Delete all SMS messages Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteSmsMessagesWithHttpInfo(Guid? phoneNumberId = default(Guid?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (phoneNumberId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneNumberId", phoneNumberId)); + } + + localVarRequestOptions.Operation = "SmsControllerApi.DeleteSmsMessages"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/sms", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteSmsMessages", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all SMS messages Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteSmsMessagesAsync(Guid? phoneNumberId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteSmsMessagesWithHttpInfoAsync(phoneNumberId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all SMS messages Delete all SMS messages or all messages for a given phone number + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteSmsMessagesWithHttpInfoAsync(Guid? phoneNumberId = default(Guid?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (phoneNumberId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneNumberId", phoneNumberId)); + } + + localVarRequestOptions.Operation = "SmsControllerApi.DeleteSmsMessages"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/sms", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteSmsMessages", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// SmsDto + public SmsDto GetSmsMessage(Guid smsId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSmsMessageWithHttpInfo(smsId); + return localVarResponse.Data; + } + + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of SmsDto + public mailslurp.Client.ApiResponse GetSmsMessageWithHttpInfo(Guid smsId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("smsId", mailslurp.Client.ClientUtils.ParameterToString(smsId)); // path parameter + + localVarRequestOptions.Operation = "SmsControllerApi.GetSmsMessage"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sms/{smsId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSmsMessage", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SmsDto + public async System.Threading.Tasks.Task GetSmsMessageAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSmsMessageWithHttpInfoAsync(smsId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SmsDto) + public async System.Threading.Tasks.Task> GetSmsMessageWithHttpInfoAsync(Guid smsId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("smsId", mailslurp.Client.ClientUtils.ParameterToString(smsId)); // path parameter + + localVarRequestOptions.Operation = "SmsControllerApi.GetSmsMessage"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sms/{smsId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSmsMessage", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// PageSmsProjection + public PageSmsProjection GetSmsMessagesPaginated(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetSmsMessagesPaginatedWithHttpInfo(phoneNumber, page, size, sort, unreadOnly, since, before); + return localVarResponse.Data; + } + + /// + /// Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// ApiResponse of PageSmsProjection + public mailslurp.Client.ApiResponse GetSmsMessagesPaginatedWithHttpInfo(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (phoneNumber != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SmsControllerApi.GetSmsMessagesPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/sms", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSmsMessagesPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageSmsProjection + public async System.Threading.Tasks.Task GetSmsMessagesPaginatedAsync(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetSmsMessagesPaginatedWithHttpInfoAsync(phoneNumber, page, size, sort, unreadOnly, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + /// + /// Thrown when fails to make API call + /// Optional receiving phone number to filter SMS messages for (optional) + /// Optional page index in SMS list pagination (optional, default to 0) + /// Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) + /// Optional filter SMSs received after given date time (optional) + /// Optional filter SMSs received before given date time (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageSmsProjection) + public async System.Threading.Tasks.Task> GetSmsMessagesPaginatedWithHttpInfoAsync(Guid? phoneNumber = default(Guid?), int? page = default(int?), int? size = default(int?), string sort = default(string), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (phoneNumber != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "SmsControllerApi.GetSmsMessagesPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/sms", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetSmsMessagesPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/TemplateControllerApi.cs b/src/mailslurp/Api/TemplateControllerApi.cs new file mode 100644 index 00000000..2194c25a --- /dev/null +++ b/src/mailslurp/Api/TemplateControllerApi.cs @@ -0,0 +1,1776 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITemplateControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a Template + /// + /// + /// Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// TemplateDto + TemplateDto CreateTemplate(CreateTemplateOptions createTemplateOptions, int operationIndex = 0); + + /// + /// Create a Template + /// + /// + /// Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of TemplateDto + ApiResponse CreateTemplateWithHttpInfo(CreateTemplateOptions createTemplateOptions, int operationIndex = 0); + /// + /// Delete email template + /// + /// + /// Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// + void DeleteTemplate(Guid templateId, int operationIndex = 0); + + /// + /// Delete email template + /// + /// + /// Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteTemplateWithHttpInfo(Guid templateId, int operationIndex = 0); + /// + /// List templates + /// + /// + /// Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTemplateProjection + PageTemplateProjection GetAllTemplates(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List templates + /// + /// + /// Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTemplateProjection + ApiResponse GetAllTemplatesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get template + /// + /// + /// Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// TemplateDto + TemplateDto GetTemplate(Guid templateId, int operationIndex = 0); + + /// + /// Get template + /// + /// + /// Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of TemplateDto + ApiResponse GetTemplateWithHttpInfo(Guid templateId, int operationIndex = 0); + /// + /// Get template preview HTML + /// + /// + /// Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// string + string GetTemplatePreviewHtml(Guid templateId, int operationIndex = 0); + + /// + /// Get template preview HTML + /// + /// + /// Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse GetTemplatePreviewHtmlWithHttpInfo(Guid templateId, int operationIndex = 0); + /// + /// Get template preview Json + /// + /// + /// Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// TemplatePreview + TemplatePreview GetTemplatePreviewJson(Guid templateId, int operationIndex = 0); + + /// + /// Get template preview Json + /// + /// + /// Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of TemplatePreview + ApiResponse GetTemplatePreviewJsonWithHttpInfo(Guid templateId, int operationIndex = 0); + /// + /// List templates + /// + /// + /// Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<TemplateProjection> + List GetTemplates(int operationIndex = 0); + + /// + /// List templates + /// + /// + /// Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<TemplateProjection> + ApiResponse> GetTemplatesWithHttpInfo(int operationIndex = 0); + /// + /// Update template + /// + /// + /// Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// TemplateDto + TemplateDto UpdateTemplate(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0); + + /// + /// Update template + /// + /// + /// Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// ApiResponse of TemplateDto + ApiResponse UpdateTemplateWithHttpInfo(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITemplateControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create a Template + /// + /// + /// Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplateDto + System.Threading.Tasks.Task CreateTemplateAsync(CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create a Template + /// + /// + /// Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplateDto) + System.Threading.Tasks.Task> CreateTemplateWithHttpInfoAsync(CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete email template + /// + /// + /// Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteTemplateAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete email template + /// + /// + /// Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteTemplateWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List templates + /// + /// + /// Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTemplateProjection + System.Threading.Tasks.Task GetAllTemplatesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List templates + /// + /// + /// Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTemplateProjection) + System.Threading.Tasks.Task> GetAllTemplatesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get template + /// + /// + /// Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplateDto + System.Threading.Tasks.Task GetTemplateAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get template + /// + /// + /// Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplateDto) + System.Threading.Tasks.Task> GetTemplateWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get template preview HTML + /// + /// + /// Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task GetTemplatePreviewHtmlAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get template preview HTML + /// + /// + /// Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> GetTemplatePreviewHtmlWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get template preview Json + /// + /// + /// Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplatePreview + System.Threading.Tasks.Task GetTemplatePreviewJsonAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get template preview Json + /// + /// + /// Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplatePreview) + System.Threading.Tasks.Task> GetTemplatePreviewJsonWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List templates + /// + /// + /// Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<TemplateProjection> + System.Threading.Tasks.Task> GetTemplatesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List templates + /// + /// + /// Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<TemplateProjection>) + System.Threading.Tasks.Task>> GetTemplatesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update template + /// + /// + /// Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplateDto + System.Threading.Tasks.Task UpdateTemplateAsync(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update template + /// + /// + /// Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplateDto) + System.Threading.Tasks.Task> UpdateTemplateWithHttpInfoAsync(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITemplateControllerApi : ITemplateControllerApiSync, ITemplateControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class TemplateControllerApi : ITemplateControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public TemplateControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public TemplateControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public TemplateControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public TemplateControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create a Template Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// TemplateDto + public TemplateDto CreateTemplate(CreateTemplateOptions createTemplateOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateTemplateWithHttpInfo(createTemplateOptions); + return localVarResponse.Data; + } + + /// + /// Create a Template Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of TemplateDto + public mailslurp.Client.ApiResponse CreateTemplateWithHttpInfo(CreateTemplateOptions createTemplateOptions, int operationIndex = 0) + { + // verify the required parameter 'createTemplateOptions' is set + if (createTemplateOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createTemplateOptions' when calling TemplateControllerApi->CreateTemplate"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createTemplateOptions; + + localVarRequestOptions.Operation = "TemplateControllerApi.CreateTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/templates", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create a Template Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplateDto + public async System.Threading.Tasks.Task CreateTemplateAsync(CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateTemplateWithHttpInfoAsync(createTemplateOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create a Template Create an email template with variables for use with templated transactional emails. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplateDto) + public async System.Threading.Tasks.Task> CreateTemplateWithHttpInfoAsync(CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createTemplateOptions' is set + if (createTemplateOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createTemplateOptions' when calling TemplateControllerApi->CreateTemplate"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createTemplateOptions; + + localVarRequestOptions.Operation = "TemplateControllerApi.CreateTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/templates", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete email template Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// + public void DeleteTemplate(Guid templateId, int operationIndex = 0) + { + DeleteTemplateWithHttpInfo(templateId); + } + + /// + /// Delete email template Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteTemplateWithHttpInfo(Guid templateId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.DeleteTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/templates/{templateId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete email template Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteTemplateAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteTemplateWithHttpInfoAsync(templateId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete email template Delete template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteTemplateWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.DeleteTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/templates/{templateId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List templates Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTemplateProjection + public PageTemplateProjection GetAllTemplates(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllTemplatesWithHttpInfo(page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// List templates Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTemplateProjection + public mailslurp.Client.ApiResponse GetAllTemplatesWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "TemplateControllerApi.GetAllTemplates"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/templates/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllTemplates", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List templates Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTemplateProjection + public async System.Threading.Tasks.Task GetAllTemplatesAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllTemplatesWithHttpInfoAsync(page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List templates Get all templates in paginated format + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTemplateProjection) + public async System.Threading.Tasks.Task> GetAllTemplatesWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "TemplateControllerApi.GetAllTemplates"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/templates/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllTemplates", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get template Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// TemplateDto + public TemplateDto GetTemplate(Guid templateId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTemplateWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Get template Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of TemplateDto + public mailslurp.Client.ApiResponse GetTemplateWithHttpInfo(Guid templateId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/templates/{templateId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get template Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplateDto + public async System.Threading.Tasks.Task GetTemplateAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTemplateWithHttpInfoAsync(templateId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get template Get email template + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplateDto) + public async System.Threading.Tasks.Task> GetTemplateWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/templates/{templateId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// string + public string GetTemplatePreviewHtml(Guid templateId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTemplatePreviewHtmlWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of string + public mailslurp.Client.ApiResponse GetTemplatePreviewHtmlWithHttpInfo(Guid templateId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/html;charset=utf-8", + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplatePreviewHtml"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/templates/{templateId}/preview/html", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplatePreviewHtml", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task GetTemplatePreviewHtmlAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTemplatePreviewHtmlWithHttpInfoAsync(templateId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> GetTemplatePreviewHtmlWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/html;charset=utf-8", + "text/html" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplatePreviewHtml"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/templates/{templateId}/preview/html", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplatePreviewHtml", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// TemplatePreview + public TemplatePreview GetTemplatePreviewJson(Guid templateId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTemplatePreviewJsonWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// ApiResponse of TemplatePreview + public mailslurp.Client.ApiResponse GetTemplatePreviewJsonWithHttpInfo(Guid templateId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplatePreviewJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/templates/{templateId}/preview/json", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplatePreviewJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplatePreview + public async System.Threading.Tasks.Task GetTemplatePreviewJsonAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTemplatePreviewJsonWithHttpInfoAsync(templateId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params. + /// + /// Thrown when fails to make API call + /// Template ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplatePreview) + public async System.Threading.Tasks.Task> GetTemplatePreviewJsonWithHttpInfoAsync(Guid templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplatePreviewJson"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/templates/{templateId}/preview/json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplatePreviewJson", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List templates Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<TemplateProjection> + public List GetTemplates(int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetTemplatesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// List templates Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<TemplateProjection> + public mailslurp.Client.ApiResponse> GetTemplatesWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplates"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/templates", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplates", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List templates Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<TemplateProjection> + public async System.Threading.Tasks.Task> GetTemplatesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetTemplatesWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List templates Get all templates + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<TemplateProjection>) + public async System.Threading.Tasks.Task>> GetTemplatesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "TemplateControllerApi.GetTemplates"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/templates", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTemplates", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update template Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// TemplateDto + public TemplateDto UpdateTemplate(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = UpdateTemplateWithHttpInfo(templateId, createTemplateOptions); + return localVarResponse.Data; + } + + /// + /// Update template Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// ApiResponse of TemplateDto + public mailslurp.Client.ApiResponse UpdateTemplateWithHttpInfo(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0) + { + // verify the required parameter 'createTemplateOptions' is set + if (createTemplateOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createTemplateOptions' when calling TemplateControllerApi->UpdateTemplate"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Data = createTemplateOptions; + + localVarRequestOptions.Operation = "TemplateControllerApi.UpdateTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/templates/{templateId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update template Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TemplateDto + public async System.Threading.Tasks.Task UpdateTemplateAsync(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await UpdateTemplateWithHttpInfoAsync(templateId, createTemplateOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update template Update email template + /// + /// Thrown when fails to make API call + /// Template ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TemplateDto) + public async System.Threading.Tasks.Task> UpdateTemplateWithHttpInfoAsync(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createTemplateOptions' is set + if (createTemplateOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createTemplateOptions' when calling TemplateControllerApi->UpdateTemplate"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("templateId", mailslurp.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Data = createTemplateOptions; + + localVarRequestOptions.Operation = "TemplateControllerApi.UpdateTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/templates/{templateId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/TrackingControllerApi.cs b/src/mailslurp/Api/TrackingControllerApi.cs new file mode 100644 index 00000000..13db0859 --- /dev/null +++ b/src/mailslurp/Api/TrackingControllerApi.cs @@ -0,0 +1,827 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITrackingControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create tracking pixel + /// + /// + /// Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// TrackingPixelDto + TrackingPixelDto CreateTrackingPixel(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0); + + /// + /// Create tracking pixel + /// + /// + /// Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of TrackingPixelDto + ApiResponse CreateTrackingPixelWithHttpInfo(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0); + /// + /// Get tracking pixels + /// + /// + /// List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + PageTrackingPixelProjection GetAllTrackingPixels(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get tracking pixels + /// + /// + /// List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + ApiResponse GetAllTrackingPixelsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get pixel + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// TrackingPixelDto + TrackingPixelDto GetTrackingPixel(Guid id, int operationIndex = 0); + + /// + /// Get pixel + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of TrackingPixelDto + ApiResponse GetTrackingPixelWithHttpInfo(Guid id, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITrackingControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create tracking pixel + /// + /// + /// Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TrackingPixelDto + System.Threading.Tasks.Task CreateTrackingPixelAsync(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create tracking pixel + /// + /// + /// Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TrackingPixelDto) + System.Threading.Tasks.Task> CreateTrackingPixelWithHttpInfoAsync(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get tracking pixels + /// + /// + /// List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + System.Threading.Tasks.Task GetAllTrackingPixelsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get tracking pixels + /// + /// + /// List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + System.Threading.Tasks.Task> GetAllTrackingPixelsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get pixel + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TrackingPixelDto + System.Threading.Tasks.Task GetTrackingPixelAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get pixel + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TrackingPixelDto) + System.Threading.Tasks.Task> GetTrackingPixelWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITrackingControllerApi : ITrackingControllerApiSync, ITrackingControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class TrackingControllerApi : ITrackingControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public TrackingControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public TrackingControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public TrackingControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public TrackingControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create tracking pixel Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// TrackingPixelDto + public TrackingPixelDto CreateTrackingPixel(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateTrackingPixelWithHttpInfo(createTrackingPixelOptions); + return localVarResponse.Data; + } + + /// + /// Create tracking pixel Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of TrackingPixelDto + public mailslurp.Client.ApiResponse CreateTrackingPixelWithHttpInfo(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0) + { + // verify the required parameter 'createTrackingPixelOptions' is set + if (createTrackingPixelOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createTrackingPixelOptions' when calling TrackingControllerApi->CreateTrackingPixel"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createTrackingPixelOptions; + + localVarRequestOptions.Operation = "TrackingControllerApi.CreateTrackingPixel"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/tracking/pixels", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateTrackingPixel", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create tracking pixel Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TrackingPixelDto + public async System.Threading.Tasks.Task CreateTrackingPixelAsync(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateTrackingPixelWithHttpInfoAsync(createTrackingPixelOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create tracking pixel Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TrackingPixelDto) + public async System.Threading.Tasks.Task> CreateTrackingPixelWithHttpInfoAsync(CreateTrackingPixelOptions createTrackingPixelOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createTrackingPixelOptions' is set + if (createTrackingPixelOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createTrackingPixelOptions' when calling TrackingControllerApi->CreateTrackingPixel"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createTrackingPixelOptions; + + localVarRequestOptions.Operation = "TrackingControllerApi.CreateTrackingPixel"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/tracking/pixels", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateTrackingPixel", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get tracking pixels List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageTrackingPixelProjection + public PageTrackingPixelProjection GetAllTrackingPixels(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllTrackingPixelsWithHttpInfo(page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get tracking pixels List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageTrackingPixelProjection + public mailslurp.Client.ApiResponse GetAllTrackingPixelsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "TrackingControllerApi.GetAllTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/tracking/pixels", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get tracking pixels List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageTrackingPixelProjection + public async System.Threading.Tasks.Task GetAllTrackingPixelsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllTrackingPixelsWithHttpInfoAsync(page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get tracking pixels List tracking pixels in paginated form + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageTrackingPixelProjection) + public async System.Threading.Tasks.Task> GetAllTrackingPixelsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "TrackingControllerApi.GetAllTrackingPixels"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/tracking/pixels", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllTrackingPixels", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get pixel + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// TrackingPixelDto + public TrackingPixelDto GetTrackingPixel(Guid id, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTrackingPixelWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get pixel + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of TrackingPixelDto + public mailslurp.Client.ApiResponse GetTrackingPixelWithHttpInfo(Guid id, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "TrackingControllerApi.GetTrackingPixel"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/tracking/pixels/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTrackingPixel", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get pixel + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TrackingPixelDto + public async System.Threading.Tasks.Task GetTrackingPixelAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTrackingPixelWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get pixel + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TrackingPixelDto) + public async System.Threading.Tasks.Task> GetTrackingPixelWithHttpInfoAsync(Guid id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", mailslurp.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "TrackingControllerApi.GetTrackingPixel"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/tracking/pixels/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTrackingPixel", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/WaitForControllerApi.cs b/src/mailslurp/Api/WaitForControllerApi.cs new file mode 100644 index 00000000..21e8d67b --- /dev/null +++ b/src/mailslurp/Api/WaitForControllerApi.cs @@ -0,0 +1,2298 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWaitForControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. + /// + /// + /// Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<EmailPreview> + List WaitFor(WaitForConditions waitForConditions, int operationIndex = 0); + + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. + /// + /// + /// Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + ApiResponse> WaitForWithHttpInfo(WaitForConditions waitForConditions, int operationIndex = 0); + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + /// + /// + /// If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// List<EmailPreview> + List WaitForEmailCount(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + /// + /// + /// If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + ApiResponse> WaitForEmailCountWithHttpInfo(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive + /// + /// + /// Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Email + Email WaitForLatestEmail(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive + /// + /// + /// Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of Email + ApiResponse WaitForLatestEmailWithHttpInfo(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// SmsDto + SmsDto WaitForLatestSms(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0); + + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of SmsDto + ApiResponse WaitForLatestSmsWithHttpInfo(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0); + /// + /// Wait or return list of emails that match simple matching patterns + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// List<EmailPreview> + List WaitForMatchingEmails(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0); + + /// + /// Wait or return list of emails that match simple matching patterns + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + ApiResponse> WaitForMatchingEmailsWithHttpInfo(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0); + /// + /// Wait for or return the first email that matches provided MatchOptions array + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Email + Email WaitForMatchingFirstEmail(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + + /// + /// Wait for or return the first email that matches provided MatchOptions array + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of Email + ApiResponse WaitForMatchingFirstEmailWithHttpInfo(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + /// + /// + /// If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Email + Email WaitForNthEmail(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + /// + /// + /// If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of Email + ApiResponse WaitForNthEmailWithHttpInfo(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0); + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<SmsPreview> + List WaitForSms(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0); + + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<SmsPreview> + ApiResponse> WaitForSmsWithHttpInfo(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWaitForControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. + /// + /// + /// Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + System.Threading.Tasks.Task> WaitForAsync(WaitForConditions waitForConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. + /// + /// + /// Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + System.Threading.Tasks.Task>> WaitForWithHttpInfoAsync(WaitForConditions waitForConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + /// + /// + /// If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + System.Threading.Tasks.Task> WaitForEmailCountAsync(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + /// + /// + /// If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + System.Threading.Tasks.Task>> WaitForEmailCountWithHttpInfoAsync(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive + /// + /// + /// Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + System.Threading.Tasks.Task WaitForLatestEmailAsync(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive + /// + /// + /// Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + System.Threading.Tasks.Task> WaitForLatestEmailWithHttpInfoAsync(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SmsDto + System.Threading.Tasks.Task WaitForLatestSmsAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SmsDto) + System.Threading.Tasks.Task> WaitForLatestSmsWithHttpInfoAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Wait or return list of emails that match simple matching patterns + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + System.Threading.Tasks.Task> WaitForMatchingEmailsAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait or return list of emails that match simple matching patterns + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + System.Threading.Tasks.Task>> WaitForMatchingEmailsWithHttpInfoAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Wait for or return the first email that matches provided MatchOptions array + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + System.Threading.Tasks.Task WaitForMatchingFirstEmailAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait for or return the first email that matches provided MatchOptions array + /// + /// + /// Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + System.Threading.Tasks.Task> WaitForMatchingFirstEmailWithHttpInfoAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + /// + /// + /// If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + System.Threading.Tasks.Task WaitForNthEmailAsync(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + /// + /// + /// If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + System.Threading.Tasks.Task> WaitForNthEmailWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<SmsPreview> + System.Threading.Tasks.Task> WaitForSmsAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. + /// + /// + /// Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<SmsPreview>) + System.Threading.Tasks.Task>> WaitForSmsWithHttpInfoAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWaitForControllerApi : IWaitForControllerApiSync, IWaitForControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class WaitForControllerApi : IWaitForControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public WaitForControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public WaitForControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public WaitForControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public WaitForControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<EmailPreview> + public List WaitFor(WaitForConditions waitForConditions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = WaitForWithHttpInfo(waitForConditions); + return localVarResponse.Data; + } + + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + public mailslurp.Client.ApiResponse> WaitForWithHttpInfo(WaitForConditions waitForConditions, int operationIndex = 0) + { + // verify the required parameter 'waitForConditions' is set + if (waitForConditions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'waitForConditions' when calling WaitForControllerApi->WaitFor"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = waitForConditions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitFor"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post>("/waitFor", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitFor", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + public async System.Threading.Tasks.Task> WaitForAsync(WaitForConditions waitForConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await WaitForWithHttpInfoAsync(waitForConditions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + public async System.Threading.Tasks.Task>> WaitForWithHttpInfoAsync(WaitForConditions waitForConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'waitForConditions' is set + if (waitForConditions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'waitForConditions' when calling WaitForControllerApi->WaitFor"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = waitForConditions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitFor"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync>("/waitFor", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitFor", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// List<EmailPreview> + public List WaitForEmailCount(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = WaitForEmailCountWithHttpInfo(inboxId, count, timeout, unreadOnly, before, since, sort, delay); + return localVarResponse.Data; + } + + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + public mailslurp.Client.ApiResponse> WaitForEmailCountWithHttpInfo(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "count", count)); + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/waitForEmailCount", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + public async System.Threading.Tasks.Task> WaitForEmailCountAsync(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await WaitForEmailCountWithHttpInfoAsync(inboxId, count, timeout, unreadOnly, before, since, sort, delay, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater that 1 + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + public async System.Threading.Tasks.Task>> WaitForEmailCountWithHttpInfoAsync(Guid inboxId, int count, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "count", count)); + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForEmailCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/waitForEmailCount", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForEmailCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Email + public Email WaitForLatestEmail(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = WaitForLatestEmailWithHttpInfo(inboxId, timeout, unreadOnly, before, since, sort, delay); + return localVarResponse.Data; + } + + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of Email + public mailslurp.Client.ApiResponse WaitForLatestEmailWithHttpInfo(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForLatestEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/waitForLatestEmail", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForLatestEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + public async System.Threading.Tasks.Task WaitForLatestEmailAsync(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await WaitForLatestEmailWithHttpInfoAsync(inboxId, timeout, unreadOnly, before, since, sort, delay, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only. (optional, default to false) + /// Filter for emails that were before after the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + public async System.Threading.Tasks.Task> WaitForLatestEmailWithHttpInfoAsync(Guid? inboxId = default(Guid?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForLatestEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/waitForLatestEmail", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForLatestEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// SmsDto + public SmsDto WaitForLatestSms(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = WaitForLatestSmsWithHttpInfo(waitForSingleSmsOptions); + return localVarResponse.Data; + } + + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of SmsDto + public mailslurp.Client.ApiResponse WaitForLatestSmsWithHttpInfo(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0) + { + // verify the required parameter 'waitForSingleSmsOptions' is set + if (waitForSingleSmsOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'waitForSingleSmsOptions' when calling WaitForControllerApi->WaitForLatestSms"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = waitForSingleSmsOptions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForLatestSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/waitForLatestSms", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForLatestSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SmsDto + public async System.Threading.Tasks.Task WaitForLatestSmsAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await WaitForLatestSmsWithHttpInfoAsync(waitForSingleSmsOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SmsDto) + public async System.Threading.Tasks.Task> WaitForLatestSmsWithHttpInfoAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'waitForSingleSmsOptions' is set + if (waitForSingleSmsOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'waitForSingleSmsOptions' when calling WaitForControllerApi->WaitForLatestSms"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = waitForSingleSmsOptions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForLatestSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/waitForLatestSms", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForLatestSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// List<EmailPreview> + public List WaitForMatchingEmails(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = WaitForMatchingEmailsWithHttpInfo(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly); + return localVarResponse.Data; + } + + /// + /// Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// ApiResponse of List<EmailPreview> + public mailslurp.Client.ApiResponse> WaitForMatchingEmailsWithHttpInfo(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0) + { + // verify the required parameter 'matchOptions' is set + if (matchOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'matchOptions' when calling WaitForControllerApi->WaitForMatchingEmails"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "count", count)); + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + localVarRequestOptions.Data = matchOptions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForMatchingEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post>("/waitForMatchingEmails", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForMatchingEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<EmailPreview> + public async System.Threading.Tasks.Task> WaitForMatchingEmailsAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await WaitForMatchingEmailsWithHttpInfoAsync(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are fetching emails from + /// Number of emails to wait for. Must be greater or equal to 1 + /// + /// Filter for emails that were received before the given timestamp (optional) + /// Filter for emails that were received after the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<EmailPreview>) + public async System.Threading.Tasks.Task>> WaitForMatchingEmailsWithHttpInfoAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = default(DateTime?), DateTime? since = default(DateTime?), string sort = default(string), long? delay = default(long?), long? timeout = default(long?), bool? unreadOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'matchOptions' is set + if (matchOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'matchOptions' when calling WaitForControllerApi->WaitForMatchingEmails"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "count", count)); + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + localVarRequestOptions.Data = matchOptions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForMatchingEmails"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync>("/waitForMatchingEmails", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForMatchingEmails", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Email + public Email WaitForMatchingFirstEmail(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = WaitForMatchingFirstEmailWithHttpInfo(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay); + return localVarResponse.Data; + } + + /// + /// Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of Email + public mailslurp.Client.ApiResponse WaitForMatchingFirstEmailWithHttpInfo(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + // verify the required parameter 'matchOptions' is set + if (matchOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'matchOptions' when calling WaitForControllerApi->WaitForMatchingFirstEmail"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + localVarRequestOptions.Data = matchOptions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForMatchingFirstEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/waitForMatchingFirstEmail", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForMatchingFirstEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + public async System.Threading.Tasks.Task WaitForMatchingFirstEmailAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await WaitForMatchingFirstEmailWithHttpInfoAsync(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + /// + /// Thrown when fails to make API call + /// Id of the inbox we are matching an email for + /// + /// Max milliseconds to wait (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + public async System.Threading.Tasks.Task> WaitForMatchingFirstEmailWithHttpInfoAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'matchOptions' is set + if (matchOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'matchOptions' when calling WaitForControllerApi->WaitForMatchingFirstEmail"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + localVarRequestOptions.Data = matchOptions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForMatchingFirstEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/waitForMatchingFirstEmail", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForMatchingFirstEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Email + public Email WaitForNthEmail(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = WaitForNthEmailWithHttpInfo(inboxId, index, timeout, unreadOnly, since, before, sort, delay); + return localVarResponse.Data; + } + + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// ApiResponse of Email + public mailslurp.Client.ApiResponse WaitForNthEmailWithHttpInfo(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (index != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "index", index)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForNthEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/waitForNthEmail", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForNthEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Email + public async System.Threading.Tasks.Task WaitForNthEmailAsync(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await WaitForNthEmailWithHttpInfoAsync(inboxId, index, timeout, unreadOnly, since, before, sort, delay, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + /// + /// Thrown when fails to make API call + /// Id of the inbox you are fetching emails from (optional) + /// Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0) + /// Max milliseconds to wait for the nth email if not already present (optional) + /// Optional filter for unread only (optional, default to false) + /// Filter for emails that were received after the given timestamp (optional) + /// Filter for emails that were received before the given timestamp (optional) + /// Sort direction (optional) + /// Max milliseconds delay between calls (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Email) + public async System.Threading.Tasks.Task> WaitForNthEmailWithHttpInfoAsync(Guid? inboxId = default(Guid?), int? index = default(int?), long? timeout = default(long?), bool? unreadOnly = default(bool?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), string sort = default(string), long? delay = default(long?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (index != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "index", index)); + } + if (timeout != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "timeout", timeout)); + } + if (unreadOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unreadOnly", unreadOnly)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (delay != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "delay", delay)); + } + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForNthEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/waitForNthEmail", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForNthEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<SmsPreview> + public List WaitForSms(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = WaitForSmsWithHttpInfo(waitForSmsConditions); + return localVarResponse.Data; + } + + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<SmsPreview> + public mailslurp.Client.ApiResponse> WaitForSmsWithHttpInfo(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0) + { + // verify the required parameter 'waitForSmsConditions' is set + if (waitForSmsConditions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'waitForSmsConditions' when calling WaitForControllerApi->WaitForSms"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = waitForSmsConditions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post>("/waitForSms", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<SmsPreview> + public async System.Threading.Tasks.Task> WaitForSmsAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await WaitForSmsWithHttpInfoAsync(waitForSmsConditions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<SmsPreview>) + public async System.Threading.Tasks.Task>> WaitForSmsWithHttpInfoAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'waitForSmsConditions' is set + if (waitForSmsConditions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'waitForSmsConditions' when calling WaitForControllerApi->WaitForSms"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = waitForSmsConditions; + + localVarRequestOptions.Operation = "WaitForControllerApi.WaitForSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync>("/waitForSms", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("WaitForSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Api/WebhookControllerApi.cs b/src/mailslurp/Api/WebhookControllerApi.cs new file mode 100644 index 00000000..08bb5e28 --- /dev/null +++ b/src/mailslurp/Api/WebhookControllerApi.cs @@ -0,0 +1,7000 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using mailslurp.Client; +using mailslurp.Model; + +namespace mailslurp.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWebhookControllerApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// WebhookDto + WebhookDto CreateAccountWebhook(CreateWebhookOptions createWebhookOptions, int operationIndex = 0); + + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + ApiResponse CreateAccountWebhookWithHttpInfo(CreateWebhookOptions createWebhookOptions, int operationIndex = 0); + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// WebhookDto + WebhookDto CreateWebhook(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0); + + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + ApiResponse CreateWebhookWithHttpInfo(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0); + /// + /// Attach a WebHook URL to a phone number + /// + /// + /// Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// WebhookDto + WebhookDto CreateWebhookForPhoneNumber(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0); + + /// + /// Attach a WebHook URL to a phone number + /// + /// + /// Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + ApiResponse CreateWebhookForPhoneNumberWithHttpInfo(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0); + /// + /// Delete all webhooks + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// + void DeleteAllWebhooks(DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Delete all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteAllWebhooksWithHttpInfo(DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Delete and disable a Webhook for an Inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// + void DeleteWebhook(Guid inboxId, Guid webhookId, int operationIndex = 0); + + /// + /// Delete and disable a Webhook for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteWebhookWithHttpInfo(Guid inboxId, Guid webhookId, int operationIndex = 0); + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void DeleteWebhookById(Guid webhookId, int operationIndex = 0); + + /// + /// Delete a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteWebhookByIdWithHttpInfo(Guid webhookId, int operationIndex = 0); + /// + /// List account webhooks Paginated + /// + /// + /// List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + PageWebhookProjection GetAllAccountWebhooks(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List account webhooks Paginated + /// + /// + /// List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + ApiResponse GetAllAccountWebhooksWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get results for all webhooks + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// PageWebhookResult + PageWebhookResult GetAllWebhookResults(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0); + + /// + /// Get results for all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookResult + ApiResponse GetAllWebhookResultsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0); + /// + /// List Webhooks Paginated + /// + /// + /// List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + PageWebhookProjection GetAllWebhooks(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// List Webhooks Paginated + /// + /// + /// List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + ApiResponse GetAllWebhooksWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// Get paginated webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + PageWebhookProjection GetInboxWebhooksPaginated(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get paginated webhooks for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + ApiResponse GetInboxWebhooksPaginatedWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// JSONSchemaDto + JSONSchemaDto GetJsonSchemaForWebhookEvent(string _event, int operationIndex = 0); + + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of JSONSchemaDto + ApiResponse GetJsonSchemaForWebhookEventWithHttpInfo(string _event, int operationIndex = 0); + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// JSONSchemaDto + JSONSchemaDto GetJsonSchemaForWebhookPayload(Guid webhookId, int operationIndex = 0); + + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of JSONSchemaDto + ApiResponse GetJsonSchemaForWebhookPayloadWithHttpInfo(Guid webhookId, int operationIndex = 0); + /// + /// Get paginated webhooks for a phone number + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + PageWebhookProjection GetPhoneNumberWebhooksPaginated(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + + /// + /// Get paginated webhooks for a phone number + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + ApiResponse GetPhoneNumberWebhooksPaginatedWithHttpInfo(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0); + /// + /// + /// + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// AbstractWebhookPayload + AbstractWebhookPayload GetTestWebhookPayload(string eventName = default(string), int operationIndex = 0); + + /// + /// + /// + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of AbstractWebhookPayload + ApiResponse GetTestWebhookPayloadWithHttpInfo(string eventName = default(string), int operationIndex = 0); + /// + /// + /// + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookBouncePayload + WebhookBouncePayload GetTestWebhookPayloadBounce(int operationIndex = 0); + + /// + /// + /// + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookBouncePayload + ApiResponse GetTestWebhookPayloadBounceWithHttpInfo(int operationIndex = 0); + /// + /// + /// + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookBounceRecipientPayload + WebhookBounceRecipientPayload GetTestWebhookPayloadBounceRecipient(int operationIndex = 0); + + /// + /// + /// + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookBounceRecipientPayload + ApiResponse GetTestWebhookPayloadBounceRecipientWithHttpInfo(int operationIndex = 0); + /// + /// Get webhook test payload for delivery status event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookDeliveryStatusPayload + WebhookDeliveryStatusPayload GetTestWebhookPayloadDeliveryStatus(int operationIndex = 0); + + /// + /// Get webhook test payload for delivery status event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookDeliveryStatusPayload + ApiResponse GetTestWebhookPayloadDeliveryStatusWithHttpInfo(int operationIndex = 0); + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookEmailOpenedPayload + WebhookEmailOpenedPayload GetTestWebhookPayloadEmailOpened(int operationIndex = 0); + + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookEmailOpenedPayload + ApiResponse GetTestWebhookPayloadEmailOpenedWithHttpInfo(int operationIndex = 0); + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookEmailReadPayload + WebhookEmailReadPayload GetTestWebhookPayloadEmailRead(int operationIndex = 0); + + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookEmailReadPayload + ApiResponse GetTestWebhookPayloadEmailReadWithHttpInfo(int operationIndex = 0); + /// + /// + /// + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// AbstractWebhookPayload + AbstractWebhookPayload GetTestWebhookPayloadForWebhook(Guid webhookId, int operationIndex = 0); + + /// + /// + /// + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of AbstractWebhookPayload + ApiResponse GetTestWebhookPayloadForWebhookWithHttpInfo(Guid webhookId, int operationIndex = 0); + /// + /// Get webhook test payload for new attachment event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewAttachmentPayload + WebhookNewAttachmentPayload GetTestWebhookPayloadNewAttachment(int operationIndex = 0); + + /// + /// Get webhook test payload for new attachment event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewAttachmentPayload + ApiResponse GetTestWebhookPayloadNewAttachmentWithHttpInfo(int operationIndex = 0); + /// + /// Get webhook test payload for new contact event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewContactPayload + WebhookNewContactPayload GetTestWebhookPayloadNewContact(int operationIndex = 0); + + /// + /// Get webhook test payload for new contact event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewContactPayload + ApiResponse GetTestWebhookPayloadNewContactWithHttpInfo(int operationIndex = 0); + /// + /// Get webhook test payload for new email event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewEmailPayload + WebhookNewEmailPayload GetTestWebhookPayloadNewEmail(int operationIndex = 0); + + /// + /// Get webhook test payload for new email event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewEmailPayload + ApiResponse GetTestWebhookPayloadNewEmailWithHttpInfo(int operationIndex = 0); + /// + /// Get webhook test payload for new sms event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewSmsPayload + WebhookNewSmsPayload GetTestWebhookPayloadNewSms(int operationIndex = 0); + + /// + /// Get webhook test payload for new sms event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewSmsPayload + ApiResponse GetTestWebhookPayloadNewSmsWithHttpInfo(int operationIndex = 0); + /// + /// Get a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// WebhookDto + WebhookDto GetWebhook(Guid webhookId, int operationIndex = 0); + + /// + /// Get a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + ApiResponse GetWebhookWithHttpInfo(Guid webhookId, int operationIndex = 0); + /// + /// Get a webhook result for a webhook + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// WebhookResultDto + WebhookResultDto GetWebhookResult(Guid webhookResultId, int operationIndex = 0); + + /// + /// Get a webhook result for a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// ApiResponse of WebhookResultDto + ApiResponse GetWebhookResultWithHttpInfo(Guid webhookResultId, int operationIndex = 0); + /// + /// Get a webhook results for a webhook + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// PageWebhookResult + PageWebhookResult GetWebhookResults(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0); + + /// + /// Get a webhook results for a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookResult + ApiResponse GetWebhookResultsWithHttpInfo(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0); + /// + /// Get count of unseen webhook results with error status + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// UnseenErrorCountDto + UnseenErrorCountDto GetWebhookResultsUnseenErrorCount(int operationIndex = 0); + + /// + /// Get count of unseen webhook results with error status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of UnseenErrorCountDto + ApiResponse GetWebhookResultsUnseenErrorCountWithHttpInfo(int operationIndex = 0); + /// + /// Get all webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<WebhookDto> + [Obsolete] + List GetWebhooks(Guid inboxId, int operationIndex = 0); + + /// + /// Get all webhooks for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<WebhookDto> + [Obsolete] + ApiResponse> GetWebhooksWithHttpInfo(Guid inboxId, int operationIndex = 0); + /// + /// Get a webhook result and try to resend the original webhook payload + /// + /// + /// Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// WebhookRedriveResult + WebhookRedriveResult RedriveWebhookResult(Guid webhookResultId, int operationIndex = 0); + + /// + /// Get a webhook result and try to resend the original webhook payload + /// + /// + /// Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// ApiResponse of WebhookRedriveResult + ApiResponse RedriveWebhookResultWithHttpInfo(Guid webhookResultId, int operationIndex = 0); + /// + /// Send webhook test data + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// WebhookTestResult + WebhookTestResult SendTestData(Guid webhookId, int operationIndex = 0); + + /// + /// Send webhook test data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of WebhookTestResult + ApiResponse SendTestDataWithHttpInfo(Guid webhookId, int operationIndex = 0); + /// + /// Update a webhook request headers + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// WebhookDto + WebhookDto UpdateWebhookHeaders(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0); + + /// + /// Update a webhook request headers + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + ApiResponse UpdateWebhookHeadersWithHttpInfo(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0); + /// + /// Verify a webhook payload signature + /// + /// + /// Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// VerifyWebhookSignatureResults + VerifyWebhookSignatureResults VerifyWebhookSignature(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0); + + /// + /// Verify a webhook payload signature + /// + /// + /// Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of VerifyWebhookSignatureResults + ApiResponse VerifyWebhookSignatureWithHttpInfo(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWebhookControllerApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + System.Threading.Tasks.Task CreateAccountWebhookAsync(CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + System.Threading.Tasks.Task> CreateAccountWebhookWithHttpInfoAsync(CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + System.Threading.Tasks.Task CreateWebhookAsync(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Attach a WebHook URL to an inbox + /// + /// + /// Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + System.Threading.Tasks.Task> CreateWebhookWithHttpInfoAsync(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Attach a WebHook URL to a phone number + /// + /// + /// Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + System.Threading.Tasks.Task CreateWebhookForPhoneNumberAsync(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Attach a WebHook URL to a phone number + /// + /// + /// Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + System.Threading.Tasks.Task> CreateWebhookForPhoneNumberWithHttpInfoAsync(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteAllWebhooksAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAllWebhooksWithHttpInfoAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete and disable a Webhook for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteWebhookAsync(Guid inboxId, Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete and disable a Webhook for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteWebhookWithHttpInfoAsync(Guid inboxId, Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteWebhookByIdAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteWebhookByIdWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List account webhooks Paginated + /// + /// + /// List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + System.Threading.Tasks.Task GetAllAccountWebhooksAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List account webhooks Paginated + /// + /// + /// List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + System.Threading.Tasks.Task> GetAllAccountWebhooksWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get results for all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookResult + System.Threading.Tasks.Task GetAllWebhookResultsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get results for all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookResult) + System.Threading.Tasks.Task> GetAllWebhookResultsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List Webhooks Paginated + /// + /// + /// List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + System.Threading.Tasks.Task GetAllWebhooksAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List Webhooks Paginated + /// + /// + /// List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + System.Threading.Tasks.Task> GetAllWebhooksWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get paginated webhooks for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + System.Threading.Tasks.Task GetInboxWebhooksPaginatedAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get paginated webhooks for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + System.Threading.Tasks.Task> GetInboxWebhooksPaginatedWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of JSONSchemaDto + System.Threading.Tasks.Task GetJsonSchemaForWebhookEventAsync(string _event, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (JSONSchemaDto) + System.Threading.Tasks.Task> GetJsonSchemaForWebhookEventWithHttpInfoAsync(string _event, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of JSONSchemaDto + System.Threading.Tasks.Task GetJsonSchemaForWebhookPayloadAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (JSONSchemaDto) + System.Threading.Tasks.Task> GetJsonSchemaForWebhookPayloadWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get paginated webhooks for a phone number + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + System.Threading.Tasks.Task GetPhoneNumberWebhooksPaginatedAsync(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get paginated webhooks for a phone number + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + System.Threading.Tasks.Task> GetPhoneNumberWebhooksPaginatedWithHttpInfoAsync(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AbstractWebhookPayload + System.Threading.Tasks.Task GetTestWebhookPayloadAsync(string eventName = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AbstractWebhookPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadWithHttpInfoAsync(string eventName = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookBouncePayload + System.Threading.Tasks.Task GetTestWebhookPayloadBounceAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookBouncePayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadBounceWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookBounceRecipientPayload + System.Threading.Tasks.Task GetTestWebhookPayloadBounceRecipientAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookBounceRecipientPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadBounceRecipientWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get webhook test payload for delivery status event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDeliveryStatusPayload + System.Threading.Tasks.Task GetTestWebhookPayloadDeliveryStatusAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get webhook test payload for delivery status event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDeliveryStatusPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadDeliveryStatusWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookEmailOpenedPayload + System.Threading.Tasks.Task GetTestWebhookPayloadEmailOpenedAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookEmailOpenedPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadEmailOpenedWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookEmailReadPayload + System.Threading.Tasks.Task GetTestWebhookPayloadEmailReadAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookEmailReadPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadEmailReadWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AbstractWebhookPayload + System.Threading.Tasks.Task GetTestWebhookPayloadForWebhookAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AbstractWebhookPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadForWebhookWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get webhook test payload for new attachment event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewAttachmentPayload + System.Threading.Tasks.Task GetTestWebhookPayloadNewAttachmentAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get webhook test payload for new attachment event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewAttachmentPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadNewAttachmentWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get webhook test payload for new contact event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewContactPayload + System.Threading.Tasks.Task GetTestWebhookPayloadNewContactAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get webhook test payload for new contact event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewContactPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadNewContactWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get webhook test payload for new email event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewEmailPayload + System.Threading.Tasks.Task GetTestWebhookPayloadNewEmailAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get webhook test payload for new email event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewEmailPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadNewEmailWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get webhook test payload for new sms event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewSmsPayload + System.Threading.Tasks.Task GetTestWebhookPayloadNewSmsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get webhook test payload for new sms event + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewSmsPayload) + System.Threading.Tasks.Task> GetTestWebhookPayloadNewSmsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + System.Threading.Tasks.Task GetWebhookAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + System.Threading.Tasks.Task> GetWebhookWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a webhook result for a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookResultDto + System.Threading.Tasks.Task GetWebhookResultAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a webhook result for a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookResultDto) + System.Threading.Tasks.Task> GetWebhookResultWithHttpInfoAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a webhook results for a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookResult + System.Threading.Tasks.Task GetWebhookResultsAsync(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a webhook results for a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookResult) + System.Threading.Tasks.Task> GetWebhookResultsWithHttpInfoAsync(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get count of unseen webhook results with error status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UnseenErrorCountDto + System.Threading.Tasks.Task GetWebhookResultsUnseenErrorCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get count of unseen webhook results with error status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UnseenErrorCountDto) + System.Threading.Tasks.Task> GetWebhookResultsUnseenErrorCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get all webhooks for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<WebhookDto> + [Obsolete] + System.Threading.Tasks.Task> GetWebhooksAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get all webhooks for an Inbox + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<WebhookDto>) + [Obsolete] + System.Threading.Tasks.Task>> GetWebhooksWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a webhook result and try to resend the original webhook payload + /// + /// + /// Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookRedriveResult + System.Threading.Tasks.Task RedriveWebhookResultAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a webhook result and try to resend the original webhook payload + /// + /// + /// Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookRedriveResult) + System.Threading.Tasks.Task> RedriveWebhookResultWithHttpInfoAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Send webhook test data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookTestResult + System.Threading.Tasks.Task SendTestDataAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Send webhook test data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookTestResult) + System.Threading.Tasks.Task> SendTestDataWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update a webhook request headers + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + System.Threading.Tasks.Task UpdateWebhookHeadersAsync(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update a webhook request headers + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + System.Threading.Tasks.Task> UpdateWebhookHeadersWithHttpInfoAsync(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Verify a webhook payload signature + /// + /// + /// Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of VerifyWebhookSignatureResults + System.Threading.Tasks.Task VerifyWebhookSignatureAsync(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Verify a webhook payload signature + /// + /// + /// Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (VerifyWebhookSignatureResults) + System.Threading.Tasks.Task> VerifyWebhookSignatureWithHttpInfoAsync(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWebhookControllerApi : IWebhookControllerApiSync, IWebhookControllerApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class WebhookControllerApi : IWebhookControllerApi + { + private mailslurp.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public WebhookControllerApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public WebhookControllerApi(string basePath) + { + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + new mailslurp.Client.Configuration { BasePath = basePath } + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public WebhookControllerApi(mailslurp.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = mailslurp.Client.Configuration.MergeConfigurations( + mailslurp.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new mailslurp.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public WebhookControllerApi(mailslurp.Client.ISynchronousClient client, mailslurp.Client.IAsynchronousClient asyncClient, mailslurp.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = mailslurp.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public mailslurp.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public mailslurp.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public mailslurp.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public mailslurp.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Attach a WebHook URL to an inbox Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// WebhookDto + public WebhookDto CreateAccountWebhook(CreateWebhookOptions createWebhookOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateAccountWebhookWithHttpInfo(createWebhookOptions); + return localVarResponse.Data; + } + + /// + /// Attach a WebHook URL to an inbox Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + public mailslurp.Client.ApiResponse CreateAccountWebhookWithHttpInfo(CreateWebhookOptions createWebhookOptions, int operationIndex = 0) + { + // verify the required parameter 'createWebhookOptions' is set + if (createWebhookOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createWebhookOptions' when calling WebhookControllerApi->CreateAccountWebhook"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createWebhookOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.CreateAccountWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/webhooks", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateAccountWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Attach a WebHook URL to an inbox Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + public async System.Threading.Tasks.Task CreateAccountWebhookAsync(CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateAccountWebhookWithHttpInfoAsync(createWebhookOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Attach a WebHook URL to an inbox Get notified of account level events such as bounce and bounce recipient. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + public async System.Threading.Tasks.Task> CreateAccountWebhookWithHttpInfoAsync(CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createWebhookOptions' is set + if (createWebhookOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createWebhookOptions' when calling WebhookControllerApi->CreateAccountWebhook"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = createWebhookOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.CreateAccountWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/webhooks", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateAccountWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// WebhookDto + public WebhookDto CreateWebhook(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateWebhookWithHttpInfo(inboxId, createWebhookOptions); + return localVarResponse.Data; + } + + /// + /// Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + public mailslurp.Client.ApiResponse CreateWebhookWithHttpInfo(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0) + { + // verify the required parameter 'createWebhookOptions' is set + if (createWebhookOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createWebhookOptions' when calling WebhookControllerApi->CreateWebhook"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = createWebhookOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.CreateWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/inboxes/{inboxId}/webhooks", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + public async System.Threading.Tasks.Task CreateWebhookAsync(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateWebhookWithHttpInfoAsync(inboxId, createWebhookOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + public async System.Threading.Tasks.Task> CreateWebhookWithHttpInfoAsync(Guid inboxId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createWebhookOptions' is set + if (createWebhookOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createWebhookOptions' when calling WebhookControllerApi->CreateWebhook"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.Data = createWebhookOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.CreateWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/inboxes/{inboxId}/webhooks", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Attach a WebHook URL to a phone number Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// WebhookDto + public WebhookDto CreateWebhookForPhoneNumber(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = CreateWebhookForPhoneNumberWithHttpInfo(phoneNumberId, createWebhookOptions); + return localVarResponse.Data; + } + + /// + /// Attach a WebHook URL to a phone number Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + public mailslurp.Client.ApiResponse CreateWebhookForPhoneNumberWithHttpInfo(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0) + { + // verify the required parameter 'createWebhookOptions' is set + if (createWebhookOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createWebhookOptions' when calling WebhookControllerApi->CreateWebhookForPhoneNumber"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + localVarRequestOptions.Data = createWebhookOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.CreateWebhookForPhoneNumber"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/phone/numbers/{phoneNumberId}/webhooks", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateWebhookForPhoneNumber", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Attach a WebHook URL to a phone number Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + public async System.Threading.Tasks.Task CreateWebhookForPhoneNumberAsync(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await CreateWebhookForPhoneNumberWithHttpInfoAsync(phoneNumberId, createWebhookOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Attach a WebHook URL to a phone number Get notified whenever a phone number receives an SMS via a WebHook URL. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + public async System.Threading.Tasks.Task> CreateWebhookForPhoneNumberWithHttpInfoAsync(Guid phoneNumberId, CreateWebhookOptions createWebhookOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'createWebhookOptions' is set + if (createWebhookOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'createWebhookOptions' when calling WebhookControllerApi->CreateWebhookForPhoneNumber"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneNumberId", mailslurp.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter + localVarRequestOptions.Data = createWebhookOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.CreateWebhookForPhoneNumber"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/phone/numbers/{phoneNumberId}/webhooks", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateWebhookForPhoneNumber", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all webhooks + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// + public void DeleteAllWebhooks(DateTime? before = default(DateTime?), int operationIndex = 0) + { + DeleteAllWebhooksWithHttpInfo(before); + } + + /// + /// Delete all webhooks + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteAllWebhooksWithHttpInfo(DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.DeleteAllWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/webhooks", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete all webhooks + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteAllWebhooksAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteAllWebhooksWithHttpInfoAsync(before, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete all webhooks + /// + /// Thrown when fails to make API call + /// before (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAllWebhooksWithHttpInfoAsync(DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.DeleteAllWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/webhooks", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteAllWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete and disable a Webhook for an Inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// + public void DeleteWebhook(Guid inboxId, Guid webhookId, int operationIndex = 0) + { + DeleteWebhookWithHttpInfo(inboxId, webhookId); + } + + /// + /// Delete and disable a Webhook for an Inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteWebhookWithHttpInfo(Guid inboxId, Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.DeleteWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/inboxes/{inboxId}/webhooks/{webhookId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete and disable a Webhook for an Inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteWebhookAsync(Guid inboxId, Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteWebhookWithHttpInfoAsync(inboxId, webhookId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete and disable a Webhook for an Inbox + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteWebhookWithHttpInfoAsync(Guid inboxId, Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.DeleteWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/inboxes/{inboxId}/webhooks/{webhookId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void DeleteWebhookById(Guid webhookId, int operationIndex = 0) + { + DeleteWebhookByIdWithHttpInfo(webhookId); + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public mailslurp.Client.ApiResponse DeleteWebhookByIdWithHttpInfo(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.DeleteWebhookById"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/webhooks/{webhookId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteWebhookById", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteWebhookByIdAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteWebhookByIdWithHttpInfoAsync(webhookId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteWebhookByIdWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.DeleteWebhookById"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/webhooks/{webhookId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteWebhookById", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List account webhooks Paginated List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + public PageWebhookProjection GetAllAccountWebhooks(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllAccountWebhooksWithHttpInfo(page, size, sort, eventType, since, before); + return localVarResponse.Data; + } + + /// + /// List account webhooks Paginated List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + public mailslurp.Client.ApiResponse GetAllAccountWebhooksWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (eventType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "eventType", eventType)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetAllAccountWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/account/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllAccountWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List account webhooks Paginated List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + public async System.Threading.Tasks.Task GetAllAccountWebhooksAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllAccountWebhooksWithHttpInfoAsync(page, size, sort, eventType, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List account webhooks Paginated List account webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional event type (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + public async System.Threading.Tasks.Task> GetAllAccountWebhooksWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string eventType = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (eventType != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "eventType", eventType)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetAllAccountWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/account/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllAccountWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get results for all webhooks + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// PageWebhookResult + public PageWebhookResult GetAllWebhookResults(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllWebhookResultsWithHttpInfo(page, size, sort, searchFilter, since, before, unseenOnly); + return localVarResponse.Data; + } + + /// + /// Get results for all webhooks + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookResult + public mailslurp.Client.ApiResponse GetAllWebhookResultsWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (unseenOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unseenOnly", unseenOnly)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetAllWebhookResults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/results", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllWebhookResults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get results for all webhooks + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookResult + public async System.Threading.Tasks.Task GetAllWebhookResultsAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllWebhookResultsWithHttpInfoAsync(page, size, sort, searchFilter, since, before, unseenOnly, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get results for all webhooks + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookResult) + public async System.Threading.Tasks.Task> GetAllWebhookResultsWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (unseenOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unseenOnly", unseenOnly)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetAllWebhookResults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/results", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllWebhookResults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Webhooks Paginated List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + public PageWebhookProjection GetAllWebhooks(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetAllWebhooksWithHttpInfo(page, size, sort, searchFilter, since, inboxId, phoneId, before); + return localVarResponse.Data; + } + + /// + /// List Webhooks Paginated List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + public mailslurp.Client.ApiResponse GetAllWebhooksWithHttpInfo(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (phoneId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneId", phoneId)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetAllWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Webhooks Paginated List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + public async System.Threading.Tasks.Task GetAllWebhooksAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetAllWebhooksWithHttpInfoAsync(page, size, sort, searchFilter, since, inboxId, phoneId, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Webhooks Paginated List webhooks in paginated form. Allows for page index, page size, and sort direction. + /// + /// Thrown when fails to make API call + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size for paginated result list. (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to DESC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by inboxId (optional) + /// Filter by phoneId (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + public async System.Threading.Tasks.Task> GetAllWebhooksWithHttpInfoAsync(int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), Guid? inboxId = default(Guid?), Guid? phoneId = default(Guid?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (inboxId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "inboxId", inboxId)); + } + if (phoneId != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "phoneId", phoneId)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetAllWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + public PageWebhookProjection GetInboxWebhooksPaginated(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetInboxWebhooksPaginatedWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before); + return localVarResponse.Data; + } + + /// + /// Get paginated webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + public mailslurp.Client.ApiResponse GetInboxWebhooksPaginatedWithHttpInfo(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetInboxWebhooksPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/inboxes/{inboxId}/webhooks/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxWebhooksPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + public async System.Threading.Tasks.Task GetInboxWebhooksPaginatedAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetInboxWebhooksPaginatedWithHttpInfoAsync(inboxId, page, size, sort, searchFilter, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get paginated webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + public async System.Threading.Tasks.Task> GetInboxWebhooksPaginatedWithHttpInfoAsync(Guid inboxId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetInboxWebhooksPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/inboxes/{inboxId}/webhooks/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInboxWebhooksPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// JSONSchemaDto + public JSONSchemaDto GetJsonSchemaForWebhookEvent(string _event, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetJsonSchemaForWebhookEventWithHttpInfo(_event); + return localVarResponse.Data; + } + + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of JSONSchemaDto + public mailslurp.Client.ApiResponse GetJsonSchemaForWebhookEventWithHttpInfo(string _event, int operationIndex = 0) + { + // verify the required parameter '_event' is set + if (_event == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter '_event' when calling WebhookControllerApi->GetJsonSchemaForWebhookEvent"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "event", _event)); + + localVarRequestOptions.Operation = "WebhookControllerApi.GetJsonSchemaForWebhookEvent"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/webhooks/schema", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonSchemaForWebhookEvent", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of JSONSchemaDto + public async System.Threading.Tasks.Task GetJsonSchemaForWebhookEventAsync(string _event, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetJsonSchemaForWebhookEventWithHttpInfoAsync(_event, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get JSON Schema definition for webhook payload by event + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (JSONSchemaDto) + public async System.Threading.Tasks.Task> GetJsonSchemaForWebhookEventWithHttpInfoAsync(string _event, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter '_event' is set + if (_event == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter '_event' when calling WebhookControllerApi->GetJsonSchemaForWebhookEvent"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "event", _event)); + + localVarRequestOptions.Operation = "WebhookControllerApi.GetJsonSchemaForWebhookEvent"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/webhooks/schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonSchemaForWebhookEvent", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// JSONSchemaDto + public JSONSchemaDto GetJsonSchemaForWebhookPayload(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetJsonSchemaForWebhookPayloadWithHttpInfo(webhookId); + return localVarResponse.Data; + } + + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of JSONSchemaDto + public mailslurp.Client.ApiResponse GetJsonSchemaForWebhookPayloadWithHttpInfo(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetJsonSchemaForWebhookPayload"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/webhooks/{webhookId}/schema", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonSchemaForWebhookPayload", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of JSONSchemaDto + public async System.Threading.Tasks.Task GetJsonSchemaForWebhookPayloadAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetJsonSchemaForWebhookPayloadWithHttpInfoAsync(webhookId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get JSON Schema definition for webhook payload + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (JSONSchemaDto) + public async System.Threading.Tasks.Task> GetJsonSchemaForWebhookPayloadWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetJsonSchemaForWebhookPayload"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/webhooks/{webhookId}/schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonSchemaForWebhookPayload", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated webhooks for a phone number + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// PageWebhookProjection + public PageWebhookProjection GetPhoneNumberWebhooksPaginated(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetPhoneNumberWebhooksPaginatedWithHttpInfo(phoneId, page, size, sort, since, before); + return localVarResponse.Data; + } + + /// + /// Get paginated webhooks for a phone number + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookProjection + public mailslurp.Client.ApiResponse GetPhoneNumberWebhooksPaginatedWithHttpInfo(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneId", mailslurp.Client.ClientUtils.ParameterToString(phoneId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetPhoneNumberWebhooksPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/phone/numbers/{phoneId}/webhooks/paginated", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhoneNumberWebhooksPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get paginated webhooks for a phone number + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookProjection + public async System.Threading.Tasks.Task GetPhoneNumberWebhooksPaginatedAsync(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetPhoneNumberWebhooksPaginatedWithHttpInfoAsync(phoneId, page, size, sort, since, before, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get paginated webhooks for a phone number + /// + /// Thrown when fails to make API call + /// + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookProjection) + public async System.Threading.Tasks.Task> GetPhoneNumberWebhooksPaginatedWithHttpInfoAsync(Guid phoneId, int? page = default(int?), int? size = default(int?), string sort = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("phoneId", mailslurp.Client.ClientUtils.ParameterToString(phoneId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetPhoneNumberWebhooksPaginated"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/phone/numbers/{phoneId}/webhooks/paginated", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPhoneNumberWebhooksPaginated", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// AbstractWebhookPayload + public AbstractWebhookPayload GetTestWebhookPayload(string eventName = default(string), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadWithHttpInfo(eventName); + return localVarResponse.Data; + } + + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of AbstractWebhookPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadWithHttpInfo(string eventName = default(string), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (eventName != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "eventName", eventName)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayload"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayload", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AbstractWebhookPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadAsync(string eventName = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadWithHttpInfoAsync(eventName, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AbstractWebhookPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadWithHttpInfoAsync(string eventName = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (eventName != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "eventName", eventName)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayload"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayload", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookBouncePayload + public WebhookBouncePayload GetTestWebhookPayloadBounce(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadBounceWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookBouncePayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadBounceWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadBounce"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/email-bounce-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadBounce", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookBouncePayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadBounceAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadBounceWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for bounce + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookBouncePayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadBounceWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadBounce"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/email-bounce-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadBounce", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookBounceRecipientPayload + public WebhookBounceRecipientPayload GetTestWebhookPayloadBounceRecipient(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadBounceRecipientWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookBounceRecipientPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadBounceRecipientWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadBounceRecipient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/email-bounce-recipient-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadBounceRecipient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookBounceRecipientPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadBounceRecipientAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadBounceRecipientWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for bounce recipient + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookBounceRecipientPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadBounceRecipientWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadBounceRecipient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/email-bounce-recipient-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadBounceRecipient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for delivery status event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookDeliveryStatusPayload + public WebhookDeliveryStatusPayload GetTestWebhookPayloadDeliveryStatus(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadDeliveryStatusWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for delivery status event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookDeliveryStatusPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadDeliveryStatusWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadDeliveryStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/delivery-status-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadDeliveryStatus", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for delivery status event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDeliveryStatusPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadDeliveryStatusAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadDeliveryStatusWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for delivery status event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDeliveryStatusPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadDeliveryStatusWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadDeliveryStatus"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/delivery-status-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadDeliveryStatus", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookEmailOpenedPayload + public WebhookEmailOpenedPayload GetTestWebhookPayloadEmailOpened(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadEmailOpenedWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookEmailOpenedPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadEmailOpenedWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadEmailOpened"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/email-opened-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadEmailOpened", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookEmailOpenedPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadEmailOpenedAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadEmailOpenedWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookEmailOpenedPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadEmailOpenedWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadEmailOpened"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/email-opened-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadEmailOpened", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookEmailReadPayload + public WebhookEmailReadPayload GetTestWebhookPayloadEmailRead(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadEmailReadWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookEmailReadPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadEmailReadWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadEmailRead"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/email-read-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadEmailRead", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookEmailReadPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadEmailReadAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadEmailReadWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for email opened event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookEmailReadPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadEmailReadWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadEmailRead"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/email-read-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadEmailRead", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// AbstractWebhookPayload + public AbstractWebhookPayload GetTestWebhookPayloadForWebhook(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadForWebhookWithHttpInfo(webhookId); + return localVarResponse.Data; + } + + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of AbstractWebhookPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadForWebhookWithHttpInfo(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadForWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/webhooks/{webhookId}/example", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadForWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AbstractWebhookPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadForWebhookAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadForWebhookWithHttpInfoAsync(webhookId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get example payload for webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AbstractWebhookPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadForWebhookWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadForWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/webhooks/{webhookId}/example", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadForWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new attachment event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewAttachmentPayload + public WebhookNewAttachmentPayload GetTestWebhookPayloadNewAttachment(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadNewAttachmentWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new attachment event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewAttachmentPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadNewAttachmentWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/new-attachment-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new attachment event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewAttachmentPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadNewAttachmentAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadNewAttachmentWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new attachment event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewAttachmentPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadNewAttachmentWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewAttachment"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/new-attachment-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewAttachment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new contact event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewContactPayload + public WebhookNewContactPayload GetTestWebhookPayloadNewContact(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadNewContactWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new contact event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewContactPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadNewContactWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/new-contact-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new contact event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewContactPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadNewContactAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadNewContactWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new contact event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewContactPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadNewContactWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewContact"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/new-contact-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewContact", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new email event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewEmailPayload + public WebhookNewEmailPayload GetTestWebhookPayloadNewEmail(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadNewEmailWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new email event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewEmailPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadNewEmailWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/new-email-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new email event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewEmailPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadNewEmailAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadNewEmailWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new email event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewEmailPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadNewEmailWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewEmail"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/new-email-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewEmail", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new sms event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// WebhookNewSmsPayload + public WebhookNewSmsPayload GetTestWebhookPayloadNewSms(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetTestWebhookPayloadNewSmsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new sms event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of WebhookNewSmsPayload + public mailslurp.Client.ApiResponse GetTestWebhookPayloadNewSmsWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/test/new-sms-payload", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get webhook test payload for new sms event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookNewSmsPayload + public async System.Threading.Tasks.Task GetTestWebhookPayloadNewSmsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetTestWebhookPayloadNewSmsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get webhook test payload for new sms event + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookNewSmsPayload) + public async System.Threading.Tasks.Task> GetTestWebhookPayloadNewSmsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetTestWebhookPayloadNewSms"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/test/new-sms-payload", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTestWebhookPayloadNewSms", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// WebhookDto + public WebhookDto GetWebhook(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetWebhookWithHttpInfo(webhookId); + return localVarResponse.Data; + } + + /// + /// Get a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + public mailslurp.Client.ApiResponse GetWebhookWithHttpInfo(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/{webhookId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + public async System.Threading.Tasks.Task GetWebhookAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetWebhookWithHttpInfoAsync(webhookId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a webhook + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + public async System.Threading.Tasks.Task> GetWebhookWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhook"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/{webhookId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhook", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook result for a webhook + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// WebhookResultDto + public WebhookResultDto GetWebhookResult(Guid webhookResultId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetWebhookResultWithHttpInfo(webhookResultId); + return localVarResponse.Data; + } + + /// + /// Get a webhook result for a webhook + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// ApiResponse of WebhookResultDto + public mailslurp.Client.ApiResponse GetWebhookResultWithHttpInfo(Guid webhookResultId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookResultId", mailslurp.Client.ClientUtils.ParameterToString(webhookResultId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhookResult"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/results/{webhookResultId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhookResult", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook result for a webhook + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookResultDto + public async System.Threading.Tasks.Task GetWebhookResultAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetWebhookResultWithHttpInfoAsync(webhookResultId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a webhook result for a webhook + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookResultDto) + public async System.Threading.Tasks.Task> GetWebhookResultWithHttpInfoAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookResultId", mailslurp.Client.ClientUtils.ParameterToString(webhookResultId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhookResult"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/results/{webhookResultId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhookResult", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook results for a webhook + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// PageWebhookResult + public PageWebhookResult GetWebhookResults(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetWebhookResultsWithHttpInfo(webhookId, page, size, sort, searchFilter, since, before, unseenOnly); + return localVarResponse.Data; + } + + /// + /// Get a webhook results for a webhook + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// ApiResponse of PageWebhookResult + public mailslurp.Client.ApiResponse GetWebhookResultsWithHttpInfo(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (unseenOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unseenOnly", unseenOnly)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhookResults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/{webhookId}/results", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhookResults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook results for a webhook + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PageWebhookResult + public async System.Threading.Tasks.Task GetWebhookResultsAsync(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetWebhookResultsWithHttpInfoAsync(webhookId, page, size, sort, searchFilter, since, before, unseenOnly, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a webhook results for a webhook + /// + /// Thrown when fails to make API call + /// ID of webhook to get results for + /// Optional page index in list pagination (optional, default to 0) + /// Optional page size in list pagination (optional, default to 20) + /// Optional createdAt sort direction ASC or DESC (optional, default to ASC) + /// Optional search filter (optional) + /// Filter by created at after the given timestamp (optional) + /// Filter by created at before the given timestamp (optional) + /// Filter for unseen exceptions only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PageWebhookResult) + public async System.Threading.Tasks.Task> GetWebhookResultsWithHttpInfoAsync(Guid webhookId, int? page = default(int?), int? size = default(int?), string sort = default(string), string searchFilter = default(string), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?), bool? unseenOnly = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (size != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "size", size)); + } + if (sort != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)); + } + if (searchFilter != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "searchFilter", searchFilter)); + } + if (since != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "since", since)); + } + if (before != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "before", before)); + } + if (unseenOnly != null) + { + localVarRequestOptions.QueryParameters.Add(mailslurp.Client.ClientUtils.ParameterToMultiMap("", "unseenOnly", unseenOnly)); + } + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhookResults"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/{webhookId}/results", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhookResults", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get count of unseen webhook results with error status + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// UnseenErrorCountDto + public UnseenErrorCountDto GetWebhookResultsUnseenErrorCount(int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = GetWebhookResultsUnseenErrorCountWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get count of unseen webhook results with error status + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of UnseenErrorCountDto + public mailslurp.Client.ApiResponse GetWebhookResultsUnseenErrorCountWithHttpInfo(int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhookResultsUnseenErrorCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/webhooks/results/unseen-count", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhookResultsUnseenErrorCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get count of unseen webhook results with error status + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UnseenErrorCountDto + public async System.Threading.Tasks.Task GetWebhookResultsUnseenErrorCountAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await GetWebhookResultsUnseenErrorCountWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get count of unseen webhook results with error status + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UnseenErrorCountDto) + public async System.Threading.Tasks.Task> GetWebhookResultsUnseenErrorCountWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhookResultsUnseenErrorCount"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/webhooks/results/unseen-count", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhookResultsUnseenErrorCount", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// List<WebhookDto> + [Obsolete] + public List GetWebhooks(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse> localVarResponse = GetWebhooksWithHttpInfo(inboxId); + return localVarResponse.Data; + } + + /// + /// Get all webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of List<WebhookDto> + [Obsolete] + public mailslurp.Client.ApiResponse> GetWebhooksWithHttpInfo(Guid inboxId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/inboxes/{inboxId}/webhooks", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get all webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<WebhookDto> + [Obsolete] + public async System.Threading.Tasks.Task> GetWebhooksAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse> localVarResponse = await GetWebhooksWithHttpInfoAsync(inboxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get all webhooks for an Inbox + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<WebhookDto>) + [Obsolete] + public async System.Threading.Tasks.Task>> GetWebhooksWithHttpInfoAsync(Guid inboxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("inboxId", mailslurp.Client.ClientUtils.ParameterToString(inboxId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.GetWebhooks"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/inboxes/{inboxId}/webhooks", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetWebhooks", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook result and try to resend the original webhook payload Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// WebhookRedriveResult + public WebhookRedriveResult RedriveWebhookResult(Guid webhookResultId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = RedriveWebhookResultWithHttpInfo(webhookResultId); + return localVarResponse.Data; + } + + /// + /// Get a webhook result and try to resend the original webhook payload Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// ApiResponse of WebhookRedriveResult + public mailslurp.Client.ApiResponse RedriveWebhookResultWithHttpInfo(Guid webhookResultId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookResultId", mailslurp.Client.ClientUtils.ParameterToString(webhookResultId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.RedriveWebhookResult"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/webhooks/results/{webhookResultId}/redrive", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RedriveWebhookResult", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a webhook result and try to resend the original webhook payload Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookRedriveResult + public async System.Threading.Tasks.Task RedriveWebhookResultAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await RedriveWebhookResultWithHttpInfoAsync(webhookResultId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a webhook result and try to resend the original webhook payload Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + /// + /// Thrown when fails to make API call + /// Webhook Result ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookRedriveResult) + public async System.Threading.Tasks.Task> RedriveWebhookResultWithHttpInfoAsync(Guid webhookResultId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookResultId", mailslurp.Client.ClientUtils.ParameterToString(webhookResultId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.RedriveWebhookResult"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/webhooks/results/{webhookResultId}/redrive", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RedriveWebhookResult", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send webhook test data + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// WebhookTestResult + public WebhookTestResult SendTestData(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = SendTestDataWithHttpInfo(webhookId); + return localVarResponse.Data; + } + + /// + /// Send webhook test data + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of WebhookTestResult + public mailslurp.Client.ApiResponse SendTestDataWithHttpInfo(Guid webhookId, int operationIndex = 0) + { + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.SendTestData"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/webhooks/{webhookId}/test", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendTestData", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send webhook test data + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookTestResult + public async System.Threading.Tasks.Task SendTestDataAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await SendTestDataWithHttpInfoAsync(webhookId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Send webhook test data + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookTestResult) + public async System.Threading.Tasks.Task> SendTestDataWithHttpInfoAsync(Guid webhookId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + + localVarRequestOptions.Operation = "WebhookControllerApi.SendTestData"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/webhooks/{webhookId}/test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SendTestData", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a webhook request headers + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// WebhookDto + public WebhookDto UpdateWebhookHeaders(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = UpdateWebhookHeadersWithHttpInfo(webhookId, webhookHeaders); + return localVarResponse.Data; + } + + /// + /// Update a webhook request headers + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of WebhookDto + public mailslurp.Client.ApiResponse UpdateWebhookHeadersWithHttpInfo(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0) + { + // verify the required parameter 'webhookHeaders' is set + if (webhookHeaders == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'webhookHeaders' when calling WebhookControllerApi->UpdateWebhookHeaders"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + localVarRequestOptions.Data = webhookHeaders; + + localVarRequestOptions.Operation = "WebhookControllerApi.UpdateWebhookHeaders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/webhooks/{webhookId}/headers", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateWebhookHeaders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a webhook request headers + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of WebhookDto + public async System.Threading.Tasks.Task UpdateWebhookHeadersAsync(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await UpdateWebhookHeadersWithHttpInfoAsync(webhookId, webhookHeaders, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update a webhook request headers + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (WebhookDto) + public async System.Threading.Tasks.Task> UpdateWebhookHeadersWithHttpInfoAsync(Guid webhookId, WebhookHeaders webhookHeaders, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'webhookHeaders' is set + if (webhookHeaders == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'webhookHeaders' when calling WebhookControllerApi->UpdateWebhookHeaders"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("webhookId", mailslurp.Client.ClientUtils.ParameterToString(webhookId)); // path parameter + localVarRequestOptions.Data = webhookHeaders; + + localVarRequestOptions.Operation = "WebhookControllerApi.UpdateWebhookHeaders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/webhooks/{webhookId}/headers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateWebhookHeaders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Verify a webhook payload signature Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// VerifyWebhookSignatureResults + public VerifyWebhookSignatureResults VerifyWebhookSignature(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0) + { + mailslurp.Client.ApiResponse localVarResponse = VerifyWebhookSignatureWithHttpInfo(verifyWebhookSignatureOptions); + return localVarResponse.Data; + } + + /// + /// Verify a webhook payload signature Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of VerifyWebhookSignatureResults + public mailslurp.Client.ApiResponse VerifyWebhookSignatureWithHttpInfo(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0) + { + // verify the required parameter 'verifyWebhookSignatureOptions' is set + if (verifyWebhookSignatureOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'verifyWebhookSignatureOptions' when calling WebhookControllerApi->VerifyWebhookSignature"); + } + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = verifyWebhookSignatureOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.VerifyWebhookSignature"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/webhooks/verify", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("VerifyWebhookSignature", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Verify a webhook payload signature Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of VerifyWebhookSignatureResults + public async System.Threading.Tasks.Task VerifyWebhookSignatureAsync(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + mailslurp.Client.ApiResponse localVarResponse = await VerifyWebhookSignatureWithHttpInfoAsync(verifyWebhookSignatureOptions, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Verify a webhook payload signature Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (VerifyWebhookSignatureResults) + public async System.Threading.Tasks.Task> VerifyWebhookSignatureWithHttpInfoAsync(VerifyWebhookSignatureOptions verifyWebhookSignatureOptions, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'verifyWebhookSignatureOptions' is set + if (verifyWebhookSignatureOptions == null) + { + throw new mailslurp.Client.ApiException(400, "Missing required parameter 'verifyWebhookSignatureOptions' when calling WebhookControllerApi->VerifyWebhookSignature"); + } + + + mailslurp.Client.RequestOptions localVarRequestOptions = new mailslurp.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "*/*" + }; + + var localVarContentType = mailslurp.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = mailslurp.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = verifyWebhookSignatureOptions; + + localVarRequestOptions.Operation = "WebhookControllerApi.VerifyWebhookSignature"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (API_KEY) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("x-api-key"))) + { + localVarRequestOptions.HeaderParameters.Add("x-api-key", this.Configuration.GetApiKeyWithPrefix("x-api-key")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/webhooks/verify", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("VerifyWebhookSignature", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/mailslurp/Client/ApiClient.cs b/src/mailslurp/Client/ApiClient.cs new file mode 100644 index 00000000..fb13e7e1 --- /dev/null +++ b/src/mailslurp/Client/ApiClient.cs @@ -0,0 +1,835 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters; +using System.Text; +using System.Threading; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Web; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using RestSharp; +using RestSharp.Serializers; +using RestSharpMethod = RestSharp.Method; +using Polly; + +namespace mailslurp.Client +{ + /// + /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. + /// + internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer + { + private readonly IReadableConfiguration _configuration; + private static readonly string _contentType = "application/json"; + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + public CustomJsonCodec(IReadableConfiguration configuration) + { + _configuration = configuration; + } + + public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) + { + _serializerSettings = serializerSettings; + _configuration = configuration; + } + + /// + /// Serialize the object into a JSON string. + /// + /// Object to be serialized. + /// A JSON string. + public string Serialize(object obj) + { + if (obj != null && obj is mailslurp.Model.AbstractOpenAPISchema) + { + // the object to be serialized is an oneOf/anyOf schema + return ((mailslurp.Model.AbstractOpenAPISchema)obj).ToJson(); + } + else + { + return JsonConvert.SerializeObject(obj, _serializerSettings); + } + } + + public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); + + public T Deserialize(RestResponse response) + { + var result = (T)Deserialize(response, typeof(T)); + return result; + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + internal object Deserialize(RestResponse response, Type type) + { + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + var bytes = response.RawBytes; + if (response.Headers != null) + { + var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) + ? Path.GetTempPath() + : _configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in response.Headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, bytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(bytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return Convert.ChangeType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + public ISerializer Serializer => this; + public IDeserializer Deserializer => this; + + public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept; + + public SupportsContentType SupportsContentType => contentType => + contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + + public string ContentType + { + get { return _contentType; } + set { throw new InvalidOperationException("Not allowed to set content type."); } + } + + public DataFormat DataFormat => DataFormat.Json; + } + /// + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), + /// encapsulating general REST accessor use cases. + /// + public partial class ApiClient : ISynchronousClient, IAsynchronousClient + { + private readonly string _baseUrl; + + /// + /// Specifies the settings on a object. + /// These settings can be adjusted to accommodate custom serialization rules. + /// + public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(RestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(RestRequest request, RestResponse response); + + /// + /// Initializes a new instance of the , defaulting to the global configurations' base url. + /// + public ApiClient() + { + _baseUrl = mailslurp.Client.GlobalConfiguration.Instance.BasePath; + } + + /// + /// Initializes a new instance of the + /// + /// The target service's base path in URL format. + /// + public ApiClient(string basePath) + { + if (string.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + _baseUrl = basePath; + } + + /// + /// Constructs the RestSharp version of an http method + /// + /// Swagger Client Custom HttpMethod + /// RestSharp's HttpMethod instance. + /// + private RestSharpMethod Method(HttpMethod method) + { + RestSharpMethod other; + switch (method) + { + case HttpMethod.Get: + other = RestSharpMethod.Get; + break; + case HttpMethod.Post: + other = RestSharpMethod.Post; + break; + case HttpMethod.Put: + other = RestSharpMethod.Put; + break; + case HttpMethod.Delete: + other = RestSharpMethod.Delete; + break; + case HttpMethod.Head: + other = RestSharpMethod.Head; + break; + case HttpMethod.Options: + other = RestSharpMethod.Options; + break; + case HttpMethod.Patch: + other = RestSharpMethod.Patch; + break; + default: + throw new ArgumentOutOfRangeException("method", method, null); + } + + return other; + } + + /// + /// Provides all logic for constructing a new RestSharp . + /// At this point, all information for querying the service is known. Here, it is simply + /// mapped into the RestSharp request. + /// + /// The http verb. + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// [private] A new RestRequest instance. + /// + private RestRequest NewRequest( + HttpMethod method, + string path, + RequestOptions options, + IReadableConfiguration configuration) + { + if (path == null) throw new ArgumentNullException("path"); + if (options == null) throw new ArgumentNullException("options"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + RestRequest request = new RestRequest(path, Method(method)); + + if (options.PathParameters != null) + { + foreach (var pathParam in options.PathParameters) + { + request.AddParameter(pathParam.Key, pathParam.Value, ParameterType.UrlSegment); + } + } + + if (options.QueryParameters != null) + { + foreach (var queryParam in options.QueryParameters) + { + foreach (var value in queryParam.Value) + { + request.AddQueryParameter(queryParam.Key, value); + } + } + } + + if (configuration.DefaultHeaders != null) + { + foreach (var headerParam in configuration.DefaultHeaders) + { + request.AddHeader(headerParam.Key, headerParam.Value); + } + } + + if (options.HeaderParameters != null) + { + foreach (var headerParam in options.HeaderParameters) + { + foreach (var value in headerParam.Value) + { + request.AddHeader(headerParam.Key, value); + } + } + } + + if (options.FormParameters != null) + { + foreach (var formParam in options.FormParameters) + { + request.AddParameter(formParam.Key, formParam.Value); + } + } + + if (options.Data != null) + { + if (options.Data is Stream stream) + { + var contentType = "application/octet-stream"; + if (options.HeaderParameters != null) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + contentType = contentTypes[0]; + } + + var bytes = ClientUtils.ReadAsBytes(stream); + request.AddParameter(contentType, bytes, ParameterType.RequestBody); + } + else + { + if (options.HeaderParameters != null) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + if (contentTypes == null || contentTypes.Any(header => header.Contains("application/json"))) + { + request.RequestFormat = DataFormat.Json; + } + else + { + // TODO: Generated client user should add additional handlers. RestSharp only supports XML and JSON, with XML as default. + } + } + else + { + // Here, we'll assume JSON APIs are more common. XML can be forced by adding produces/consumes to openapi spec explicitly. + request.RequestFormat = DataFormat.Json; + } + + request.AddJsonBody(options.Data); + } + } + + if (options.FileParameters != null) + { + foreach (var fileParam in options.FileParameters) + { + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); + else + request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); + } + } + } + + return request; + } + + private ApiResponse ToApiResponse(RestResponse response) + { + T result = response.Data; + string rawContent = response.Content; + + var transformed = new ApiResponse(response.StatusCode, new Multimap(), result, rawContent) + { + ErrorText = response.ErrorMessage, + Cookies = new List() + }; + + if (response.Headers != null) + { + foreach (var responseHeader in response.Headers) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + if (response.ContentHeaders != null) + { + foreach (var responseHeader in response.ContentHeaders) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + if (response.Cookies != null) + { + foreach (var responseCookies in response.Cookies.Cast()) + { + transformed.Cookies.Add( + new Cookie( + responseCookies.Name, + responseCookies.Value, + responseCookies.Path, + responseCookies.Domain) + ); + } + } + + return transformed; + } + + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) + { + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + + var cookies = new CookieContainer(); + + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } + } + + var clientOptions = new RestClientOptions(baseUrl) + { + ClientCertificates = configuration.ClientCertificates, + CookieContainer = cookies, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent + }; + + RestClient client = new RestClient(clientOptions) + .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); + + InterceptRequest(req); + + RestResponse response; + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + { + Request = req, + ErrorException = policyResult.FinalException + }; + } + else + { + response = client.Execute(req); + } + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(mailslurp.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + try + { + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; + } + + InterceptResponse(req, response); + + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } + + if (response.Cookies != null && response.Cookies.Count > 0) + { + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) + { + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } + } + return result; + } + + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + + var clientOptions = new RestClientOptions(baseUrl) + { + ClientCertificates = configuration.ClientCertificates, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent + }; + + RestClient client = new RestClient(clientOptions) + .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); + + InterceptRequest(req); + + RestResponse response; + if (RetryConfiguration.AsyncRetryPolicy != null) + { + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + { + Request = req, + ErrorException = policyResult.FinalException + }; + } + else + { + response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); + } + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(mailslurp.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + + InterceptResponse(req, response); + + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } + + if (response.Cookies != null && response.Cookies.Count > 0) + { + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) + { + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } + } + return result; + } + + #region IAsynchronousClient + /// + /// Make a HTTP GET request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP POST request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP PUT request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP DELETE request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP HEAD request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP OPTION request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP PATCH request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); + } + #endregion IAsynchronousClient + + #region ISynchronousClient + /// + /// Make a HTTP GET request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); + } + + /// + /// Make a HTTP POST request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); + } + + /// + /// Make a HTTP PUT request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); + } + + /// + /// Make a HTTP DELETE request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); + } + + /// + /// Make a HTTP HEAD request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); + } + + /// + /// Make a HTTP OPTION request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); + } + + /// + /// Make a HTTP PATCH request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); + } + #endregion ISynchronousClient + } +} diff --git a/src/mailslurp/Client/ApiException.cs b/src/mailslurp/Client/ApiException.cs new file mode 100644 index 00000000..06b60150 --- /dev/null +++ b/src/mailslurp/Client/ApiException.cs @@ -0,0 +1,69 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace mailslurp.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public object ErrorContent { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public Multimap Headers { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() { } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + /// HTTP Headers. + public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + this.Headers = headers; + } + } + +} diff --git a/src/mailslurp/Client/ApiResponse.cs b/src/mailslurp/Client/ApiResponse.cs new file mode 100644 index 00000000..1f90609a --- /dev/null +++ b/src/mailslurp/Client/ApiResponse.cs @@ -0,0 +1,167 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Net; + +namespace mailslurp.Client +{ + /// + /// Provides a non-generic contract for the ApiResponse wrapper. + /// + public interface IApiResponse + { + /// + /// The data type of + /// + Type ResponseType { get; } + + /// + /// The content of this response + /// + Object Content { get; } + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + HttpStatusCode StatusCode { get; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + Multimap Headers { get; } + + /// + /// Gets or sets any error text defined by the calling client. + /// + string ErrorText { get; set; } + + /// + /// Gets or sets any cookies passed along on the response. + /// + List Cookies { get; set; } + + /// + /// The raw content of this response + /// + string RawContent { get; } + } + + /// + /// API Response + /// + public class ApiResponse : IApiResponse + { + #region Properties + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public HttpStatusCode StatusCode { get; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public Multimap Headers { get; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; } + + /// + /// Gets or sets any error text defined by the calling client. + /// + public string ErrorText { get; set; } + + /// + /// Gets or sets any cookies passed along on the response. + /// + public List Cookies { get; set; } + + /// + /// The content of this response + /// + public Type ResponseType + { + get { return typeof(T); } + } + + /// + /// The data type of + /// + public object Content + { + get { return Data; } + } + + /// + /// The raw content + /// + public string RawContent { get; } + + #endregion Properties + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + /// Raw content. + public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data, string rawContent) + { + StatusCode = statusCode; + Headers = headers; + Data = data; + RawContent = rawContent; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) : this(statusCode, headers, data, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Data (parsed HTTP body) + /// Raw content. + public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Data (parsed HTTP body) + public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) + { + } + + #endregion Constructors + } +} diff --git a/src/mailslurp/Client/ClientUtils.cs b/src/mailslurp/Client/ClientUtils.cs new file mode 100644 index 00000000..8f4b1080 --- /dev/null +++ b/src/mailslurp/Client/ClientUtils.cs @@ -0,0 +1,243 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; + +namespace mailslurp.Client +{ + /// + /// Utility functions providing some benefit to API client consumers. + /// + public static class ClientUtils + { + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + return match.Success ? match.Groups[1].Value : filename; + } + + /// + /// Convert params to key/value pairs. + /// Use collectionFormat to properly format lists and collections. + /// + /// The swagger-supported collection format, one of: csv, tsv, ssv, pipes, multi + /// Key name. + /// Value object. + /// A multimap of keys with 1..n associated values. + public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) + { + var parameters = new Multimap(); + + if (value is ICollection collection && collectionFormat == "multi") + { + foreach (var item in collection) + { + parameters.Add(name, ParameterToString(item)); + } + } + else if (value is IDictionary dictionary) + { + if(collectionFormat == "deepObject") { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); + } + } + else { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); + } + } + } + else + { + parameters.Add(name, ParameterToString(value)); + } + + return parameters; + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// An optional configuration instance, providing formatting options used in processing. + /// Formatted string. + public static string ParameterToString(object obj, IReadableConfiguration configuration = null) + { + if (obj is DateTime dateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is DateTimeOffset dateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is bool boolean) + return boolean ? "true" : "false"; + if (obj is ICollection collection) + return string.Join(",", collection.Cast()); + if (obj is Enum && HasEnumMemberAttrValue(obj)) + return GetEnumMemberAttrValue(obj); + + return Convert.ToString(obj, CultureInfo.InvariantCulture); + } + + /// + /// Serializes the given object when not null. Otherwise return null. + /// + /// The object to serialize. + /// Serialized string. + public static string Serialize(object obj) + { + return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; + } + + /// + /// Encode string in base64 format. + /// + /// string to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + using (var ms = new MemoryStream()) + { + inputStream.CopyTo(ms); + return ms.ToArray(); + } + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public static string SelectHeaderContentType(string[] contentTypes) + { + if (contentTypes.Length == 0) + return null; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType)) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public static string SelectHeaderAccept(string[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return string.Join(",", accepts); + } + + /// + /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. + /// + public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + + /// + /// Check if the given MIME is a JSON MIME. + /// JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public static bool IsJsonMime(string mime) + { + if (string.IsNullOrWhiteSpace(mime)) return false; + + return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); + } + + /// + /// Is the Enum decorated with EnumMember Attribute + /// + /// + /// true if found + private static bool HasEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) return true; + return false; + } + + /// + /// Get the EnumMember value + /// + /// + /// EnumMember value as string otherwise null + private static string GetEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) + { + return attr.Value; + } + return null; + } + } +} diff --git a/src/mailslurp/Client/Configuration.cs b/src/mailslurp/Client/Configuration.cs new file mode 100644 index 00000000..71d3c240 --- /dev/null +++ b/src/mailslurp/Client/Configuration.cs @@ -0,0 +1,593 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Net.Http; + +namespace mailslurp.Client +{ + /// + /// Represents a set of configuration settings + /// + public class Configuration : IReadableConfiguration + { + #region Constants + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "15.16.10"; + + /// + /// Identifier for ISO 8601 DateTime Format + /// + /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + // ReSharper disable once InconsistentNaming + public const string ISO8601_DATETIME_FORMAT = "o"; + + #endregion Constants + + #region Static Members + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + var status = (int)response.StatusCode; + if (status >= 400) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.RawContent), + response.RawContent, response.Headers); + } + if (status == 0) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); + } + return null; + }; + + #endregion Static Members + + #region Private Members + + /// + /// Defines the base path of the target API server. + /// Example: http://localhost:3000/v1/ + /// + private string _basePath; + + /// + /// Gets or sets the API key based on the authentication name. + /// This is the key and value comprising the "secret" for accessing an API. + /// + /// The API key. + private IDictionary _apiKey; + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + private IDictionary _apiKeyPrefix; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + private string _tempFolderPath = Path.GetTempPath(); + + /// + /// Gets or sets the servers defined in the OpenAPI spec. + /// + /// The servers + private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + #endregion Private Members + + #region Constructors + + /// + /// Initializes a new instance of the class + /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration() + { + Proxy = null; + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/15.16.10/csharp"); + BasePath = "https://csharp.api.mailslurp.com"; + DefaultHeaders = new ConcurrentDictionary(); + ApiKey = new ConcurrentDictionary(); + ApiKeyPrefix = new ConcurrentDictionary(); + Servers = new List>() + { + { + new Dictionary { + {"url", "https://csharp.api.mailslurp.com"}, + {"description", "MailSlurp API Server"}, + } + } + }; + OperationServers = new Dictionary>>() + { + }; + + // Setting Timeout has side effects (forces ApiClient creation). + Timeout = 100000; + } + + /// + /// Initializes a new instance of the class + /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration( + IDictionary defaultHeaders, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "https://csharp.api.mailslurp.com") : this() + { + if (string.IsNullOrWhiteSpace(basePath)) + throw new ArgumentException("The provided basePath is invalid.", "basePath"); + if (defaultHeaders == null) + throw new ArgumentNullException("defaultHeaders"); + if (apiKey == null) + throw new ArgumentNullException("apiKey"); + if (apiKeyPrefix == null) + throw new ArgumentNullException("apiKeyPrefix"); + + BasePath = basePath; + + foreach (var keyValuePair in defaultHeaders) + { + DefaultHeaders.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKey) + { + ApiKey.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKeyPrefix) + { + ApiKeyPrefix.Add(keyValuePair); + } + } + + #endregion Constructors + + #region Properties + + /// + /// Gets or sets the base path for API access. + /// + public virtual string BasePath { + get { return _basePath; } + set { _basePath = value; } + } + + /// + /// Gets or sets the default header. + /// + [Obsolete("Use DefaultHeaders instead.")] + public virtual IDictionary DefaultHeader + { + get + { + return DefaultHeaders; + } + set + { + DefaultHeaders = value; + } + } + + /// + /// Gets or sets the default headers. + /// + public virtual IDictionary DefaultHeaders { get; set; } + + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + public virtual int Timeout { get; set; } + + /// + /// Gets or sets the proxy + /// + /// Proxy. + public virtual WebProxy Proxy { get; set; } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public virtual string UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public virtual string Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public virtual string Password { get; set; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix(string apiKeyIdentifier) + { + string apiKeyValue; + ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); + string apiKeyPrefix; + if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) + { + return apiKeyPrefix + " " + apiKeyValue; + } + + return apiKeyValue; + } + + /// + /// Gets or sets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + public X509CertificateCollection ClientCertificates { get; set; } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// This helper property simplifies code generation. + /// + /// The access token. + public virtual string AccessToken { get; set; } + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public virtual string TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (string.IsNullOrEmpty(value)) + { + _tempFolderPath = Path.GetTempPath(); + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + { + Directory.CreateDirectory(value); + } + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + { + _tempFolderPath = value; + } + else + { + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + } + + /// + /// Gets or sets the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public virtual string DateTimeFormat + { + get { return _dateTimeFormat; } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// Whatever you set here will be prepended to the value defined in AddApiKey. + /// + /// An example invocation here might be: + /// + /// ApiKeyPrefix["Authorization"] = "Bearer"; + /// + /// … where ApiKey["Authorization"] would then be used to set the value of your bearer token. + /// + /// + /// OAuth2 workflows should set tokens via AccessToken. + /// + /// + /// The prefix of the API key. + public virtual IDictionary ApiKeyPrefix + { + get { return _apiKeyPrefix; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); + } + _apiKeyPrefix = value; + } + } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public virtual IDictionary ApiKey + { + get { return _apiKey; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKey collection may not be null."); + } + _apiKey = value; + } + } + + /// + /// Gets or sets the servers. + /// + /// The servers. + public virtual IList> Servers + { + get { return _servers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Servers may not be null."); + } + _servers = value; + } + } + + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + + /// + /// Returns URL based on server settings without providing values + /// for the variables + /// + /// Array index of the server settings. + /// The server URL. + public string GetServerUrl(int index) + { + return GetServerUrl(Servers, index, null); + } + + /// + /// Returns URL based on server settings. + /// + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + public string GetServerUrl(int index, Dictionary inputVariables) + { + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) + { + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); + } + + if (inputVariables == null) + { + inputVariables = new Dictionary(); + } + + IReadOnlyDictionary server = servers[index]; + string url = (string)server["url"]; + + if (server.ContainsKey("variables")) + { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { + + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + + if (inputVariables.ContainsKey(variable.Key)) + { + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } + } + else + { + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); + } + } + } + + return url; + } + + #endregion Properties + + #region Methods + + /// + /// Returns a string with essential information for debugging. + /// + public static string ToDebugReport() + { + string report = "C# SDK (mailslurp) Debug Report:\n"; + report += " OS: " + System.Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " Version of the API: 6.5.2\n"; + report += " SDK Package Version: 15.16.10\n"; + + return report; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + #endregion Methods + + #region Static Members + /// + /// Merge configurations. + /// + /// First configuration. + /// Second configuration. + /// Merged configuration. + public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) + { + if (second == null) return first ?? GlobalConfiguration.Instance; + + Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + + foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; + foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; + foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; + + var config = new Configuration + { + ApiKey = apiKey, + ApiKeyPrefix = apiKeyPrefix, + DefaultHeaders = defaultHeaders, + BasePath = second.BasePath ?? first.BasePath, + Timeout = second.Timeout, + Proxy = second.Proxy ?? first.Proxy, + UserAgent = second.UserAgent ?? first.UserAgent, + Username = second.Username ?? first.Username, + Password = second.Password ?? first.Password, + AccessToken = second.AccessToken ?? first.AccessToken, + TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + }; + return config; + } + #endregion Static Members + } +} diff --git a/src/mailslurp/Client/ExceptionFactory.cs b/src/mailslurp/Client/ExceptionFactory.cs new file mode 100644 index 00000000..2d6fc1f5 --- /dev/null +++ b/src/mailslurp/Client/ExceptionFactory.cs @@ -0,0 +1,23 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace mailslurp.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IApiResponse response); +} diff --git a/src/mailslurp/Client/GlobalConfiguration.cs b/src/mailslurp/Client/GlobalConfiguration.cs new file mode 100644 index 00000000..be35b815 --- /dev/null +++ b/src/mailslurp/Client/GlobalConfiguration.cs @@ -0,0 +1,68 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System.Collections.Generic; + +namespace mailslurp.Client +{ + /// + /// provides a compile-time extension point for globally configuring + /// API Clients. + /// + /// + /// A customized implementation via partial class may reside in another file and may + /// be excluded from automatic generation via a .openapi-generator-ignore file. + /// + public partial class GlobalConfiguration : Configuration + { + #region Private Members + + private static readonly object GlobalConfigSync = new { }; + private static IReadableConfiguration _globalConfiguration; + + #endregion Private Members + + #region Constructors + + /// + private GlobalConfiguration() + { + } + + /// + public GlobalConfiguration(IDictionary defaultHeader, IDictionary apiKey, IDictionary apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath) + { + } + + static GlobalConfiguration() + { + Instance = new GlobalConfiguration(); + } + + #endregion Constructors + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static IReadableConfiguration Instance + { + get { return _globalConfiguration; } + set + { + lock (GlobalConfigSync) + { + _globalConfiguration = value; + } + } + } + } +} diff --git a/src/mailslurp/Client/HttpMethod.cs b/src/mailslurp/Client/HttpMethod.cs new file mode 100644 index 00000000..54dd299e --- /dev/null +++ b/src/mailslurp/Client/HttpMethod.cs @@ -0,0 +1,34 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +namespace mailslurp.Client +{ + /// + /// Http methods supported by swagger + /// + public enum HttpMethod + { + /// HTTP GET request. + Get, + /// HTTP POST request. + Post, + /// HTTP PUT request. + Put, + /// HTTP DELETE request. + Delete, + /// HTTP HEAD request. + Head, + /// HTTP OPTIONS request. + Options, + /// HTTP PATCH request. + Patch + } +} diff --git a/src/mailslurp/Client/IApiAccessor.cs b/src/mailslurp/Client/IApiAccessor.cs new file mode 100644 index 00000000..f6c6acf4 --- /dev/null +++ b/src/mailslurp/Client/IApiAccessor.cs @@ -0,0 +1,38 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace mailslurp.Client +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + IReadableConfiguration Configuration { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + string GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/src/mailslurp/Client/IAsynchronousClient.cs b/src/mailslurp/Client/IAsynchronousClient.cs new file mode 100644 index 00000000..f9a7817f --- /dev/null +++ b/src/mailslurp/Client/IAsynchronousClient.cs @@ -0,0 +1,101 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Threading.Tasks; + +namespace mailslurp.Client +{ + /// + /// Contract for Asynchronous RESTful API interactions. + /// + /// This interface allows consumers to provide a custom API accessor client. + /// + public interface IAsynchronousClient + { + /// + /// Executes a non-blocking call to some using the GET http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the POST http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the PUT http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the DELETE http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the HEAD http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the OPTIONS http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the PATCH http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } +} diff --git a/src/mailslurp/Client/IReadableConfiguration.cs b/src/mailslurp/Client/IReadableConfiguration.cs new file mode 100644 index 00000000..4646ebc6 --- /dev/null +++ b/src/mailslurp/Client/IReadableConfiguration.cs @@ -0,0 +1,130 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Net; +using System.Security.Cryptography.X509Certificates; + +namespace mailslurp.Client +{ + /// + /// Represents a readable-only configuration contract. + /// + public interface IReadableConfiguration + { + /// + /// Gets the access token. + /// + /// Access token. + string AccessToken { get; } + + /// + /// Gets the API key. + /// + /// API key. + IDictionary ApiKey { get; } + + /// + /// Gets the API key prefix. + /// + /// API key prefix. + IDictionary ApiKeyPrefix { get; } + + /// + /// Gets the base path. + /// + /// Base path. + string BasePath { get; } + + /// + /// Gets the date time format. + /// + /// Date time format. + string DateTimeFormat { get; } + + /// + /// Gets the default header. + /// + /// Default header. + [Obsolete("Use DefaultHeaders instead.")] + IDictionary DefaultHeader { get; } + + /// + /// Gets the default headers. + /// + /// Default headers. + IDictionary DefaultHeaders { get; } + + /// + /// Gets the temp folder path. + /// + /// Temp folder path. + string TempFolderPath { get; } + + /// + /// Gets the HTTP connection timeout (in milliseconds) + /// + /// HTTP connection timeout. + int Timeout { get; } + + /// + /// Gets the proxy. + /// + /// Proxy. + WebProxy Proxy { get; } + + /// + /// Gets the user agent. + /// + /// User agent. + string UserAgent { get; } + + /// + /// Gets the username. + /// + /// Username. + string Username { get; } + + /// + /// Gets the password. + /// + /// Password. + string Password { get; } + + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + string GetApiKeyWithPrefix(string apiKeyIdentifier); + + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + + /// + /// Gets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + X509CertificateCollection ClientCertificates { get; } + } +} diff --git a/src/mailslurp/Client/ISynchronousClient.cs b/src/mailslurp/Client/ISynchronousClient.cs new file mode 100644 index 00000000..1ac14c0b --- /dev/null +++ b/src/mailslurp/Client/ISynchronousClient.cs @@ -0,0 +1,94 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.IO; + +namespace mailslurp.Client +{ + /// + /// Contract for Synchronous RESTful API interactions. + /// + /// This interface allows consumers to provide a custom API accessor client. + /// + public interface ISynchronousClient + { + /// + /// Executes a blocking call to some using the GET http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the POST http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the PUT http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the DELETE http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the HEAD http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the OPTIONS http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the PATCH http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null); + } +} diff --git a/src/mailslurp/Client/Multimap.cs b/src/mailslurp/Client/Multimap.cs new file mode 100644 index 00000000..9883c12e --- /dev/null +++ b/src/mailslurp/Client/Multimap.cs @@ -0,0 +1,296 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace mailslurp.Client +{ + /// + /// A dictionary in which one key has many associated values. + /// + /// The type of the key + /// The type of the value associated with the key. + public class Multimap : IDictionary> + { + #region Private Fields + + private readonly Dictionary> _dictionary; + + #endregion Private Fields + + #region Constructors + + /// + /// Empty Constructor. + /// + public Multimap() + { + _dictionary = new Dictionary>(); + } + + /// + /// Constructor with comparer. + /// + /// + public Multimap(IEqualityComparer comparer) + { + _dictionary = new Dictionary>(comparer); + } + + #endregion Constructors + + #region Enumerators + + /// + /// To get the enumerator. + /// + /// Enumerator + public IEnumerator>> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + /// + /// To get the enumerator. + /// + /// Enumerator + IEnumerator IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + #endregion Enumerators + + #region Public Members + /// + /// Add values to Multimap + /// + /// Key value pair + public void Add(KeyValuePair> item) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + + /// + /// Add Multimap to Multimap + /// + /// Multimap + public void Add(Multimap multimap) + { + foreach (var item in multimap) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + + /// + /// Clear Multimap + /// + public void Clear() + { + _dictionary.Clear(); + } + + /// + /// Determines whether Multimap contains the specified item. + /// + /// Key value pair + /// Method needs to be implemented + /// true if the Multimap contains the item; otherwise, false. + public bool Contains(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Copy items of the Multimap to an array, + /// starting at a particular array index. + /// + /// The array that is the destination of the items copied + /// from Multimap. The array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + /// Method needs to be implemented + public void CopyTo(KeyValuePair>[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + /// + /// Removes the specified item from the Multimap. + /// + /// Key value pair + /// true if the item is successfully removed; otherwise, false. + /// Method needs to be implemented + public bool Remove(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Gets the number of items contained in the Multimap. + /// + public int Count => _dictionary.Count; + + /// + /// Gets a value indicating whether the Multimap is read-only. + /// + public bool IsReadOnly => false; + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// The object to use as the key of the item to add. + /// The object to use as the value of the item to add. + /// Thrown when couldn't add the value to Multimap. + public void Add(TKey key, IList value) + { + if (value != null && value.Count > 0) + { + if (_dictionary.TryGetValue(key, out var list)) + { + foreach (var k in value) list.Add(k); + } + else + { + list = new List(value); + if (!TryAdd(key, list)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + } + + /// + /// Determines whether the Multimap contains an item with the specified key. + /// + /// The key to locate in the Multimap. + /// true if the Multimap contains an item with + /// the key; otherwise, false. + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + /// + /// Removes item with the specified key from the Multimap. + /// + /// The key to locate in the Multimap. + /// true if the item is successfully removed; otherwise, false. + public bool Remove(TKey key) + { + return TryRemove(key, out var _); + } + + /// + /// Gets the value associated with the specified key. + /// + /// The key whose value to get. + /// When this method returns, the value associated with the specified key, if the + /// key is found; otherwise, the default value for the type of the value parameter. + /// This parameter is passed uninitialized. + /// true if the object that implements Multimap contains + /// an item with the specified key; otherwise, false. + public bool TryGetValue(TKey key, out IList value) + { + return _dictionary.TryGetValue(key, out value); + } + + /// + /// Gets or sets the item with the specified key. + /// + /// The key of the item to get or set. + /// The value of the specified key. + public IList this[TKey key] + { + get => _dictionary[key]; + set => _dictionary[key] = value; + } + + /// + /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. + /// + public ICollection Keys => _dictionary.Keys; + + /// + /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. + /// + public ICollection> Values => _dictionary.Values; + + /// + /// Copy the items of the Multimap to an System.Array, + /// starting at a particular System.Array index. + /// + /// The one-dimensional System.Array that is the destination of the items copied + /// from Multimap. The System.Array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + public void CopyTo(Array array, int index) + { + ((ICollection)_dictionary).CopyTo(array, index); + } + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// The object to use as the key of the item to add. + /// The object to use as the value of the item to add. + /// Thrown when couldn't add value to Multimap. + public void Add(TKey key, TValue value) + { + if (value != null) + { + if (_dictionary.TryGetValue(key, out var list)) + { + list.Add(value); + } + else + { + list = new List { value }; + if (!TryAdd(key, list)) + throw new InvalidOperationException("Could not add value to Multimap."); + } + } + } + + #endregion Public Members + + #region Private Members + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryRemove(TKey key, out IList value) + { + _dictionary.TryGetValue(key, out value); + return _dictionary.Remove(key); + } + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryAdd(TKey key, IList value) + { + try + { + _dictionary.Add(key, value); + } + catch (ArgumentException) + { + return false; + } + + return true; + } + #endregion Private Members + } +} diff --git a/src/mailslurp/Client/OpenAPIDateConverter.cs b/src/mailslurp/Client/OpenAPIDateConverter.cs new file mode 100644 index 00000000..c3d7831c --- /dev/null +++ b/src/mailslurp/Client/OpenAPIDateConverter.cs @@ -0,0 +1,30 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using Newtonsoft.Json.Converters; + +namespace mailslurp.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public OpenAPIDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/src/mailslurp/Client/RequestOptions.cs b/src/mailslurp/Client/RequestOptions.cs new file mode 100644 index 00000000..e3e1bb28 --- /dev/null +++ b/src/mailslurp/Client/RequestOptions.cs @@ -0,0 +1,85 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; + +namespace mailslurp.Client +{ + /// + /// A container for generalized request inputs. This type allows consumers to extend the request functionality + /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). + /// + public class RequestOptions + { + /// + /// Parameters to be bound to path parts of the Request's URL + /// + public Dictionary PathParameters { get; set; } + + /// + /// Query parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap QueryParameters { get; set; } + + /// + /// Header parameters to be applied to to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap HeaderParameters { get; set; } + + /// + /// Form parameters to be sent along with the request. + /// + public Dictionary FormParameters { get; set; } + + /// + /// File parameters to be sent along with the request. + /// + public Multimap FileParameters { get; set; } + + /// + /// Cookies to be sent along with the request. + /// + public List Cookies { get; set; } + + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + + /// + /// Any data associated with a request body. + /// + public Object Data { get; set; } + + /// + /// Constructs a new instance of + /// + public RequestOptions() + { + PathParameters = new Dictionary(); + QueryParameters = new Multimap(); + HeaderParameters = new Multimap(); + FormParameters = new Dictionary(); + FileParameters = new Multimap(); + Cookies = new List(); + } + } +} diff --git a/src/mailslurp/Client/RetryConfiguration.cs b/src/mailslurp/Client/RetryConfiguration.cs new file mode 100644 index 00000000..107c2281 --- /dev/null +++ b/src/mailslurp/Client/RetryConfiguration.cs @@ -0,0 +1,32 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Polly; +using RestSharp; + +namespace mailslurp.Client +{ + /// + /// Configuration class to set the polly retry policies to be applied to the requests. + /// + public static class RetryConfiguration + { + /// + /// Retry policy + /// + public static Policy RetryPolicy { get; set; } + + /// + /// Async retry policy + /// + public static AsyncPolicy AsyncRetryPolicy { get; set; } + } +} diff --git a/src/mailslurp/Model/AbstractOpenAPISchema.cs b/src/mailslurp/Model/AbstractOpenAPISchema.cs new file mode 100644 index 00000000..bc840d98 --- /dev/null +++ b/src/mailslurp/Model/AbstractOpenAPISchema.cs @@ -0,0 +1,77 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +namespace mailslurp.Model +{ + /// + /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification + /// + public abstract partial class AbstractOpenAPISchema + { + /// + /// Custom JSON serializer + /// + static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Error, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Custom JSON serializer for objects with additional properties + /// + static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Ignore, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Gets or Sets the actual instance + /// + public abstract Object ActualInstance { get; set; } + + /// + /// Gets or Sets IsNullable to indicate whether the instance is nullable + /// + public bool IsNullable { get; protected set; } + + /// + /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` + /// + public string SchemaType { get; protected set; } + + /// + /// Converts the instance into JSON string. + /// + public abstract string ToJson(); + } +} diff --git a/src/mailslurp/Model/AbstractWebhookPayload.cs b/src/mailslurp/Model/AbstractWebhookPayload.cs new file mode 100644 index 00000000..9892f301 --- /dev/null +++ b/src/mailslurp/Model/AbstractWebhookPayload.cs @@ -0,0 +1,257 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the `NEW_EMAIL`,`NEW_CONTACT`, `NEW_ATTACHMENT` and `EMAIL_OPENED` payloads for the properties available for those events. + /// + [DataContract(Name = "AbstractWebhookPayload")] + public partial class AbstractWebhookPayload : IEquatable, IValidatableObject + { + /// + /// Defines EventName + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Gets or Sets EventName + /// + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AbstractWebhookPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// eventName (required). + /// messageId (required). + /// webhookId (required). + /// webhookName. + public AbstractWebhookPayload(EventNameEnum eventName = default(EventNameEnum), string messageId = default(string), Guid webhookId = default(Guid), string webhookName = default(string)) + { + this.EventName = eventName; + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for AbstractWebhookPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.WebhookName = webhookName; + } + + /// + /// Gets or Sets MessageId + /// + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// Gets or Sets WebhookId + /// + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Gets or Sets WebhookName + /// + [DataMember(Name = "webhookName", EmitDefaultValue = false)] + public string WebhookName { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AbstractWebhookPayload {\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AbstractWebhookPayload); + } + + /// + /// Returns true if AbstractWebhookPayload instances are equal + /// + /// Instance of AbstractWebhookPayload to be compared + /// Boolean + public bool Equals(AbstractWebhookPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/AliasDto.cs b/src/mailslurp/Model/AliasDto.cs new file mode 100644 index 00000000..2071e304 --- /dev/null +++ b/src/mailslurp/Model/AliasDto.cs @@ -0,0 +1,302 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email alias representation + /// + [DataContract(Name = "AliasDto")] + public partial class AliasDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AliasDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// The alias's email address for receiving email (required). + /// The underlying email address that is hidden and will received forwarded email. + /// userId (required). + /// Inbox that is associated with the alias (required). + /// name. + /// If alias will generate response threads or not when email are received by it. + /// Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account (required). + /// createdAt. + /// updatedAt. + public AliasDto(Guid id = default(Guid), string emailAddress = default(string), string maskedEmailAddress = default(string), Guid userId = default(Guid), Guid inboxId = default(Guid), string name = default(string), bool? useThreads = default(bool?), bool isVerified = default(bool), DateTime? createdAt = default(DateTime?), DateTime? updatedAt = default(DateTime?)) + { + this.Id = id; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for AliasDto and cannot be null"); + } + this.EmailAddress = emailAddress; + this.UserId = userId; + this.InboxId = inboxId; + this.IsVerified = isVerified; + this.MaskedEmailAddress = maskedEmailAddress; + this.Name = name; + this.UseThreads = useThreads; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// The alias's email address for receiving email + /// + /// The alias's email address for receiving email + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// The underlying email address that is hidden and will received forwarded email + /// + /// The underlying email address that is hidden and will received forwarded email + [DataMember(Name = "maskedEmailAddress", EmitDefaultValue = true)] + public string MaskedEmailAddress { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Inbox that is associated with the alias + /// + /// Inbox that is associated with the alias + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// If alias will generate response threads or not when email are received by it + /// + /// If alias will generate response threads or not when email are received by it + [DataMember(Name = "useThreads", EmitDefaultValue = true)] + public bool? UseThreads { get; set; } + + /// + /// Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account + /// + /// Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account + [DataMember(Name = "isVerified", IsRequired = true, EmitDefaultValue = true)] + public bool IsVerified { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", EmitDefaultValue = true)] + public DateTime? CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", EmitDefaultValue = true)] + public DateTime? UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AliasDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" MaskedEmailAddress: ").Append(MaskedEmailAddress).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" UseThreads: ").Append(UseThreads).Append("\n"); + sb.Append(" IsVerified: ").Append(IsVerified).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AliasDto); + } + + /// + /// Returns true if AliasDto instances are equal + /// + /// Instance of AliasDto to be compared + /// Boolean + public bool Equals(AliasDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.MaskedEmailAddress == input.MaskedEmailAddress || + (this.MaskedEmailAddress != null && + this.MaskedEmailAddress.Equals(input.MaskedEmailAddress)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.UseThreads == input.UseThreads || + (this.UseThreads != null && + this.UseThreads.Equals(input.UseThreads)) + ) && + ( + this.IsVerified == input.IsVerified || + this.IsVerified.Equals(input.IsVerified) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.MaskedEmailAddress != null) + { + hashCode = (hashCode * 59) + this.MaskedEmailAddress.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.UseThreads != null) + { + hashCode = (hashCode * 59) + this.UseThreads.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsVerified.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/AliasProjection.cs b/src/mailslurp/Model/AliasProjection.cs new file mode 100644 index 00000000..9e53501e --- /dev/null +++ b/src/mailslurp/Model/AliasProjection.cs @@ -0,0 +1,261 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Representation of a alias + /// + [DataContract(Name = "AliasProjection")] + public partial class AliasProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AliasProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// name. + /// id (required). + /// userId (required). + /// emailAddress (required). + /// inboxId (required). + /// createdAt (required). + /// updatedAt (required). + /// useThreads. + public AliasProjection(string name = default(string), Guid id = default(Guid), Guid userId = default(Guid), string emailAddress = default(string), Guid inboxId = default(Guid), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), bool useThreads = default(bool)) + { + this.Id = id; + this.UserId = userId; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for AliasProjection and cannot be null"); + } + this.EmailAddress = emailAddress; + this.InboxId = inboxId; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Name = name; + this.UseThreads = useThreads; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Gets or Sets UseThreads + /// + [DataMember(Name = "useThreads", EmitDefaultValue = true)] + public bool UseThreads { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AliasProjection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" UseThreads: ").Append(UseThreads).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AliasProjection); + } + + /// + /// Returns true if AliasProjection instances are equal + /// + /// Instance of AliasProjection to be compared + /// Boolean + public bool Equals(AliasProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.UseThreads == input.UseThreads || + this.UseThreads.Equals(input.UseThreads) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.UseThreads.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/AttachmentEntity.cs b/src/mailslurp/Model/AttachmentEntity.cs new file mode 100644 index 00000000..d2791759 --- /dev/null +++ b/src/mailslurp/Model/AttachmentEntity.cs @@ -0,0 +1,279 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// AttachmentEntity + /// + [DataContract(Name = "AttachmentEntity")] + public partial class AttachmentEntity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AttachmentEntity() { } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// attachmentId (required). + /// bucket. + /// userId (required). + /// contentType. + /// contentLength. + /// name. + /// createdAt (required). + /// updatedAt (required). + public AttachmentEntity(Guid id = default(Guid), string attachmentId = default(string), string bucket = default(string), Guid userId = default(Guid), string contentType = default(string), long contentLength = default(long), string name = default(string), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + // to ensure "attachmentId" is required (not null) + if (attachmentId == null) + { + throw new ArgumentNullException("attachmentId is a required property for AttachmentEntity and cannot be null"); + } + this.AttachmentId = attachmentId; + this.UserId = userId; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Id = id; + this.Bucket = bucket; + this.ContentType = contentType; + this.ContentLength = contentLength; + this.Name = name; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + + /// + /// Gets or Sets AttachmentId + /// + [DataMember(Name = "attachmentId", IsRequired = true, EmitDefaultValue = true)] + public string AttachmentId { get; set; } + + /// + /// Gets or Sets Bucket + /// + [DataMember(Name = "bucket", EmitDefaultValue = false)] + public string Bucket { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets ContentType + /// + [DataMember(Name = "contentType", EmitDefaultValue = false)] + public string ContentType { get; set; } + + /// + /// Gets or Sets ContentLength + /// + [DataMember(Name = "contentLength", EmitDefaultValue = false)] + public long ContentLength { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AttachmentEntity {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" AttachmentId: ").Append(AttachmentId).Append("\n"); + sb.Append(" Bucket: ").Append(Bucket).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ContentType: ").Append(ContentType).Append("\n"); + sb.Append(" ContentLength: ").Append(ContentLength).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AttachmentEntity); + } + + /// + /// Returns true if AttachmentEntity instances are equal + /// + /// Instance of AttachmentEntity to be compared + /// Boolean + public bool Equals(AttachmentEntity input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.AttachmentId == input.AttachmentId || + (this.AttachmentId != null && + this.AttachmentId.Equals(input.AttachmentId)) + ) && + ( + this.Bucket == input.Bucket || + (this.Bucket != null && + this.Bucket.Equals(input.Bucket)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.ContentType == input.ContentType || + (this.ContentType != null && + this.ContentType.Equals(input.ContentType)) + ) && + ( + this.ContentLength == input.ContentLength || + this.ContentLength.Equals(input.ContentLength) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.AttachmentId != null) + { + hashCode = (hashCode * 59) + this.AttachmentId.GetHashCode(); + } + if (this.Bucket != null) + { + hashCode = (hashCode * 59) + this.Bucket.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.ContentType != null) + { + hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ContentLength.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/AttachmentMetaData.cs b/src/mailslurp/Model/AttachmentMetaData.cs new file mode 100644 index 00000000..e140ac9b --- /dev/null +++ b/src/mailslurp/Model/AttachmentMetaData.cs @@ -0,0 +1,203 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Meta data associated with an attachment. Attachments are stored as byte blobs so the meta data is stored separately. + /// + [DataContract(Name = "AttachmentMetaData")] + public partial class AttachmentMetaData : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AttachmentMetaData() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of attachment if given (required). + /// Content type of attachment such as `image/png` (required). + /// Size of attachment in bytes (required). + /// ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. (required). + public AttachmentMetaData(string name = default(string), string contentType = default(string), long contentLength = default(long), string id = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for AttachmentMetaData and cannot be null"); + } + this.Name = name; + // to ensure "contentType" is required (not null) + if (contentType == null) + { + throw new ArgumentNullException("contentType is a required property for AttachmentMetaData and cannot be null"); + } + this.ContentType = contentType; + this.ContentLength = contentLength; + // to ensure "id" is required (not null) + if (id == null) + { + throw new ArgumentNullException("id is a required property for AttachmentMetaData and cannot be null"); + } + this.Id = id; + } + + /// + /// Name of attachment if given + /// + /// Name of attachment if given + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Content type of attachment such as `image/png` + /// + /// Content type of attachment such as `image/png` + [DataMember(Name = "contentType", IsRequired = true, EmitDefaultValue = true)] + public string ContentType { get; set; } + + /// + /// Size of attachment in bytes + /// + /// Size of attachment in bytes + [DataMember(Name = "contentLength", IsRequired = true, EmitDefaultValue = true)] + public long ContentLength { get; set; } + + /// + /// ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. + /// + /// ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AttachmentMetaData {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ContentType: ").Append(ContentType).Append("\n"); + sb.Append(" ContentLength: ").Append(ContentLength).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AttachmentMetaData); + } + + /// + /// Returns true if AttachmentMetaData instances are equal + /// + /// Instance of AttachmentMetaData to be compared + /// Boolean + public bool Equals(AttachmentMetaData input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ContentType == input.ContentType || + (this.ContentType != null && + this.ContentType.Equals(input.ContentType)) + ) && + ( + this.ContentLength == input.ContentLength || + this.ContentLength.Equals(input.ContentLength) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.ContentType != null) + { + hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ContentLength.GetHashCode(); + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/AttachmentProjection.cs b/src/mailslurp/Model/AttachmentProjection.cs new file mode 100644 index 00000000..e3e22622 --- /dev/null +++ b/src/mailslurp/Model/AttachmentProjection.cs @@ -0,0 +1,250 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email attachment data + /// + [DataContract(Name = "AttachmentProjection")] + public partial class AttachmentProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AttachmentProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// name. + /// Content length of attachment in bytes. + /// Content type of attachment.. + /// userId (required). + /// createdAt (required). + /// updatedAt (required). + /// Attachment ID (required). + public AttachmentProjection(string name = default(string), long? contentLength = default(long?), string contentType = default(string), Guid userId = default(Guid), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), string attachmentId = default(string)) + { + this.UserId = userId; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + // to ensure "attachmentId" is required (not null) + if (attachmentId == null) + { + throw new ArgumentNullException("attachmentId is a required property for AttachmentProjection and cannot be null"); + } + this.AttachmentId = attachmentId; + this.Name = name; + this.ContentLength = contentLength; + this.ContentType = contentType; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Content length of attachment in bytes + /// + /// Content length of attachment in bytes + [DataMember(Name = "contentLength", EmitDefaultValue = true)] + public long? ContentLength { get; set; } + + /// + /// Content type of attachment. + /// + /// Content type of attachment. + [DataMember(Name = "contentType", EmitDefaultValue = true)] + public string ContentType { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Attachment ID + /// + /// Attachment ID + [DataMember(Name = "attachmentId", IsRequired = true, EmitDefaultValue = true)] + public string AttachmentId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AttachmentProjection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ContentLength: ").Append(ContentLength).Append("\n"); + sb.Append(" ContentType: ").Append(ContentType).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" AttachmentId: ").Append(AttachmentId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AttachmentProjection); + } + + /// + /// Returns true if AttachmentProjection instances are equal + /// + /// Instance of AttachmentProjection to be compared + /// Boolean + public bool Equals(AttachmentProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ContentLength == input.ContentLength || + (this.ContentLength != null && + this.ContentLength.Equals(input.ContentLength)) + ) && + ( + this.ContentType == input.ContentType || + (this.ContentType != null && + this.ContentType.Equals(input.ContentType)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.AttachmentId == input.AttachmentId || + (this.AttachmentId != null && + this.AttachmentId.Equals(input.AttachmentId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.ContentLength != null) + { + hashCode = (hashCode * 59) + this.ContentLength.GetHashCode(); + } + if (this.ContentType != null) + { + hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + if (this.AttachmentId != null) + { + hashCode = (hashCode * 59) + this.AttachmentId.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/BasicAuthOptions.cs b/src/mailslurp/Model/BasicAuthOptions.cs new file mode 100644 index 00000000..a7586fd8 --- /dev/null +++ b/src/mailslurp/Model/BasicAuthOptions.cs @@ -0,0 +1,162 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Basic Authentication options for webhooks. Will be used is present when calling webhook endpoints. + /// + [DataContract(Name = "BasicAuthOptions")] + public partial class BasicAuthOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BasicAuthOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// username (required). + /// password (required). + public BasicAuthOptions(string username = default(string), string password = default(string)) + { + // to ensure "username" is required (not null) + if (username == null) + { + throw new ArgumentNullException("username is a required property for BasicAuthOptions and cannot be null"); + } + this.Username = username; + // to ensure "password" is required (not null) + if (password == null) + { + throw new ArgumentNullException("password is a required property for BasicAuthOptions and cannot be null"); + } + this.Password = password; + } + + /// + /// Gets or Sets Username + /// + [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = true)] + public string Username { get; set; } + + /// + /// Gets or Sets Password + /// + [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = true)] + public string Password { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BasicAuthOptions {\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BasicAuthOptions); + } + + /// + /// Returns true if BasicAuthOptions instances are equal + /// + /// Instance of BasicAuthOptions to be compared + /// Boolean + public bool Equals(BasicAuthOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Username == input.Username || + (this.Username != null && + this.Username.Equals(input.Username)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Username != null) + { + hashCode = (hashCode * 59) + this.Username.GetHashCode(); + } + if (this.Password != null) + { + hashCode = (hashCode * 59) + this.Password.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/BounceProjection.cs b/src/mailslurp/Model/BounceProjection.cs new file mode 100644 index 00000000..7f0cc316 --- /dev/null +++ b/src/mailslurp/Model/BounceProjection.cs @@ -0,0 +1,229 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Bounced email event + /// + [DataContract(Name = "BounceProjection")] + public partial class BounceProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BounceProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// sender (required). + /// subject. + /// createdAt (required). + /// bounceType. + /// bounceMta. + public BounceProjection(Guid id = default(Guid), string sender = default(string), string subject = default(string), DateTime createdAt = default(DateTime), string bounceType = default(string), string bounceMta = default(string)) + { + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new ArgumentNullException("sender is a required property for BounceProjection and cannot be null"); + } + this.Sender = sender; + this.CreatedAt = createdAt; + this.Id = id; + this.Subject = subject; + this.BounceType = bounceType; + this.BounceMta = bounceMta; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name = "sender", IsRequired = true, EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets BounceType + /// + [DataMember(Name = "bounceType", EmitDefaultValue = true)] + public string BounceType { get; set; } + + /// + /// Gets or Sets BounceMta + /// + [DataMember(Name = "bounceMta", EmitDefaultValue = true)] + public string BounceMta { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BounceProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" BounceType: ").Append(BounceType).Append("\n"); + sb.Append(" BounceMta: ").Append(BounceMta).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BounceProjection); + } + + /// + /// Returns true if BounceProjection instances are equal + /// + /// Instance of BounceProjection to be compared + /// Boolean + public bool Equals(BounceProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.BounceType == input.BounceType || + (this.BounceType != null && + this.BounceType.Equals(input.BounceType)) + ) && + ( + this.BounceMta == input.BounceMta || + (this.BounceMta != null && + this.BounceMta.Equals(input.BounceMta)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.BounceType != null) + { + hashCode = (hashCode * 59) + this.BounceType.GetHashCode(); + } + if (this.BounceMta != null) + { + hashCode = (hashCode * 59) + this.BounceMta.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/BounceRecipientProjection.cs b/src/mailslurp/Model/BounceRecipientProjection.cs new file mode 100644 index 00000000..6a0b163e --- /dev/null +++ b/src/mailslurp/Model/BounceRecipientProjection.cs @@ -0,0 +1,229 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Bounced recipient + /// + [DataContract(Name = "BounceRecipientProjection")] + public partial class BounceRecipientProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BounceRecipientProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// status. + /// sentEmailId. + /// createdAt (required). + /// recipient (required). + /// action. + public BounceRecipientProjection(Guid id = default(Guid), string status = default(string), Guid? sentEmailId = default(Guid?), DateTime createdAt = default(DateTime), string recipient = default(string), string action = default(string)) + { + this.CreatedAt = createdAt; + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for BounceRecipientProjection and cannot be null"); + } + this.Recipient = recipient; + this.Id = id; + this.Status = status; + this.SentEmailId = sentEmailId; + this.Action = action; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public string Status { get; set; } + + /// + /// Gets or Sets SentEmailId + /// + [DataMember(Name = "sentEmailId", EmitDefaultValue = true)] + public Guid? SentEmailId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets Recipient + /// + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Gets or Sets Action + /// + [DataMember(Name = "action", EmitDefaultValue = true)] + public string Action { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BounceRecipientProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" SentEmailId: ").Append(SentEmailId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Action: ").Append(Action).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BounceRecipientProjection); + } + + /// + /// Returns true if BounceRecipientProjection instances are equal + /// + /// Instance of BounceRecipientProjection to be compared + /// Boolean + public bool Equals(BounceRecipientProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.SentEmailId == input.SentEmailId || + (this.SentEmailId != null && + this.SentEmailId.Equals(input.SentEmailId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } + if (this.SentEmailId != null) + { + hashCode = (hashCode * 59) + this.SentEmailId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.Action != null) + { + hashCode = (hashCode * 59) + this.Action.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/BouncedEmailDto.cs b/src/mailslurp/Model/BouncedEmailDto.cs new file mode 100644 index 00000000..84a7b08f --- /dev/null +++ b/src/mailslurp/Model/BouncedEmailDto.cs @@ -0,0 +1,344 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Bounced email + /// + [DataContract(Name = "BouncedEmailDto")] + public partial class BouncedEmailDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BouncedEmailDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// notificationType (required). + /// sentToRecipients. + /// sender (required). + /// bounceMta. + /// bounceType. + /// bounceRecipients. + /// bounceSubType. + /// sentEmailId. + /// subject. + /// createdAt (required). + public BouncedEmailDto(Guid id = default(Guid), Guid userId = default(Guid), string notificationType = default(string), List sentToRecipients = default(List), string sender = default(string), string bounceMta = default(string), string bounceType = default(string), List bounceRecipients = default(List), string bounceSubType = default(string), Guid? sentEmailId = default(Guid?), string subject = default(string), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + // to ensure "notificationType" is required (not null) + if (notificationType == null) + { + throw new ArgumentNullException("notificationType is a required property for BouncedEmailDto and cannot be null"); + } + this.NotificationType = notificationType; + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new ArgumentNullException("sender is a required property for BouncedEmailDto and cannot be null"); + } + this.Sender = sender; + this.CreatedAt = createdAt; + this.SentToRecipients = sentToRecipients; + this.BounceMta = bounceMta; + this.BounceType = bounceType; + this.BounceRecipients = bounceRecipients; + this.BounceSubType = bounceSubType; + this.SentEmailId = sentEmailId; + this.Subject = subject; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets NotificationType + /// + [DataMember(Name = "notificationType", IsRequired = true, EmitDefaultValue = true)] + public string NotificationType { get; set; } + + /// + /// Gets or Sets SentToRecipients + /// + [DataMember(Name = "sentToRecipients", EmitDefaultValue = true)] + public List SentToRecipients { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name = "sender", IsRequired = true, EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Gets or Sets BounceMta + /// + [DataMember(Name = "bounceMta", EmitDefaultValue = true)] + public string BounceMta { get; set; } + + /// + /// Gets or Sets BounceType + /// + [DataMember(Name = "bounceType", EmitDefaultValue = true)] + public string BounceType { get; set; } + + /// + /// Gets or Sets BounceRecipients + /// + [DataMember(Name = "bounceRecipients", EmitDefaultValue = true)] + public List BounceRecipients { get; set; } + + /// + /// Gets or Sets BounceSubType + /// + [DataMember(Name = "bounceSubType", EmitDefaultValue = true)] + public string BounceSubType { get; set; } + + /// + /// Gets or Sets SentEmailId + /// + [DataMember(Name = "sentEmailId", EmitDefaultValue = true)] + public Guid? SentEmailId { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BouncedEmailDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" NotificationType: ").Append(NotificationType).Append("\n"); + sb.Append(" SentToRecipients: ").Append(SentToRecipients).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" BounceMta: ").Append(BounceMta).Append("\n"); + sb.Append(" BounceType: ").Append(BounceType).Append("\n"); + sb.Append(" BounceRecipients: ").Append(BounceRecipients).Append("\n"); + sb.Append(" BounceSubType: ").Append(BounceSubType).Append("\n"); + sb.Append(" SentEmailId: ").Append(SentEmailId).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BouncedEmailDto); + } + + /// + /// Returns true if BouncedEmailDto instances are equal + /// + /// Instance of BouncedEmailDto to be compared + /// Boolean + public bool Equals(BouncedEmailDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.NotificationType == input.NotificationType || + (this.NotificationType != null && + this.NotificationType.Equals(input.NotificationType)) + ) && + ( + this.SentToRecipients == input.SentToRecipients || + this.SentToRecipients != null && + input.SentToRecipients != null && + this.SentToRecipients.SequenceEqual(input.SentToRecipients) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.BounceMta == input.BounceMta || + (this.BounceMta != null && + this.BounceMta.Equals(input.BounceMta)) + ) && + ( + this.BounceType == input.BounceType || + (this.BounceType != null && + this.BounceType.Equals(input.BounceType)) + ) && + ( + this.BounceRecipients == input.BounceRecipients || + this.BounceRecipients != null && + input.BounceRecipients != null && + this.BounceRecipients.SequenceEqual(input.BounceRecipients) + ) && + ( + this.BounceSubType == input.BounceSubType || + (this.BounceSubType != null && + this.BounceSubType.Equals(input.BounceSubType)) + ) && + ( + this.SentEmailId == input.SentEmailId || + (this.SentEmailId != null && + this.SentEmailId.Equals(input.SentEmailId)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.NotificationType != null) + { + hashCode = (hashCode * 59) + this.NotificationType.GetHashCode(); + } + if (this.SentToRecipients != null) + { + hashCode = (hashCode * 59) + this.SentToRecipients.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + if (this.BounceMta != null) + { + hashCode = (hashCode * 59) + this.BounceMta.GetHashCode(); + } + if (this.BounceType != null) + { + hashCode = (hashCode * 59) + this.BounceType.GetHashCode(); + } + if (this.BounceRecipients != null) + { + hashCode = (hashCode * 59) + this.BounceRecipients.GetHashCode(); + } + if (this.BounceSubType != null) + { + hashCode = (hashCode * 59) + this.BounceSubType.GetHashCode(); + } + if (this.SentEmailId != null) + { + hashCode = (hashCode * 59) + this.SentEmailId.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/BouncedRecipientDto.cs b/src/mailslurp/Model/BouncedRecipientDto.cs new file mode 100644 index 00000000..379c0295 --- /dev/null +++ b/src/mailslurp/Model/BouncedRecipientDto.cs @@ -0,0 +1,265 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Bounced recipient + /// + [DataContract(Name = "BouncedRecipientDto")] + public partial class BouncedRecipientDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BouncedRecipientDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId. + /// sentEmailId. + /// recipient (required). + /// diagnosticCode. + /// action. + /// status. + /// createdAt (required). + public BouncedRecipientDto(Guid id = default(Guid), Guid? userId = default(Guid?), Guid? sentEmailId = default(Guid?), string recipient = default(string), string diagnosticCode = default(string), string action = default(string), string status = default(string), DateTime createdAt = default(DateTime)) + { + this.Id = id; + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for BouncedRecipientDto and cannot be null"); + } + this.Recipient = recipient; + this.CreatedAt = createdAt; + this.UserId = userId; + this.SentEmailId = sentEmailId; + this.DiagnosticCode = diagnosticCode; + this.Action = action; + this.Status = status; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", EmitDefaultValue = true)] + public Guid? UserId { get; set; } + + /// + /// Gets or Sets SentEmailId + /// + [DataMember(Name = "sentEmailId", EmitDefaultValue = true)] + public Guid? SentEmailId { get; set; } + + /// + /// Gets or Sets Recipient + /// + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Gets or Sets DiagnosticCode + /// + [DataMember(Name = "diagnosticCode", EmitDefaultValue = true)] + public string DiagnosticCode { get; set; } + + /// + /// Gets or Sets Action + /// + [DataMember(Name = "action", EmitDefaultValue = true)] + public string Action { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public string Status { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BouncedRecipientDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" SentEmailId: ").Append(SentEmailId).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" DiagnosticCode: ").Append(DiagnosticCode).Append("\n"); + sb.Append(" Action: ").Append(Action).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BouncedRecipientDto); + } + + /// + /// Returns true if BouncedRecipientDto instances are equal + /// + /// Instance of BouncedRecipientDto to be compared + /// Boolean + public bool Equals(BouncedRecipientDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.SentEmailId == input.SentEmailId || + (this.SentEmailId != null && + this.SentEmailId.Equals(input.SentEmailId)) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.DiagnosticCode == input.DiagnosticCode || + (this.DiagnosticCode != null && + this.DiagnosticCode.Equals(input.DiagnosticCode)) + ) && + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.SentEmailId != null) + { + hashCode = (hashCode * 59) + this.SentEmailId.GetHashCode(); + } + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.DiagnosticCode != null) + { + hashCode = (hashCode * 59) + this.DiagnosticCode.GetHashCode(); + } + if (this.Action != null) + { + hashCode = (hashCode * 59) + this.Action.GetHashCode(); + } + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/BulkSendEmailOptions.cs b/src/mailslurp/Model/BulkSendEmailOptions.cs new file mode 100644 index 00000000..0f0ca3fc --- /dev/null +++ b/src/mailslurp/Model/BulkSendEmailOptions.cs @@ -0,0 +1,164 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for bulk sending an email from multiple addresses. See regular `sendEmail` methods for more information. + /// + [DataContract(Name = "BulkSendEmailOptions")] + public partial class BulkSendEmailOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BulkSendEmailOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Inboxes to send the email from (required). + /// sendEmailOptions (required). + public BulkSendEmailOptions(List inboxIds = default(List), SendEmailOptions sendEmailOptions = default(SendEmailOptions)) + { + // to ensure "inboxIds" is required (not null) + if (inboxIds == null) + { + throw new ArgumentNullException("inboxIds is a required property for BulkSendEmailOptions and cannot be null"); + } + this.InboxIds = inboxIds; + // to ensure "sendEmailOptions" is required (not null) + if (sendEmailOptions == null) + { + throw new ArgumentNullException("sendEmailOptions is a required property for BulkSendEmailOptions and cannot be null"); + } + this.SendEmailOptions = sendEmailOptions; + } + + /// + /// Inboxes to send the email from + /// + /// Inboxes to send the email from + [DataMember(Name = "inboxIds", IsRequired = true, EmitDefaultValue = true)] + public List InboxIds { get; set; } + + /// + /// Gets or Sets SendEmailOptions + /// + [DataMember(Name = "sendEmailOptions", IsRequired = true, EmitDefaultValue = true)] + public SendEmailOptions SendEmailOptions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BulkSendEmailOptions {\n"); + sb.Append(" InboxIds: ").Append(InboxIds).Append("\n"); + sb.Append(" SendEmailOptions: ").Append(SendEmailOptions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BulkSendEmailOptions); + } + + /// + /// Returns true if BulkSendEmailOptions instances are equal + /// + /// Instance of BulkSendEmailOptions to be compared + /// Boolean + public bool Equals(BulkSendEmailOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxIds == input.InboxIds || + this.InboxIds != null && + input.InboxIds != null && + this.InboxIds.SequenceEqual(input.InboxIds) + ) && + ( + this.SendEmailOptions == input.SendEmailOptions || + (this.SendEmailOptions != null && + this.SendEmailOptions.Equals(input.SendEmailOptions)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxIds != null) + { + hashCode = (hashCode * 59) + this.InboxIds.GetHashCode(); + } + if (this.SendEmailOptions != null) + { + hashCode = (hashCode * 59) + this.SendEmailOptions.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/Complaint.cs b/src/mailslurp/Model/Complaint.cs new file mode 100644 index 00000000..aff35a65 --- /dev/null +++ b/src/mailslurp/Model/Complaint.cs @@ -0,0 +1,265 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Complaint + /// + [DataContract(Name = "Complaint")] + public partial class Complaint : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Complaint() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId. + /// eventType. + /// mailSource. + /// mailMessageId. + /// complaintRecipient (required). + /// createdAt (required). + /// updatedAt (required). + public Complaint(Guid id = default(Guid), Guid userId = default(Guid), string eventType = default(string), string mailSource = default(string), string mailMessageId = default(string), string complaintRecipient = default(string), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + // to ensure "complaintRecipient" is required (not null) + if (complaintRecipient == null) + { + throw new ArgumentNullException("complaintRecipient is a required property for Complaint and cannot be null"); + } + this.ComplaintRecipient = complaintRecipient; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.UserId = userId; + this.EventType = eventType; + this.MailSource = mailSource; + this.MailMessageId = mailMessageId; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", EmitDefaultValue = false)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets EventType + /// + [DataMember(Name = "eventType", EmitDefaultValue = false)] + public string EventType { get; set; } + + /// + /// Gets or Sets MailSource + /// + [DataMember(Name = "mailSource", EmitDefaultValue = false)] + public string MailSource { get; set; } + + /// + /// Gets or Sets MailMessageId + /// + [DataMember(Name = "mailMessageId", EmitDefaultValue = false)] + public string MailMessageId { get; set; } + + /// + /// Gets or Sets ComplaintRecipient + /// + [DataMember(Name = "complaintRecipient", IsRequired = true, EmitDefaultValue = true)] + public string ComplaintRecipient { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Complaint {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" EventType: ").Append(EventType).Append("\n"); + sb.Append(" MailSource: ").Append(MailSource).Append("\n"); + sb.Append(" MailMessageId: ").Append(MailMessageId).Append("\n"); + sb.Append(" ComplaintRecipient: ").Append(ComplaintRecipient).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Complaint); + } + + /// + /// Returns true if Complaint instances are equal + /// + /// Instance of Complaint to be compared + /// Boolean + public bool Equals(Complaint input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.EventType == input.EventType || + (this.EventType != null && + this.EventType.Equals(input.EventType)) + ) && + ( + this.MailSource == input.MailSource || + (this.MailSource != null && + this.MailSource.Equals(input.MailSource)) + ) && + ( + this.MailMessageId == input.MailMessageId || + (this.MailMessageId != null && + this.MailMessageId.Equals(input.MailMessageId)) + ) && + ( + this.ComplaintRecipient == input.ComplaintRecipient || + (this.ComplaintRecipient != null && + this.ComplaintRecipient.Equals(input.ComplaintRecipient)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.EventType != null) + { + hashCode = (hashCode * 59) + this.EventType.GetHashCode(); + } + if (this.MailSource != null) + { + hashCode = (hashCode * 59) + this.MailSource.GetHashCode(); + } + if (this.MailMessageId != null) + { + hashCode = (hashCode * 59) + this.MailMessageId.GetHashCode(); + } + if (this.ComplaintRecipient != null) + { + hashCode = (hashCode * 59) + this.ComplaintRecipient.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ConditionOption.cs b/src/mailslurp/Model/ConditionOption.cs new file mode 100644 index 00000000..d3974d12 --- /dev/null +++ b/src/mailslurp/Model/ConditionOption.cs @@ -0,0 +1,182 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for matching emails in an inbox based on a condition such as `HAS_ATTACHMENTS=TRUE` + /// + [DataContract(Name = "ConditionOption")] + public partial class ConditionOption : IEquatable, IValidatableObject + { + /// + /// Condition of an email object that can be used to filter results + /// + /// Condition of an email object that can be used to filter results + [JsonConverter(typeof(StringEnumConverter))] + public enum ConditionEnum + { + /// + /// Enum HASATTACHMENTS for value: HAS_ATTACHMENTS + /// + [EnumMember(Value = "HAS_ATTACHMENTS")] + HASATTACHMENTS = 1 + + } + + + /// + /// Condition of an email object that can be used to filter results + /// + /// Condition of an email object that can be used to filter results + [DataMember(Name = "condition", IsRequired = true, EmitDefaultValue = true)] + public ConditionEnum Condition { get; set; } + /// + /// Expected condition value + /// + /// Expected condition value + [JsonConverter(typeof(StringEnumConverter))] + public enum ValueEnum + { + /// + /// Enum TRUE for value: TRUE + /// + [EnumMember(Value = "TRUE")] + TRUE = 1, + + /// + /// Enum FALSE for value: FALSE + /// + [EnumMember(Value = "FALSE")] + FALSE = 2 + + } + + + /// + /// Expected condition value + /// + /// Expected condition value + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public ValueEnum Value { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ConditionOption() { } + /// + /// Initializes a new instance of the class. + /// + /// Condition of an email object that can be used to filter results (required). + /// Expected condition value (required). + public ConditionOption(ConditionEnum condition = default(ConditionEnum), ValueEnum value = default(ValueEnum)) + { + this.Condition = condition; + this.Value = value; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConditionOption {\n"); + sb.Append(" Condition: ").Append(Condition).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ConditionOption); + } + + /// + /// Returns true if ConditionOption instances are equal + /// + /// Instance of ConditionOption to be compared + /// Boolean + public bool Equals(ConditionOption input) + { + if (input == null) + { + return false; + } + return + ( + this.Condition == input.Condition || + this.Condition.Equals(input.Condition) + ) && + ( + this.Value == input.Value || + this.Value.Equals(input.Value) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Condition.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ContactDto.cs b/src/mailslurp/Model/ContactDto.cs new file mode 100644 index 00000000..10a45bc6 --- /dev/null +++ b/src/mailslurp/Model/ContactDto.cs @@ -0,0 +1,326 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Contact object. For saving a user in contact book. + /// + [DataContract(Name = "ContactDto")] + public partial class ContactDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ContactDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// groupId. + /// firstName. + /// lastName. + /// company. + /// emailAddresses (required). + /// primaryEmailAddress. + /// tags (required). + /// metaData. + /// optOut. + /// createdAt (required). + public ContactDto(Guid id = default(Guid), Guid? groupId = default(Guid?), string firstName = default(string), string lastName = default(string), string company = default(string), List emailAddresses = default(List), string primaryEmailAddress = default(string), List tags = default(List), Object metaData = default(Object), bool? optOut = default(bool?), DateTime createdAt = default(DateTime)) + { + this.Id = id; + // to ensure "emailAddresses" is required (not null) + if (emailAddresses == null) + { + throw new ArgumentNullException("emailAddresses is a required property for ContactDto and cannot be null"); + } + this.EmailAddresses = emailAddresses; + // to ensure "tags" is required (not null) + if (tags == null) + { + throw new ArgumentNullException("tags is a required property for ContactDto and cannot be null"); + } + this.Tags = tags; + this.CreatedAt = createdAt; + this.GroupId = groupId; + this.FirstName = firstName; + this.LastName = lastName; + this.Company = company; + this.PrimaryEmailAddress = primaryEmailAddress; + this.MetaData = metaData; + this.OptOut = optOut; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = true)] + public Guid? GroupId { get; set; } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name = "firstName", EmitDefaultValue = true)] + public string FirstName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name = "lastName", EmitDefaultValue = true)] + public string LastName { get; set; } + + /// + /// Gets or Sets Company + /// + [DataMember(Name = "company", EmitDefaultValue = true)] + public string Company { get; set; } + + /// + /// Gets or Sets EmailAddresses + /// + [DataMember(Name = "emailAddresses", IsRequired = true, EmitDefaultValue = true)] + public List EmailAddresses { get; set; } + + /// + /// Gets or Sets PrimaryEmailAddress + /// + [DataMember(Name = "primaryEmailAddress", EmitDefaultValue = true)] + public string PrimaryEmailAddress { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Gets or Sets MetaData + /// + [DataMember(Name = "metaData", EmitDefaultValue = true)] + public Object MetaData { get; set; } + + /// + /// Gets or Sets OptOut + /// + [DataMember(Name = "optOut", EmitDefaultValue = true)] + public bool? OptOut { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ContactDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" EmailAddresses: ").Append(EmailAddresses).Append("\n"); + sb.Append(" PrimaryEmailAddress: ").Append(PrimaryEmailAddress).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" MetaData: ").Append(MetaData).Append("\n"); + sb.Append(" OptOut: ").Append(OptOut).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ContactDto); + } + + /// + /// Returns true if ContactDto instances are equal + /// + /// Instance of ContactDto to be compared + /// Boolean + public bool Equals(ContactDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.EmailAddresses == input.EmailAddresses || + this.EmailAddresses != null && + input.EmailAddresses != null && + this.EmailAddresses.SequenceEqual(input.EmailAddresses) + ) && + ( + this.PrimaryEmailAddress == input.PrimaryEmailAddress || + (this.PrimaryEmailAddress != null && + this.PrimaryEmailAddress.Equals(input.PrimaryEmailAddress)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.MetaData == input.MetaData || + (this.MetaData != null && + this.MetaData.Equals(input.MetaData)) + ) && + ( + this.OptOut == input.OptOut || + (this.OptOut != null && + this.OptOut.Equals(input.OptOut)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.GroupId != null) + { + hashCode = (hashCode * 59) + this.GroupId.GetHashCode(); + } + if (this.FirstName != null) + { + hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + } + if (this.LastName != null) + { + hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + } + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + if (this.EmailAddresses != null) + { + hashCode = (hashCode * 59) + this.EmailAddresses.GetHashCode(); + } + if (this.PrimaryEmailAddress != null) + { + hashCode = (hashCode * 59) + this.PrimaryEmailAddress.GetHashCode(); + } + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + if (this.MetaData != null) + { + hashCode = (hashCode * 59) + this.MetaData.GetHashCode(); + } + if (this.OptOut != null) + { + hashCode = (hashCode * 59) + this.OptOut.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ContactProjection.cs b/src/mailslurp/Model/ContactProjection.cs new file mode 100644 index 00000000..77e83be9 --- /dev/null +++ b/src/mailslurp/Model/ContactProjection.cs @@ -0,0 +1,257 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email contact for address book + /// + [DataContract(Name = "ContactProjection")] + public partial class ContactProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ContactProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// groupId. + /// createdAt (required). + /// firstName. + /// lastName. + /// company. + /// emailAddresses. + /// optOut (required). + public ContactProjection(Guid id = default(Guid), Guid? groupId = default(Guid?), DateTime createdAt = default(DateTime), string firstName = default(string), string lastName = default(string), string company = default(string), List emailAddresses = default(List), bool optOut = default(bool)) + { + this.Id = id; + this.CreatedAt = createdAt; + this.OptOut = optOut; + this.GroupId = groupId; + this.FirstName = firstName; + this.LastName = lastName; + this.Company = company; + this.EmailAddresses = emailAddresses; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = true)] + public Guid? GroupId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name = "firstName", EmitDefaultValue = true)] + public string FirstName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name = "lastName", EmitDefaultValue = true)] + public string LastName { get; set; } + + /// + /// Gets or Sets Company + /// + [DataMember(Name = "company", EmitDefaultValue = true)] + public string Company { get; set; } + + /// + /// Gets or Sets EmailAddresses + /// + [DataMember(Name = "emailAddresses", EmitDefaultValue = true)] + public List EmailAddresses { get; set; } + + /// + /// Gets or Sets OptOut + /// + [DataMember(Name = "optOut", IsRequired = true, EmitDefaultValue = true)] + public bool OptOut { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ContactProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" EmailAddresses: ").Append(EmailAddresses).Append("\n"); + sb.Append(" OptOut: ").Append(OptOut).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ContactProjection); + } + + /// + /// Returns true if ContactProjection instances are equal + /// + /// Instance of ContactProjection to be compared + /// Boolean + public bool Equals(ContactProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.EmailAddresses == input.EmailAddresses || + this.EmailAddresses != null && + input.EmailAddresses != null && + this.EmailAddresses.SequenceEqual(input.EmailAddresses) + ) && + ( + this.OptOut == input.OptOut || + this.OptOut.Equals(input.OptOut) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.GroupId != null) + { + hashCode = (hashCode * 59) + this.GroupId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.FirstName != null) + { + hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + } + if (this.LastName != null) + { + hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + } + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + if (this.EmailAddresses != null) + { + hashCode = (hashCode * 59) + this.EmailAddresses.GetHashCode(); + } + hashCode = (hashCode * 59) + this.OptOut.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ContentMatchOptions.cs b/src/mailslurp/Model/ContentMatchOptions.cs new file mode 100644 index 00000000..dbc0f397 --- /dev/null +++ b/src/mailslurp/Model/ContentMatchOptions.cs @@ -0,0 +1,140 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for matching content using regex patterns based on Java Pattern syntax + /// + [DataContract(Name = "ContentMatchOptions")] + public partial class ContentMatchOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ContentMatchOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. (required). + public ContentMatchOptions(string pattern = default(string)) + { + // to ensure "pattern" is required (not null) + if (pattern == null) + { + throw new ArgumentNullException("pattern is a required property for ContentMatchOptions and cannot be null"); + } + this.Pattern = pattern; + } + + /// + /// Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + /// + /// Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + [DataMember(Name = "pattern", IsRequired = true, EmitDefaultValue = true)] + public string Pattern { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ContentMatchOptions {\n"); + sb.Append(" Pattern: ").Append(Pattern).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ContentMatchOptions); + } + + /// + /// Returns true if ContentMatchOptions instances are equal + /// + /// Instance of ContentMatchOptions to be compared + /// Boolean + public bool Equals(ContentMatchOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Pattern == input.Pattern || + (this.Pattern != null && + this.Pattern.Equals(input.Pattern)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Pattern != null) + { + hashCode = (hashCode * 59) + this.Pattern.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CountDto.cs b/src/mailslurp/Model/CountDto.cs new file mode 100644 index 00000000..7ac75e20 --- /dev/null +++ b/src/mailslurp/Model/CountDto.cs @@ -0,0 +1,130 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Number of elements + /// + [DataContract(Name = "CountDto")] + public partial class CountDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CountDto() { } + /// + /// Initializes a new instance of the class. + /// + /// totalElements (required). + public CountDto(long totalElements = default(long)) + { + this.TotalElements = totalElements; + } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", IsRequired = true, EmitDefaultValue = true)] + public long TotalElements { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CountDto {\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CountDto); + } + + /// + /// Returns true if CountDto instances are equal + /// + /// Instance of CountDto to be compared + /// Boolean + public bool Equals(CountDto input) + { + if (input == null) + { + return false; + } + return + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateAliasOptions.cs b/src/mailslurp/Model/CreateAliasOptions.cs new file mode 100644 index 00000000..4f952e71 --- /dev/null +++ b/src/mailslurp/Model/CreateAliasOptions.cs @@ -0,0 +1,193 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address. + /// + [DataContract(Name = "CreateAliasOptions")] + public partial class CreateAliasOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateAliasOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. (required). + /// Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address. + /// Optional name for alias. + /// Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. (required). + public CreateAliasOptions(string emailAddress = default(string), Guid? inboxId = default(Guid?), string name = default(string), bool useThreads = default(bool)) + { + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for CreateAliasOptions and cannot be null"); + } + this.EmailAddress = emailAddress; + this.UseThreads = useThreads; + this.InboxId = inboxId; + this.Name = name; + } + + /// + /// Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. + /// + /// Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address + /// + /// Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Optional name for alias + /// + /// Optional name for alias + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. + /// + /// Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. + [DataMember(Name = "useThreads", IsRequired = true, EmitDefaultValue = true)] + public bool UseThreads { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateAliasOptions {\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" UseThreads: ").Append(UseThreads).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateAliasOptions); + } + + /// + /// Returns true if CreateAliasOptions instances are equal + /// + /// Instance of CreateAliasOptions to be compared + /// Boolean + public bool Equals(CreateAliasOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.UseThreads == input.UseThreads || + this.UseThreads.Equals(input.UseThreads) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + hashCode = (hashCode * 59) + this.UseThreads.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateContactOptions.cs b/src/mailslurp/Model/CreateContactOptions.cs new file mode 100644 index 00000000..78b0c56e --- /dev/null +++ b/src/mailslurp/Model/CreateContactOptions.cs @@ -0,0 +1,261 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating an email contact in address book + /// + [DataContract(Name = "CreateContactOptions")] + public partial class CreateContactOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// firstName. + /// lastName. + /// company. + /// Set of email addresses belonging to the contact. + /// Tags that can be used to search and group contacts. + /// metaData. + /// Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions.. + /// Group IDs that contact belongs to. + public CreateContactOptions(string firstName = default(string), string lastName = default(string), string company = default(string), List emailAddresses = default(List), List tags = default(List), Object metaData = default(Object), bool? optOut = default(bool?), Guid? groupId = default(Guid?)) + { + this.FirstName = firstName; + this.LastName = lastName; + this.Company = company; + this.EmailAddresses = emailAddresses; + this.Tags = tags; + this.MetaData = metaData; + this.OptOut = optOut; + this.GroupId = groupId; + } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name = "firstName", EmitDefaultValue = true)] + public string FirstName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name = "lastName", EmitDefaultValue = true)] + public string LastName { get; set; } + + /// + /// Gets or Sets Company + /// + [DataMember(Name = "company", EmitDefaultValue = true)] + public string Company { get; set; } + + /// + /// Set of email addresses belonging to the contact + /// + /// Set of email addresses belonging to the contact + [DataMember(Name = "emailAddresses", EmitDefaultValue = true)] + public List EmailAddresses { get; set; } + + /// + /// Tags that can be used to search and group contacts + /// + /// Tags that can be used to search and group contacts + [DataMember(Name = "tags", EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Gets or Sets MetaData + /// + [DataMember(Name = "metaData", EmitDefaultValue = true)] + public Object MetaData { get; set; } + + /// + /// Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. + /// + /// Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. + [DataMember(Name = "optOut", EmitDefaultValue = true)] + public bool? OptOut { get; set; } + + /// + /// Group IDs that contact belongs to + /// + /// Group IDs that contact belongs to + [DataMember(Name = "groupId", EmitDefaultValue = true)] + public Guid? GroupId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateContactOptions {\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" EmailAddresses: ").Append(EmailAddresses).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" MetaData: ").Append(MetaData).Append("\n"); + sb.Append(" OptOut: ").Append(OptOut).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateContactOptions); + } + + /// + /// Returns true if CreateContactOptions instances are equal + /// + /// Instance of CreateContactOptions to be compared + /// Boolean + public bool Equals(CreateContactOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.EmailAddresses == input.EmailAddresses || + this.EmailAddresses != null && + input.EmailAddresses != null && + this.EmailAddresses.SequenceEqual(input.EmailAddresses) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.MetaData == input.MetaData || + (this.MetaData != null && + this.MetaData.Equals(input.MetaData)) + ) && + ( + this.OptOut == input.OptOut || + (this.OptOut != null && + this.OptOut.Equals(input.OptOut)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FirstName != null) + { + hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + } + if (this.LastName != null) + { + hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + } + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + if (this.EmailAddresses != null) + { + hashCode = (hashCode * 59) + this.EmailAddresses.GetHashCode(); + } + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + if (this.MetaData != null) + { + hashCode = (hashCode * 59) + this.MetaData.GetHashCode(); + } + if (this.OptOut != null) + { + hashCode = (hashCode * 59) + this.OptOut.GetHashCode(); + } + if (this.GroupId != null) + { + hashCode = (hashCode * 59) + this.GroupId.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateDomainOptions.cs b/src/mailslurp/Model/CreateDomainOptions.cs new file mode 100644 index 00000000..d7744c76 --- /dev/null +++ b/src/mailslurp/Model/CreateDomainOptions.cs @@ -0,0 +1,214 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not function correctly until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. Domains can be either `HTTP` or `SMTP` type. The type of domain determines which inboxes can be used with it. `SMTP` inboxes use a mail server running `mx.mailslurp.com` while `HTTP` inboxes are handled by AWS SES. + /// + [DataContract(Name = "CreateDomainOptions")] + public partial class CreateDomainOptions : IEquatable, IValidatableObject + { + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + [JsonConverter(typeof(StringEnumConverter))] + public enum DomainTypeEnum + { + /// + /// Enum HTTPINBOX for value: HTTP_INBOX + /// + [EnumMember(Value = "HTTP_INBOX")] + HTTPINBOX = 1, + + /// + /// Enum SMTPDOMAIN for value: SMTP_DOMAIN + /// + [EnumMember(Value = "SMTP_DOMAIN")] + SMTPDOMAIN = 2 + + } + + + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + [DataMember(Name = "domainType", EmitDefaultValue = true)] + public DomainTypeEnum? DomainType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateDomainOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. (required). + /// Optional description of the domain.. + /// Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID.. + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails.. + public CreateDomainOptions(string domain = default(string), string description = default(string), bool? createdCatchAllInbox = default(bool?), DomainTypeEnum? domainType = default(DomainTypeEnum?)) + { + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new ArgumentNullException("domain is a required property for CreateDomainOptions and cannot be null"); + } + this.Domain = domain; + this.Description = description; + this.CreatedCatchAllInbox = createdCatchAllInbox; + this.DomainType = domainType; + } + + /// + /// The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. + /// + /// The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. + [DataMember(Name = "domain", IsRequired = true, EmitDefaultValue = true)] + public string Domain { get; set; } + + /// + /// Optional description of the domain. + /// + /// Optional description of the domain. + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID. + /// + /// Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID. + [DataMember(Name = "createdCatchAllInbox", EmitDefaultValue = true)] + public bool? CreatedCatchAllInbox { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateDomainOptions {\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" CreatedCatchAllInbox: ").Append(CreatedCatchAllInbox).Append("\n"); + sb.Append(" DomainType: ").Append(DomainType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateDomainOptions); + } + + /// + /// Returns true if CreateDomainOptions instances are equal + /// + /// Instance of CreateDomainOptions to be compared + /// Boolean + public bool Equals(CreateDomainOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.CreatedCatchAllInbox == input.CreatedCatchAllInbox || + (this.CreatedCatchAllInbox != null && + this.CreatedCatchAllInbox.Equals(input.CreatedCatchAllInbox)) + ) && + ( + this.DomainType == input.DomainType || + this.DomainType.Equals(input.DomainType) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Domain != null) + { + hashCode = (hashCode * 59) + this.Domain.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.CreatedCatchAllInbox != null) + { + hashCode = (hashCode * 59) + this.CreatedCatchAllInbox.GetHashCode(); + } + hashCode = (hashCode * 59) + this.DomainType.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateEmergencyAddressOptions.cs b/src/mailslurp/Model/CreateEmergencyAddressOptions.cs new file mode 100644 index 00000000..efd1ea5c --- /dev/null +++ b/src/mailslurp/Model/CreateEmergencyAddressOptions.cs @@ -0,0 +1,283 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// CreateEmergencyAddressOptions + /// + [DataContract(Name = "CreateEmergencyAddressOptions")] + public partial class CreateEmergencyAddressOptions : IEquatable, IValidatableObject + { + /// + /// Defines IsoCountryCode + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum IsoCountryCodeEnum + { + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 1, + + /// + /// Enum GB for value: GB + /// + [EnumMember(Value = "GB")] + GB = 2 + + } + + + /// + /// Gets or Sets IsoCountryCode + /// + [DataMember(Name = "isoCountryCode", IsRequired = true, EmitDefaultValue = true)] + public IsoCountryCodeEnum IsoCountryCode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateEmergencyAddressOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// customerName (required). + /// address1 (required). + /// city (required). + /// region (required). + /// postalCode (required). + /// isoCountryCode (required). + /// displayName. + public CreateEmergencyAddressOptions(string customerName = default(string), string address1 = default(string), string city = default(string), string region = default(string), string postalCode = default(string), IsoCountryCodeEnum isoCountryCode = default(IsoCountryCodeEnum), string displayName = default(string)) + { + // to ensure "customerName" is required (not null) + if (customerName == null) + { + throw new ArgumentNullException("customerName is a required property for CreateEmergencyAddressOptions and cannot be null"); + } + this.CustomerName = customerName; + // to ensure "address1" is required (not null) + if (address1 == null) + { + throw new ArgumentNullException("address1 is a required property for CreateEmergencyAddressOptions and cannot be null"); + } + this.Address1 = address1; + // to ensure "city" is required (not null) + if (city == null) + { + throw new ArgumentNullException("city is a required property for CreateEmergencyAddressOptions and cannot be null"); + } + this.City = city; + // to ensure "region" is required (not null) + if (region == null) + { + throw new ArgumentNullException("region is a required property for CreateEmergencyAddressOptions and cannot be null"); + } + this.Region = region; + // to ensure "postalCode" is required (not null) + if (postalCode == null) + { + throw new ArgumentNullException("postalCode is a required property for CreateEmergencyAddressOptions and cannot be null"); + } + this.PostalCode = postalCode; + this.IsoCountryCode = isoCountryCode; + this.DisplayName = displayName; + } + + /// + /// Gets or Sets CustomerName + /// + [DataMember(Name = "customerName", IsRequired = true, EmitDefaultValue = true)] + public string CustomerName { get; set; } + + /// + /// Gets or Sets Address1 + /// + [DataMember(Name = "address1", IsRequired = true, EmitDefaultValue = true)] + public string Address1 { get; set; } + + /// + /// Gets or Sets City + /// + [DataMember(Name = "city", IsRequired = true, EmitDefaultValue = true)] + public string City { get; set; } + + /// + /// Gets or Sets Region + /// + [DataMember(Name = "region", IsRequired = true, EmitDefaultValue = true)] + public string Region { get; set; } + + /// + /// Gets or Sets PostalCode + /// + [DataMember(Name = "postalCode", IsRequired = true, EmitDefaultValue = true)] + public string PostalCode { get; set; } + + /// + /// Gets or Sets DisplayName + /// + [DataMember(Name = "displayName", EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateEmergencyAddressOptions {\n"); + sb.Append(" CustomerName: ").Append(CustomerName).Append("\n"); + sb.Append(" Address1: ").Append(Address1).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Region: ").Append(Region).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" IsoCountryCode: ").Append(IsoCountryCode).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateEmergencyAddressOptions); + } + + /// + /// Returns true if CreateEmergencyAddressOptions instances are equal + /// + /// Instance of CreateEmergencyAddressOptions to be compared + /// Boolean + public bool Equals(CreateEmergencyAddressOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.CustomerName == input.CustomerName || + (this.CustomerName != null && + this.CustomerName.Equals(input.CustomerName)) + ) && + ( + this.Address1 == input.Address1 || + (this.Address1 != null && + this.Address1.Equals(input.Address1)) + ) && + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && + ( + this.Region == input.Region || + (this.Region != null && + this.Region.Equals(input.Region)) + ) && + ( + this.PostalCode == input.PostalCode || + (this.PostalCode != null && + this.PostalCode.Equals(input.PostalCode)) + ) && + ( + this.IsoCountryCode == input.IsoCountryCode || + this.IsoCountryCode.Equals(input.IsoCountryCode) + ) && + ( + this.DisplayName == input.DisplayName || + (this.DisplayName != null && + this.DisplayName.Equals(input.DisplayName)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CustomerName != null) + { + hashCode = (hashCode * 59) + this.CustomerName.GetHashCode(); + } + if (this.Address1 != null) + { + hashCode = (hashCode * 59) + this.Address1.GetHashCode(); + } + if (this.City != null) + { + hashCode = (hashCode * 59) + this.City.GetHashCode(); + } + if (this.Region != null) + { + hashCode = (hashCode * 59) + this.Region.GetHashCode(); + } + if (this.PostalCode != null) + { + hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsoCountryCode.GetHashCode(); + if (this.DisplayName != null) + { + hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateGroupOptions.cs b/src/mailslurp/Model/CreateGroupOptions.cs new file mode 100644 index 00000000..e5cf3820 --- /dev/null +++ b/src/mailslurp/Model/CreateGroupOptions.cs @@ -0,0 +1,157 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Create contact group options + /// + [DataContract(Name = "CreateGroupOptions")] + public partial class CreateGroupOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateGroupOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// description. + public CreateGroupOptions(string name = default(string), string description = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for CreateGroupOptions and cannot be null"); + } + this.Name = name; + this.Description = description; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateGroupOptions {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateGroupOptions); + } + + /// + /// Returns true if CreateGroupOptions instances are equal + /// + /// Instance of CreateGroupOptions to be compared + /// Boolean + public bool Equals(CreateGroupOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateInboxDto.cs b/src/mailslurp/Model/CreateInboxDto.cs new file mode 100644 index 00000000..94887439 --- /dev/null +++ b/src/mailslurp/Model/CreateInboxDto.cs @@ -0,0 +1,357 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. `SMTP` inboxes are processed by a mail server running at `mx.mailslurp.com` while `HTTP` inboxes are processed by AWS SES. Inboxes can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random). + /// + [DataContract(Name = "CreateInboxDto")] + public partial class CreateInboxDto : IEquatable, IValidatableObject + { + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [JsonConverter(typeof(StringEnumConverter))] + public enum InboxTypeEnum + { + /// + /// Enum HTTPINBOX for value: HTTP_INBOX + /// + [EnumMember(Value = "HTTP_INBOX")] + HTTPINBOX = 1, + + /// + /// Enum SMTPINBOX for value: SMTP_INBOX + /// + [EnumMember(Value = "SMTP_INBOX")] + SMTPINBOX = 2 + + } + + + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [DataMember(Name = "inboxType", EmitDefaultValue = true)] + public InboxTypeEnum? InboxType { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.. + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.. + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with. + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types.. + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.. + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX.. + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering. + /// Number of milliseconds that inbox should exist for. + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.. + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).. + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending.. + /// Use a shorter email address under 31 characters. + public CreateInboxDto(string emailAddress = default(string), string name = default(string), string description = default(string), bool? useDomainPool = default(bool?), List tags = default(List), DateTime? expiresAt = default(DateTime?), bool? favourite = default(bool?), long? expiresIn = default(long?), bool? allowTeamAccess = default(bool?), InboxTypeEnum? inboxType = default(InboxTypeEnum?), bool? virtualInbox = default(bool?), bool? useShortAddress = default(bool?)) + { + this.EmailAddress = emailAddress; + this.Name = name; + this.Description = description; + this.UseDomainPool = useDomainPool; + this.Tags = tags; + this.ExpiresAt = expiresAt; + this.Favourite = favourite; + this.ExpiresIn = expiresIn; + this.AllowTeamAccess = allowTeamAccess; + this.InboxType = inboxType; + this.VirtualInbox = virtualInbox; + this.UseShortAddress = useShortAddress; + } + + /// + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + /// + /// A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + [DataMember(Name = "emailAddress", EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. + /// + /// Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with + /// + /// Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. + /// + /// Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. + [DataMember(Name = "useDomainPool", EmitDefaultValue = true)] + public bool? UseDomainPool { get; set; } + + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + [DataMember(Name = "tags", EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. + /// + /// Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. + [DataMember(Name = "expiresAt", EmitDefaultValue = true)] + public DateTime? ExpiresAt { get; set; } + + /// + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + /// + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + [DataMember(Name = "favourite", EmitDefaultValue = true)] + public bool? Favourite { get; set; } + + /// + /// Number of milliseconds that inbox should exist for + /// + /// Number of milliseconds that inbox should exist for + [DataMember(Name = "expiresIn", EmitDefaultValue = true)] + public long? ExpiresIn { get; set; } + + /// + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. + /// + /// DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. + [DataMember(Name = "allowTeamAccess", EmitDefaultValue = true)] + public bool? AllowTeamAccess { get; set; } + + /// + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. + /// + /// Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. + [DataMember(Name = "virtualInbox", EmitDefaultValue = true)] + public bool? VirtualInbox { get; set; } + + /// + /// Use a shorter email address under 31 characters + /// + /// Use a shorter email address under 31 characters + [DataMember(Name = "useShortAddress", EmitDefaultValue = true)] + public bool? UseShortAddress { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateInboxDto {\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" UseDomainPool: ").Append(UseDomainPool).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" Favourite: ").Append(Favourite).Append("\n"); + sb.Append(" ExpiresIn: ").Append(ExpiresIn).Append("\n"); + sb.Append(" AllowTeamAccess: ").Append(AllowTeamAccess).Append("\n"); + sb.Append(" InboxType: ").Append(InboxType).Append("\n"); + sb.Append(" VirtualInbox: ").Append(VirtualInbox).Append("\n"); + sb.Append(" UseShortAddress: ").Append(UseShortAddress).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateInboxDto); + } + + /// + /// Returns true if CreateInboxDto instances are equal + /// + /// Instance of CreateInboxDto to be compared + /// Boolean + public bool Equals(CreateInboxDto input) + { + if (input == null) + { + return false; + } + return + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.UseDomainPool == input.UseDomainPool || + (this.UseDomainPool != null && + this.UseDomainPool.Equals(input.UseDomainPool)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.ExpiresAt == input.ExpiresAt || + (this.ExpiresAt != null && + this.ExpiresAt.Equals(input.ExpiresAt)) + ) && + ( + this.Favourite == input.Favourite || + (this.Favourite != null && + this.Favourite.Equals(input.Favourite)) + ) && + ( + this.ExpiresIn == input.ExpiresIn || + (this.ExpiresIn != null && + this.ExpiresIn.Equals(input.ExpiresIn)) + ) && + ( + this.AllowTeamAccess == input.AllowTeamAccess || + (this.AllowTeamAccess != null && + this.AllowTeamAccess.Equals(input.AllowTeamAccess)) + ) && + ( + this.InboxType == input.InboxType || + this.InboxType.Equals(input.InboxType) + ) && + ( + this.VirtualInbox == input.VirtualInbox || + (this.VirtualInbox != null && + this.VirtualInbox.Equals(input.VirtualInbox)) + ) && + ( + this.UseShortAddress == input.UseShortAddress || + (this.UseShortAddress != null && + this.UseShortAddress.Equals(input.UseShortAddress)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.UseDomainPool != null) + { + hashCode = (hashCode * 59) + this.UseDomainPool.GetHashCode(); + } + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + if (this.ExpiresAt != null) + { + hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); + } + if (this.Favourite != null) + { + hashCode = (hashCode * 59) + this.Favourite.GetHashCode(); + } + if (this.ExpiresIn != null) + { + hashCode = (hashCode * 59) + this.ExpiresIn.GetHashCode(); + } + if (this.AllowTeamAccess != null) + { + hashCode = (hashCode * 59) + this.AllowTeamAccess.GetHashCode(); + } + hashCode = (hashCode * 59) + this.InboxType.GetHashCode(); + if (this.VirtualInbox != null) + { + hashCode = (hashCode * 59) + this.VirtualInbox.GetHashCode(); + } + if (this.UseShortAddress != null) + { + hashCode = (hashCode * 59) + this.UseShortAddress.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateInboxForwarderOptions.cs b/src/mailslurp/Model/CreateInboxForwarderOptions.cs new file mode 100644 index 00000000..219950df --- /dev/null +++ b/src/mailslurp/Model/CreateInboxForwarderOptions.cs @@ -0,0 +1,213 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating an inbox forwarder + /// + [DataContract(Name = "CreateInboxForwarderOptions")] + public partial class CreateInboxForwarderOptions : IEquatable, IValidatableObject + { + /// + /// Field to match against to trigger inbox forwarding for inbound email + /// + /// Field to match against to trigger inbox forwarding for inbound email + [JsonConverter(typeof(StringEnumConverter))] + public enum FieldEnum + { + /// + /// Enum RECIPIENTS for value: RECIPIENTS + /// + [EnumMember(Value = "RECIPIENTS")] + RECIPIENTS = 1, + + /// + /// Enum SENDER for value: SENDER + /// + [EnumMember(Value = "SENDER")] + SENDER = 2, + + /// + /// Enum SUBJECT for value: SUBJECT + /// + [EnumMember(Value = "SUBJECT")] + SUBJECT = 3, + + /// + /// Enum ATTACHMENTS for value: ATTACHMENTS + /// + [EnumMember(Value = "ATTACHMENTS")] + ATTACHMENTS = 4 + + } + + + /// + /// Field to match against to trigger inbox forwarding for inbound email + /// + /// Field to match against to trigger inbox forwarding for inbound email + [DataMember(Name = "field", IsRequired = true, EmitDefaultValue = true)] + public FieldEnum Field { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateInboxForwarderOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Field to match against to trigger inbox forwarding for inbound email (required). + /// String or wildcard style match for field specified when evaluating forwarding rules (required). + /// Email addresses to forward an email to if it matches the field and match criteria of the forwarder (required). + public CreateInboxForwarderOptions(FieldEnum field = default(FieldEnum), string match = default(string), List forwardToRecipients = default(List)) + { + this.Field = field; + // to ensure "match" is required (not null) + if (match == null) + { + throw new ArgumentNullException("match is a required property for CreateInboxForwarderOptions and cannot be null"); + } + this.Match = match; + // to ensure "forwardToRecipients" is required (not null) + if (forwardToRecipients == null) + { + throw new ArgumentNullException("forwardToRecipients is a required property for CreateInboxForwarderOptions and cannot be null"); + } + this.ForwardToRecipients = forwardToRecipients; + } + + /// + /// String or wildcard style match for field specified when evaluating forwarding rules + /// + /// String or wildcard style match for field specified when evaluating forwarding rules + [DataMember(Name = "match", IsRequired = true, EmitDefaultValue = true)] + public string Match { get; set; } + + /// + /// Email addresses to forward an email to if it matches the field and match criteria of the forwarder + /// + /// Email addresses to forward an email to if it matches the field and match criteria of the forwarder + [DataMember(Name = "forwardToRecipients", IsRequired = true, EmitDefaultValue = true)] + public List ForwardToRecipients { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateInboxForwarderOptions {\n"); + sb.Append(" Field: ").Append(Field).Append("\n"); + sb.Append(" Match: ").Append(Match).Append("\n"); + sb.Append(" ForwardToRecipients: ").Append(ForwardToRecipients).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateInboxForwarderOptions); + } + + /// + /// Returns true if CreateInboxForwarderOptions instances are equal + /// + /// Instance of CreateInboxForwarderOptions to be compared + /// Boolean + public bool Equals(CreateInboxForwarderOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Field == input.Field || + this.Field.Equals(input.Field) + ) && + ( + this.Match == input.Match || + (this.Match != null && + this.Match.Equals(input.Match)) + ) && + ( + this.ForwardToRecipients == input.ForwardToRecipients || + this.ForwardToRecipients != null && + input.ForwardToRecipients != null && + this.ForwardToRecipients.SequenceEqual(input.ForwardToRecipients) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Field.GetHashCode(); + if (this.Match != null) + { + hashCode = (hashCode * 59) + this.Match.GetHashCode(); + } + if (this.ForwardToRecipients != null) + { + hashCode = (hashCode * 59) + this.ForwardToRecipients.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateInboxRulesetOptions.cs b/src/mailslurp/Model/CreateInboxRulesetOptions.cs new file mode 100644 index 00000000..12bb8d07 --- /dev/null +++ b/src/mailslurp/Model/CreateInboxRulesetOptions.cs @@ -0,0 +1,218 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating inbox rulesets. Inbox rulesets can be used to block, allow, filter, or forward emails when sending or receiving using the inbox. + /// + [DataContract(Name = "CreateInboxRulesetOptions")] + public partial class CreateInboxRulesetOptions : IEquatable, IValidatableObject + { + /// + /// What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. + /// + /// What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. + [JsonConverter(typeof(StringEnumConverter))] + public enum ScopeEnum + { + /// + /// Enum RECEIVINGEMAILS for value: RECEIVING_EMAILS + /// + [EnumMember(Value = "RECEIVING_EMAILS")] + RECEIVINGEMAILS = 1, + + /// + /// Enum SENDINGEMAILS for value: SENDING_EMAILS + /// + [EnumMember(Value = "SENDING_EMAILS")] + SENDINGEMAILS = 2 + + } + + + /// + /// What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. + /// + /// What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. + [DataMember(Name = "scope", IsRequired = true, EmitDefaultValue = true)] + public ScopeEnum Scope { get; set; } + /// + /// Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. + /// + /// Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionEnum + { + /// + /// Enum BLOCK for value: BLOCK + /// + [EnumMember(Value = "BLOCK")] + BLOCK = 1, + + /// + /// Enum ALLOW for value: ALLOW + /// + [EnumMember(Value = "ALLOW")] + ALLOW = 2, + + /// + /// Enum FILTERREMOVE for value: FILTER_REMOVE + /// + [EnumMember(Value = "FILTER_REMOVE")] + FILTERREMOVE = 3 + + } + + + /// + /// Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. + /// + /// Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. + [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] + public ActionEnum Action { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateInboxRulesetOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. (required). + /// Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. (required). + /// Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. (required). + public CreateInboxRulesetOptions(ScopeEnum scope = default(ScopeEnum), ActionEnum action = default(ActionEnum), string target = default(string)) + { + this.Scope = scope; + this.Action = action; + // to ensure "target" is required (not null) + if (target == null) + { + throw new ArgumentNullException("target is a required property for CreateInboxRulesetOptions and cannot be null"); + } + this.Target = target; + } + + /// + /// Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. + /// + /// Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. + [DataMember(Name = "target", IsRequired = true, EmitDefaultValue = true)] + public string Target { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateInboxRulesetOptions {\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" Action: ").Append(Action).Append("\n"); + sb.Append(" Target: ").Append(Target).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateInboxRulesetOptions); + } + + /// + /// Returns true if CreateInboxRulesetOptions instances are equal + /// + /// Instance of CreateInboxRulesetOptions to be compared + /// Boolean + public bool Equals(CreateInboxRulesetOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Scope == input.Scope || + this.Scope.Equals(input.Scope) + ) && + ( + this.Action == input.Action || + this.Action.Equals(input.Action) + ) && + ( + this.Target == input.Target || + (this.Target != null && + this.Target.Equals(input.Target)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Scope.GetHashCode(); + hashCode = (hashCode * 59) + this.Action.GetHashCode(); + if (this.Target != null) + { + hashCode = (hashCode * 59) + this.Target.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateTemplateOptions.cs b/src/mailslurp/Model/CreateTemplateOptions.cs new file mode 100644 index 00000000..afe20cc1 --- /dev/null +++ b/src/mailslurp/Model/CreateTemplateOptions.cs @@ -0,0 +1,164 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Create template options + /// + [DataContract(Name = "CreateTemplateOptions")] + public partial class CreateTemplateOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateTemplateOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of template (required). + /// Template content. Can include moustache style variables such as {{var_name}} (required). + public CreateTemplateOptions(string name = default(string), string content = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for CreateTemplateOptions and cannot be null"); + } + this.Name = name; + // to ensure "content" is required (not null) + if (content == null) + { + throw new ArgumentNullException("content is a required property for CreateTemplateOptions and cannot be null"); + } + this.Content = content; + } + + /// + /// Name of template + /// + /// Name of template + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Template content. Can include moustache style variables such as {{var_name}} + /// + /// Template content. Can include moustache style variables such as {{var_name}} + [DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)] + public string Content { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateTemplateOptions {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateTemplateOptions); + } + + /// + /// Returns true if CreateTemplateOptions instances are equal + /// + /// Instance of CreateTemplateOptions to be compared + /// Boolean + public bool Equals(CreateTemplateOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateTrackingPixelOptions.cs b/src/mailslurp/Model/CreateTrackingPixelOptions.cs new file mode 100644 index 00000000..0f02a065 --- /dev/null +++ b/src/mailslurp/Model/CreateTrackingPixelOptions.cs @@ -0,0 +1,147 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating a tracking pixel for email open tracking + /// + [DataContract(Name = "CreateTrackingPixelOptions")] + public partial class CreateTrackingPixelOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// name. + /// recipient. + public CreateTrackingPixelOptions(string name = default(string), string recipient = default(string)) + { + this.Name = name; + this.Recipient = recipient; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets Recipient + /// + [DataMember(Name = "recipient", EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateTrackingPixelOptions {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateTrackingPixelOptions); + } + + /// + /// Returns true if CreateTrackingPixelOptions instances are equal + /// + /// Instance of CreateTrackingPixelOptions to be compared + /// Boolean + public bool Equals(CreateTrackingPixelOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/CreateWebhookOptions.cs b/src/mailslurp/Model/CreateWebhookOptions.cs new file mode 100644 index 00000000..4033d6d3 --- /dev/null +++ b/src/mailslurp/Model/CreateWebhookOptions.cs @@ -0,0 +1,298 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale. Customize the payload sent to your endpoint by setting the `requestBodyTemplate` property to a string with moustache style variables. Property names from the standard payload model for the given event are available as variables. + /// + [DataContract(Name = "CreateWebhookOptions")] + public partial class CreateWebhookOptions : IEquatable, IValidatableObject + { + /// + /// Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. + /// + /// Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. + /// + /// Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. + [DataMember(Name = "eventName", EmitDefaultValue = true)] + public EventNameEnum? EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateWebhookOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. (required). + /// basicAuth. + /// Optional name for the webhook. + /// Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name.. + /// includeHeaders. + /// Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style `{{variableName}}` templating to use parts of the standard webhook payload for the given event.. + public CreateWebhookOptions(string url = default(string), BasicAuthOptions basicAuth = default(BasicAuthOptions), string name = default(string), EventNameEnum? eventName = default(EventNameEnum?), WebhookHeaders includeHeaders = default(WebhookHeaders), string requestBodyTemplate = default(string)) + { + // to ensure "url" is required (not null) + if (url == null) + { + throw new ArgumentNullException("url is a required property for CreateWebhookOptions and cannot be null"); + } + this.Url = url; + this.BasicAuth = basicAuth; + this.Name = name; + this.EventName = eventName; + this.IncludeHeaders = includeHeaders; + this.RequestBodyTemplate = requestBodyTemplate; + } + + /// + /// Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. + /// + /// Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + public string Url { get; set; } + + /// + /// Gets or Sets BasicAuth + /// + [DataMember(Name = "basicAuth", EmitDefaultValue = true)] + public BasicAuthOptions BasicAuth { get; set; } + + /// + /// Optional name for the webhook + /// + /// Optional name for the webhook + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets IncludeHeaders + /// + [DataMember(Name = "includeHeaders", EmitDefaultValue = false)] + public WebhookHeaders IncludeHeaders { get; set; } + + /// + /// Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style `{{variableName}}` templating to use parts of the standard webhook payload for the given event. + /// + /// Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style `{{variableName}}` templating to use parts of the standard webhook payload for the given event. + [DataMember(Name = "requestBodyTemplate", EmitDefaultValue = true)] + public string RequestBodyTemplate { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateWebhookOptions {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" BasicAuth: ").Append(BasicAuth).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" IncludeHeaders: ").Append(IncludeHeaders).Append("\n"); + sb.Append(" RequestBodyTemplate: ").Append(RequestBodyTemplate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateWebhookOptions); + } + + /// + /// Returns true if CreateWebhookOptions instances are equal + /// + /// Instance of CreateWebhookOptions to be compared + /// Boolean + public bool Equals(CreateWebhookOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.BasicAuth == input.BasicAuth || + (this.BasicAuth != null && + this.BasicAuth.Equals(input.BasicAuth)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.IncludeHeaders == input.IncludeHeaders || + (this.IncludeHeaders != null && + this.IncludeHeaders.Equals(input.IncludeHeaders)) + ) && + ( + this.RequestBodyTemplate == input.RequestBodyTemplate || + (this.RequestBodyTemplate != null && + this.RequestBodyTemplate.Equals(input.RequestBodyTemplate)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Url != null) + { + hashCode = (hashCode * 59) + this.Url.GetHashCode(); + } + if (this.BasicAuth != null) + { + hashCode = (hashCode * 59) + this.BasicAuth.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.IncludeHeaders != null) + { + hashCode = (hashCode * 59) + this.IncludeHeaders.GetHashCode(); + } + if (this.RequestBodyTemplate != null) + { + hashCode = (hashCode * 59) + this.RequestBodyTemplate.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DNSLookupOptions.cs b/src/mailslurp/Model/DNSLookupOptions.cs new file mode 100644 index 00000000..9efb2afa --- /dev/null +++ b/src/mailslurp/Model/DNSLookupOptions.cs @@ -0,0 +1,723 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for DNS query. + /// + [DataContract(Name = "DNSLookupOptions")] + public partial class DNSLookupOptions : IEquatable, IValidatableObject + { + /// + /// Domain Name Server Record Types + /// + /// Domain Name Server Record Types + [JsonConverter(typeof(StringEnumConverter))] + public enum RecordTypesEnum + { + /// + /// Enum A for value: A + /// + [EnumMember(Value = "A")] + A = 1, + + /// + /// Enum NS for value: NS + /// + [EnumMember(Value = "NS")] + NS = 2, + + /// + /// Enum MD for value: MD + /// + [EnumMember(Value = "MD")] + MD = 3, + + /// + /// Enum MF for value: MF + /// + [EnumMember(Value = "MF")] + MF = 4, + + /// + /// Enum CNAME for value: CNAME + /// + [EnumMember(Value = "CNAME")] + CNAME = 5, + + /// + /// Enum SOA for value: SOA + /// + [EnumMember(Value = "SOA")] + SOA = 6, + + /// + /// Enum MB for value: MB + /// + [EnumMember(Value = "MB")] + MB = 7, + + /// + /// Enum MG for value: MG + /// + [EnumMember(Value = "MG")] + MG = 8, + + /// + /// Enum MR for value: MR + /// + [EnumMember(Value = "MR")] + MR = 9, + + /// + /// Enum NULL for value: NULL + /// + [EnumMember(Value = "NULL")] + NULL = 10, + + /// + /// Enum WKS for value: WKS + /// + [EnumMember(Value = "WKS")] + WKS = 11, + + /// + /// Enum PTR for value: PTR + /// + [EnumMember(Value = "PTR")] + PTR = 12, + + /// + /// Enum HINFO for value: HINFO + /// + [EnumMember(Value = "HINFO")] + HINFO = 13, + + /// + /// Enum MINFO for value: MINFO + /// + [EnumMember(Value = "MINFO")] + MINFO = 14, + + /// + /// Enum MX for value: MX + /// + [EnumMember(Value = "MX")] + MX = 15, + + /// + /// Enum TXT for value: TXT + /// + [EnumMember(Value = "TXT")] + TXT = 16, + + /// + /// Enum RP for value: RP + /// + [EnumMember(Value = "RP")] + RP = 17, + + /// + /// Enum AFSDB for value: AFSDB + /// + [EnumMember(Value = "AFSDB")] + AFSDB = 18, + + /// + /// Enum X25 for value: X25 + /// + [EnumMember(Value = "X25")] + X25 = 19, + + /// + /// Enum ISDN for value: ISDN + /// + [EnumMember(Value = "ISDN")] + ISDN = 20, + + /// + /// Enum RT for value: RT + /// + [EnumMember(Value = "RT")] + RT = 21, + + /// + /// Enum NSAP for value: NSAP + /// + [EnumMember(Value = "NSAP")] + NSAP = 22, + + /// + /// Enum NSAPPTR for value: NSAP_PTR + /// + [EnumMember(Value = "NSAP_PTR")] + NSAPPTR = 23, + + /// + /// Enum SIG for value: SIG + /// + [EnumMember(Value = "SIG")] + SIG = 24, + + /// + /// Enum KEY for value: KEY + /// + [EnumMember(Value = "KEY")] + KEY = 25, + + /// + /// Enum PX for value: PX + /// + [EnumMember(Value = "PX")] + PX = 26, + + /// + /// Enum GPOS for value: GPOS + /// + [EnumMember(Value = "GPOS")] + GPOS = 27, + + /// + /// Enum AAAA for value: AAAA + /// + [EnumMember(Value = "AAAA")] + AAAA = 28, + + /// + /// Enum LOC for value: LOC + /// + [EnumMember(Value = "LOC")] + LOC = 29, + + /// + /// Enum NXT for value: NXT + /// + [EnumMember(Value = "NXT")] + NXT = 30, + + /// + /// Enum EID for value: EID + /// + [EnumMember(Value = "EID")] + EID = 31, + + /// + /// Enum NIMLOC for value: NIMLOC + /// + [EnumMember(Value = "NIMLOC")] + NIMLOC = 32, + + /// + /// Enum SRV for value: SRV + /// + [EnumMember(Value = "SRV")] + SRV = 33, + + /// + /// Enum ATMA for value: ATMA + /// + [EnumMember(Value = "ATMA")] + ATMA = 34, + + /// + /// Enum NAPTR for value: NAPTR + /// + [EnumMember(Value = "NAPTR")] + NAPTR = 35, + + /// + /// Enum KX for value: KX + /// + [EnumMember(Value = "KX")] + KX = 36, + + /// + /// Enum CERT for value: CERT + /// + [EnumMember(Value = "CERT")] + CERT = 37, + + /// + /// Enum A6 for value: A6 + /// + [EnumMember(Value = "A6")] + A6 = 38, + + /// + /// Enum DNAME for value: DNAME + /// + [EnumMember(Value = "DNAME")] + DNAME = 39, + + /// + /// Enum SINK for value: SINK + /// + [EnumMember(Value = "SINK")] + SINK = 40, + + /// + /// Enum OPT for value: OPT + /// + [EnumMember(Value = "OPT")] + OPT = 41, + + /// + /// Enum APL for value: APL + /// + [EnumMember(Value = "APL")] + APL = 42, + + /// + /// Enum DS for value: DS + /// + [EnumMember(Value = "DS")] + DS = 43, + + /// + /// Enum SSHFP for value: SSHFP + /// + [EnumMember(Value = "SSHFP")] + SSHFP = 44, + + /// + /// Enum IPSECKEY for value: IPSECKEY + /// + [EnumMember(Value = "IPSECKEY")] + IPSECKEY = 45, + + /// + /// Enum RRSIG for value: RRSIG + /// + [EnumMember(Value = "RRSIG")] + RRSIG = 46, + + /// + /// Enum NSEC for value: NSEC + /// + [EnumMember(Value = "NSEC")] + NSEC = 47, + + /// + /// Enum DNSKEY for value: DNSKEY + /// + [EnumMember(Value = "DNSKEY")] + DNSKEY = 48, + + /// + /// Enum DHCID for value: DHCID + /// + [EnumMember(Value = "DHCID")] + DHCID = 49, + + /// + /// Enum NSEC3 for value: NSEC3 + /// + [EnumMember(Value = "NSEC3")] + NSEC3 = 50, + + /// + /// Enum NSEC3PARAM for value: NSEC3PARAM + /// + [EnumMember(Value = "NSEC3PARAM")] + NSEC3PARAM = 51, + + /// + /// Enum TLSA for value: TLSA + /// + [EnumMember(Value = "TLSA")] + TLSA = 52, + + /// + /// Enum SMIMEA for value: SMIMEA + /// + [EnumMember(Value = "SMIMEA")] + SMIMEA = 53, + + /// + /// Enum HIP for value: HIP + /// + [EnumMember(Value = "HIP")] + HIP = 54, + + /// + /// Enum NINFO for value: NINFO + /// + [EnumMember(Value = "NINFO")] + NINFO = 55, + + /// + /// Enum RKEY for value: RKEY + /// + [EnumMember(Value = "RKEY")] + RKEY = 56, + + /// + /// Enum TALINK for value: TALINK + /// + [EnumMember(Value = "TALINK")] + TALINK = 57, + + /// + /// Enum CDS for value: CDS + /// + [EnumMember(Value = "CDS")] + CDS = 58, + + /// + /// Enum CDNSKEY for value: CDNSKEY + /// + [EnumMember(Value = "CDNSKEY")] + CDNSKEY = 59, + + /// + /// Enum OPENPGPKEY for value: OPENPGPKEY + /// + [EnumMember(Value = "OPENPGPKEY")] + OPENPGPKEY = 60, + + /// + /// Enum CSYNC for value: CSYNC + /// + [EnumMember(Value = "CSYNC")] + CSYNC = 61, + + /// + /// Enum ZONEMD for value: ZONEMD + /// + [EnumMember(Value = "ZONEMD")] + ZONEMD = 62, + + /// + /// Enum SVCB for value: SVCB + /// + [EnumMember(Value = "SVCB")] + SVCB = 63, + + /// + /// Enum HTTPS for value: HTTPS + /// + [EnumMember(Value = "HTTPS")] + HTTPS = 64, + + /// + /// Enum SPF for value: SPF + /// + [EnumMember(Value = "SPF")] + SPF = 65, + + /// + /// Enum UINFO for value: UINFO + /// + [EnumMember(Value = "UINFO")] + UINFO = 66, + + /// + /// Enum UID for value: UID + /// + [EnumMember(Value = "UID")] + UID = 67, + + /// + /// Enum GID for value: GID + /// + [EnumMember(Value = "GID")] + GID = 68, + + /// + /// Enum UNSPEC for value: UNSPEC + /// + [EnumMember(Value = "UNSPEC")] + UNSPEC = 69, + + /// + /// Enum NID for value: NID + /// + [EnumMember(Value = "NID")] + NID = 70, + + /// + /// Enum L32 for value: L32 + /// + [EnumMember(Value = "L32")] + L32 = 71, + + /// + /// Enum L64 for value: L64 + /// + [EnumMember(Value = "L64")] + L64 = 72, + + /// + /// Enum LP for value: LP + /// + [EnumMember(Value = "LP")] + LP = 73, + + /// + /// Enum EUI48 for value: EUI48 + /// + [EnumMember(Value = "EUI48")] + EUI48 = 74, + + /// + /// Enum EUI64 for value: EUI64 + /// + [EnumMember(Value = "EUI64")] + EUI64 = 75, + + /// + /// Enum TKEY for value: TKEY + /// + [EnumMember(Value = "TKEY")] + TKEY = 76, + + /// + /// Enum TSIG for value: TSIG + /// + [EnumMember(Value = "TSIG")] + TSIG = 77, + + /// + /// Enum IXFR for value: IXFR + /// + [EnumMember(Value = "IXFR")] + IXFR = 78, + + /// + /// Enum AXFR for value: AXFR + /// + [EnumMember(Value = "AXFR")] + AXFR = 79, + + /// + /// Enum MAILB for value: MAILB + /// + [EnumMember(Value = "MAILB")] + MAILB = 80, + + /// + /// Enum MAILA for value: MAILA + /// + [EnumMember(Value = "MAILA")] + MAILA = 81, + + /// + /// Enum ANY for value: ANY + /// + [EnumMember(Value = "ANY")] + ANY = 82, + + /// + /// Enum URI for value: URI + /// + [EnumMember(Value = "URI")] + URI = 83, + + /// + /// Enum CAA for value: CAA + /// + [EnumMember(Value = "CAA")] + CAA = 84, + + /// + /// Enum AVC for value: AVC + /// + [EnumMember(Value = "AVC")] + AVC = 85, + + /// + /// Enum DOA for value: DOA + /// + [EnumMember(Value = "DOA")] + DOA = 86, + + /// + /// Enum AMTRELAY for value: AMTRELAY + /// + [EnumMember(Value = "AMTRELAY")] + AMTRELAY = 87, + + /// + /// Enum TA for value: TA + /// + [EnumMember(Value = "TA")] + TA = 88, + + /// + /// Enum DLV for value: DLV + /// + [EnumMember(Value = "DLV")] + DLV = 89 + + } + + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DNSLookupOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// List of record types you wish to query such as MX, DNS, TXT, NS, A etc. (required). + /// List of record types you wish to query such as MX, DNS, TXT, NS, A etc. (required). + /// Optionally control whether to omit the final dot in full DNS name values. (required). + public DNSLookupOptions(string hostname = default(string), List recordTypes = default(List), bool omitFinalDNSDot = default(bool)) + { + // to ensure "hostname" is required (not null) + if (hostname == null) + { + throw new ArgumentNullException("hostname is a required property for DNSLookupOptions and cannot be null"); + } + this.Hostname = hostname; + // to ensure "recordTypes" is required (not null) + if (recordTypes == null) + { + throw new ArgumentNullException("recordTypes is a required property for DNSLookupOptions and cannot be null"); + } + this.RecordTypes = recordTypes; + this.OmitFinalDNSDot = omitFinalDNSDot; + } + + /// + /// List of record types you wish to query such as MX, DNS, TXT, NS, A etc. + /// + /// List of record types you wish to query such as MX, DNS, TXT, NS, A etc. + [DataMember(Name = "hostname", IsRequired = true, EmitDefaultValue = true)] + public string Hostname { get; set; } + + /// + /// List of record types you wish to query such as MX, DNS, TXT, NS, A etc. + /// + /// List of record types you wish to query such as MX, DNS, TXT, NS, A etc. + [DataMember(Name = "recordTypes", IsRequired = true, EmitDefaultValue = true)] + public List RecordTypes { get; set; } + + /// + /// Optionally control whether to omit the final dot in full DNS name values. + /// + /// Optionally control whether to omit the final dot in full DNS name values. + [DataMember(Name = "omitFinalDNSDot", IsRequired = true, EmitDefaultValue = true)] + public bool OmitFinalDNSDot { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DNSLookupOptions {\n"); + sb.Append(" Hostname: ").Append(Hostname).Append("\n"); + sb.Append(" RecordTypes: ").Append(RecordTypes).Append("\n"); + sb.Append(" OmitFinalDNSDot: ").Append(OmitFinalDNSDot).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DNSLookupOptions); + } + + /// + /// Returns true if DNSLookupOptions instances are equal + /// + /// Instance of DNSLookupOptions to be compared + /// Boolean + public bool Equals(DNSLookupOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Hostname == input.Hostname || + (this.Hostname != null && + this.Hostname.Equals(input.Hostname)) + ) && + ( + this.RecordTypes == input.RecordTypes || + this.RecordTypes != null && + input.RecordTypes != null && + this.RecordTypes.SequenceEqual(input.RecordTypes) + ) && + ( + this.OmitFinalDNSDot == input.OmitFinalDNSDot || + this.OmitFinalDNSDot.Equals(input.OmitFinalDNSDot) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Hostname != null) + { + hashCode = (hashCode * 59) + this.Hostname.GetHashCode(); + } + if (this.RecordTypes != null) + { + hashCode = (hashCode * 59) + this.RecordTypes.GetHashCode(); + } + hashCode = (hashCode * 59) + this.OmitFinalDNSDot.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DNSLookupResult.cs b/src/mailslurp/Model/DNSLookupResult.cs new file mode 100644 index 00000000..528387b0 --- /dev/null +++ b/src/mailslurp/Model/DNSLookupResult.cs @@ -0,0 +1,735 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// DNS lookup result. Includes record type, time to live, raw response, and name value for the name server response. + /// + [DataContract(Name = "DNSLookupResult")] + public partial class DNSLookupResult : IEquatable, IValidatableObject + { + /// + /// Domain Name Server Record Types + /// + /// Domain Name Server Record Types + [JsonConverter(typeof(StringEnumConverter))] + public enum RecordTypeEnum + { + /// + /// Enum A for value: A + /// + [EnumMember(Value = "A")] + A = 1, + + /// + /// Enum NS for value: NS + /// + [EnumMember(Value = "NS")] + NS = 2, + + /// + /// Enum MD for value: MD + /// + [EnumMember(Value = "MD")] + MD = 3, + + /// + /// Enum MF for value: MF + /// + [EnumMember(Value = "MF")] + MF = 4, + + /// + /// Enum CNAME for value: CNAME + /// + [EnumMember(Value = "CNAME")] + CNAME = 5, + + /// + /// Enum SOA for value: SOA + /// + [EnumMember(Value = "SOA")] + SOA = 6, + + /// + /// Enum MB for value: MB + /// + [EnumMember(Value = "MB")] + MB = 7, + + /// + /// Enum MG for value: MG + /// + [EnumMember(Value = "MG")] + MG = 8, + + /// + /// Enum MR for value: MR + /// + [EnumMember(Value = "MR")] + MR = 9, + + /// + /// Enum NULL for value: NULL + /// + [EnumMember(Value = "NULL")] + NULL = 10, + + /// + /// Enum WKS for value: WKS + /// + [EnumMember(Value = "WKS")] + WKS = 11, + + /// + /// Enum PTR for value: PTR + /// + [EnumMember(Value = "PTR")] + PTR = 12, + + /// + /// Enum HINFO for value: HINFO + /// + [EnumMember(Value = "HINFO")] + HINFO = 13, + + /// + /// Enum MINFO for value: MINFO + /// + [EnumMember(Value = "MINFO")] + MINFO = 14, + + /// + /// Enum MX for value: MX + /// + [EnumMember(Value = "MX")] + MX = 15, + + /// + /// Enum TXT for value: TXT + /// + [EnumMember(Value = "TXT")] + TXT = 16, + + /// + /// Enum RP for value: RP + /// + [EnumMember(Value = "RP")] + RP = 17, + + /// + /// Enum AFSDB for value: AFSDB + /// + [EnumMember(Value = "AFSDB")] + AFSDB = 18, + + /// + /// Enum X25 for value: X25 + /// + [EnumMember(Value = "X25")] + X25 = 19, + + /// + /// Enum ISDN for value: ISDN + /// + [EnumMember(Value = "ISDN")] + ISDN = 20, + + /// + /// Enum RT for value: RT + /// + [EnumMember(Value = "RT")] + RT = 21, + + /// + /// Enum NSAP for value: NSAP + /// + [EnumMember(Value = "NSAP")] + NSAP = 22, + + /// + /// Enum NSAPPTR for value: NSAP_PTR + /// + [EnumMember(Value = "NSAP_PTR")] + NSAPPTR = 23, + + /// + /// Enum SIG for value: SIG + /// + [EnumMember(Value = "SIG")] + SIG = 24, + + /// + /// Enum KEY for value: KEY + /// + [EnumMember(Value = "KEY")] + KEY = 25, + + /// + /// Enum PX for value: PX + /// + [EnumMember(Value = "PX")] + PX = 26, + + /// + /// Enum GPOS for value: GPOS + /// + [EnumMember(Value = "GPOS")] + GPOS = 27, + + /// + /// Enum AAAA for value: AAAA + /// + [EnumMember(Value = "AAAA")] + AAAA = 28, + + /// + /// Enum LOC for value: LOC + /// + [EnumMember(Value = "LOC")] + LOC = 29, + + /// + /// Enum NXT for value: NXT + /// + [EnumMember(Value = "NXT")] + NXT = 30, + + /// + /// Enum EID for value: EID + /// + [EnumMember(Value = "EID")] + EID = 31, + + /// + /// Enum NIMLOC for value: NIMLOC + /// + [EnumMember(Value = "NIMLOC")] + NIMLOC = 32, + + /// + /// Enum SRV for value: SRV + /// + [EnumMember(Value = "SRV")] + SRV = 33, + + /// + /// Enum ATMA for value: ATMA + /// + [EnumMember(Value = "ATMA")] + ATMA = 34, + + /// + /// Enum NAPTR for value: NAPTR + /// + [EnumMember(Value = "NAPTR")] + NAPTR = 35, + + /// + /// Enum KX for value: KX + /// + [EnumMember(Value = "KX")] + KX = 36, + + /// + /// Enum CERT for value: CERT + /// + [EnumMember(Value = "CERT")] + CERT = 37, + + /// + /// Enum A6 for value: A6 + /// + [EnumMember(Value = "A6")] + A6 = 38, + + /// + /// Enum DNAME for value: DNAME + /// + [EnumMember(Value = "DNAME")] + DNAME = 39, + + /// + /// Enum SINK for value: SINK + /// + [EnumMember(Value = "SINK")] + SINK = 40, + + /// + /// Enum OPT for value: OPT + /// + [EnumMember(Value = "OPT")] + OPT = 41, + + /// + /// Enum APL for value: APL + /// + [EnumMember(Value = "APL")] + APL = 42, + + /// + /// Enum DS for value: DS + /// + [EnumMember(Value = "DS")] + DS = 43, + + /// + /// Enum SSHFP for value: SSHFP + /// + [EnumMember(Value = "SSHFP")] + SSHFP = 44, + + /// + /// Enum IPSECKEY for value: IPSECKEY + /// + [EnumMember(Value = "IPSECKEY")] + IPSECKEY = 45, + + /// + /// Enum RRSIG for value: RRSIG + /// + [EnumMember(Value = "RRSIG")] + RRSIG = 46, + + /// + /// Enum NSEC for value: NSEC + /// + [EnumMember(Value = "NSEC")] + NSEC = 47, + + /// + /// Enum DNSKEY for value: DNSKEY + /// + [EnumMember(Value = "DNSKEY")] + DNSKEY = 48, + + /// + /// Enum DHCID for value: DHCID + /// + [EnumMember(Value = "DHCID")] + DHCID = 49, + + /// + /// Enum NSEC3 for value: NSEC3 + /// + [EnumMember(Value = "NSEC3")] + NSEC3 = 50, + + /// + /// Enum NSEC3PARAM for value: NSEC3PARAM + /// + [EnumMember(Value = "NSEC3PARAM")] + NSEC3PARAM = 51, + + /// + /// Enum TLSA for value: TLSA + /// + [EnumMember(Value = "TLSA")] + TLSA = 52, + + /// + /// Enum SMIMEA for value: SMIMEA + /// + [EnumMember(Value = "SMIMEA")] + SMIMEA = 53, + + /// + /// Enum HIP for value: HIP + /// + [EnumMember(Value = "HIP")] + HIP = 54, + + /// + /// Enum NINFO for value: NINFO + /// + [EnumMember(Value = "NINFO")] + NINFO = 55, + + /// + /// Enum RKEY for value: RKEY + /// + [EnumMember(Value = "RKEY")] + RKEY = 56, + + /// + /// Enum TALINK for value: TALINK + /// + [EnumMember(Value = "TALINK")] + TALINK = 57, + + /// + /// Enum CDS for value: CDS + /// + [EnumMember(Value = "CDS")] + CDS = 58, + + /// + /// Enum CDNSKEY for value: CDNSKEY + /// + [EnumMember(Value = "CDNSKEY")] + CDNSKEY = 59, + + /// + /// Enum OPENPGPKEY for value: OPENPGPKEY + /// + [EnumMember(Value = "OPENPGPKEY")] + OPENPGPKEY = 60, + + /// + /// Enum CSYNC for value: CSYNC + /// + [EnumMember(Value = "CSYNC")] + CSYNC = 61, + + /// + /// Enum ZONEMD for value: ZONEMD + /// + [EnumMember(Value = "ZONEMD")] + ZONEMD = 62, + + /// + /// Enum SVCB for value: SVCB + /// + [EnumMember(Value = "SVCB")] + SVCB = 63, + + /// + /// Enum HTTPS for value: HTTPS + /// + [EnumMember(Value = "HTTPS")] + HTTPS = 64, + + /// + /// Enum SPF for value: SPF + /// + [EnumMember(Value = "SPF")] + SPF = 65, + + /// + /// Enum UINFO for value: UINFO + /// + [EnumMember(Value = "UINFO")] + UINFO = 66, + + /// + /// Enum UID for value: UID + /// + [EnumMember(Value = "UID")] + UID = 67, + + /// + /// Enum GID for value: GID + /// + [EnumMember(Value = "GID")] + GID = 68, + + /// + /// Enum UNSPEC for value: UNSPEC + /// + [EnumMember(Value = "UNSPEC")] + UNSPEC = 69, + + /// + /// Enum NID for value: NID + /// + [EnumMember(Value = "NID")] + NID = 70, + + /// + /// Enum L32 for value: L32 + /// + [EnumMember(Value = "L32")] + L32 = 71, + + /// + /// Enum L64 for value: L64 + /// + [EnumMember(Value = "L64")] + L64 = 72, + + /// + /// Enum LP for value: LP + /// + [EnumMember(Value = "LP")] + LP = 73, + + /// + /// Enum EUI48 for value: EUI48 + /// + [EnumMember(Value = "EUI48")] + EUI48 = 74, + + /// + /// Enum EUI64 for value: EUI64 + /// + [EnumMember(Value = "EUI64")] + EUI64 = 75, + + /// + /// Enum TKEY for value: TKEY + /// + [EnumMember(Value = "TKEY")] + TKEY = 76, + + /// + /// Enum TSIG for value: TSIG + /// + [EnumMember(Value = "TSIG")] + TSIG = 77, + + /// + /// Enum IXFR for value: IXFR + /// + [EnumMember(Value = "IXFR")] + IXFR = 78, + + /// + /// Enum AXFR for value: AXFR + /// + [EnumMember(Value = "AXFR")] + AXFR = 79, + + /// + /// Enum MAILB for value: MAILB + /// + [EnumMember(Value = "MAILB")] + MAILB = 80, + + /// + /// Enum MAILA for value: MAILA + /// + [EnumMember(Value = "MAILA")] + MAILA = 81, + + /// + /// Enum ANY for value: ANY + /// + [EnumMember(Value = "ANY")] + ANY = 82, + + /// + /// Enum URI for value: URI + /// + [EnumMember(Value = "URI")] + URI = 83, + + /// + /// Enum CAA for value: CAA + /// + [EnumMember(Value = "CAA")] + CAA = 84, + + /// + /// Enum AVC for value: AVC + /// + [EnumMember(Value = "AVC")] + AVC = 85, + + /// + /// Enum DOA for value: DOA + /// + [EnumMember(Value = "DOA")] + DOA = 86, + + /// + /// Enum AMTRELAY for value: AMTRELAY + /// + [EnumMember(Value = "AMTRELAY")] + AMTRELAY = 87, + + /// + /// Enum TA for value: TA + /// + [EnumMember(Value = "TA")] + TA = 88, + + /// + /// Enum DLV for value: DLV + /// + [EnumMember(Value = "DLV")] + DLV = 89 + + } + + + /// + /// Domain Name Server Record Types + /// + /// Domain Name Server Record Types + [DataMember(Name = "recordType", IsRequired = true, EmitDefaultValue = true)] + public RecordTypeEnum RecordType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DNSLookupResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Domain Name Server Record Types (required). + /// ttl (required). + /// recordEntries (required). + /// name (required). + public DNSLookupResult(RecordTypeEnum recordType = default(RecordTypeEnum), long ttl = default(long), List recordEntries = default(List), string name = default(string)) + { + this.RecordType = recordType; + this.Ttl = ttl; + // to ensure "recordEntries" is required (not null) + if (recordEntries == null) + { + throw new ArgumentNullException("recordEntries is a required property for DNSLookupResult and cannot be null"); + } + this.RecordEntries = recordEntries; + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for DNSLookupResult and cannot be null"); + } + this.Name = name; + } + + /// + /// Gets or Sets Ttl + /// + [DataMember(Name = "ttl", IsRequired = true, EmitDefaultValue = true)] + public long Ttl { get; set; } + + /// + /// Gets or Sets RecordEntries + /// + [DataMember(Name = "recordEntries", IsRequired = true, EmitDefaultValue = true)] + public List RecordEntries { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DNSLookupResult {\n"); + sb.Append(" RecordType: ").Append(RecordType).Append("\n"); + sb.Append(" Ttl: ").Append(Ttl).Append("\n"); + sb.Append(" RecordEntries: ").Append(RecordEntries).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DNSLookupResult); + } + + /// + /// Returns true if DNSLookupResult instances are equal + /// + /// Instance of DNSLookupResult to be compared + /// Boolean + public bool Equals(DNSLookupResult input) + { + if (input == null) + { + return false; + } + return + ( + this.RecordType == input.RecordType || + this.RecordType.Equals(input.RecordType) + ) && + ( + this.Ttl == input.Ttl || + this.Ttl.Equals(input.Ttl) + ) && + ( + this.RecordEntries == input.RecordEntries || + this.RecordEntries != null && + input.RecordEntries != null && + this.RecordEntries.SequenceEqual(input.RecordEntries) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.RecordType.GetHashCode(); + hashCode = (hashCode * 59) + this.Ttl.GetHashCode(); + if (this.RecordEntries != null) + { + hashCode = (hashCode * 59) + this.RecordEntries.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DNSLookupResults.cs b/src/mailslurp/Model/DNSLookupResults.cs new file mode 100644 index 00000000..64209f07 --- /dev/null +++ b/src/mailslurp/Model/DNSLookupResults.cs @@ -0,0 +1,140 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Results of query on domain name servers + /// + [DataContract(Name = "DNSLookupResults")] + public partial class DNSLookupResults : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DNSLookupResults() { } + /// + /// Initializes a new instance of the class. + /// + /// results (required). + public DNSLookupResults(List results = default(List)) + { + // to ensure "results" is required (not null) + if (results == null) + { + throw new ArgumentNullException("results is a required property for DNSLookupResults and cannot be null"); + } + this.Results = results; + } + + /// + /// Gets or Sets Results + /// + [DataMember(Name = "results", IsRequired = true, EmitDefaultValue = true)] + public List Results { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DNSLookupResults {\n"); + sb.Append(" Results: ").Append(Results).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DNSLookupResults); + } + + /// + /// Returns true if DNSLookupResults instances are equal + /// + /// Instance of DNSLookupResults to be compared + /// Boolean + public bool Equals(DNSLookupResults input) + { + if (input == null) + { + return false; + } + return + ( + this.Results == input.Results || + this.Results != null && + input.Results != null && + this.Results.SequenceEqual(input.Results) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Results != null) + { + hashCode = (hashCode * 59) + this.Results.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DeliveryStatusDto.cs b/src/mailslurp/Model/DeliveryStatusDto.cs new file mode 100644 index 00000000..5e1625fe --- /dev/null +++ b/src/mailslurp/Model/DeliveryStatusDto.cs @@ -0,0 +1,361 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// DeliveryStatusDto + /// + [DataContract(Name = "DeliveryStatusDto")] + public partial class DeliveryStatusDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeliveryStatusDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// sentId. + /// remoteMtaIp. + /// inboxId. + /// reportingMta. + /// recipients. + /// smtpResponse. + /// smtpStatusCode. + /// processingTimeMillis. + /// received. + /// subject. + /// createdAt (required). + /// updatedAt (required). + public DeliveryStatusDto(Guid id = default(Guid), Guid userId = default(Guid), Guid sentId = default(Guid), string remoteMtaIp = default(string), Guid inboxId = default(Guid), string reportingMta = default(string), List recipients = default(List), string smtpResponse = default(string), int smtpStatusCode = default(int), long processingTimeMillis = default(long), DateTime received = default(DateTime), string subject = default(string), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.SentId = sentId; + this.RemoteMtaIp = remoteMtaIp; + this.InboxId = inboxId; + this.ReportingMta = reportingMta; + this.Recipients = recipients; + this.SmtpResponse = smtpResponse; + this.SmtpStatusCode = smtpStatusCode; + this.ProcessingTimeMillis = processingTimeMillis; + this.Received = received; + this.Subject = subject; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets SentId + /// + [DataMember(Name = "sentId", EmitDefaultValue = false)] + public Guid SentId { get; set; } + + /// + /// Gets or Sets RemoteMtaIp + /// + [DataMember(Name = "remoteMtaIp", EmitDefaultValue = false)] + public string RemoteMtaIp { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = false)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets ReportingMta + /// + [DataMember(Name = "reportingMta", EmitDefaultValue = false)] + public string ReportingMta { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name = "recipients", EmitDefaultValue = false)] + public List Recipients { get; set; } + + /// + /// Gets or Sets SmtpResponse + /// + [DataMember(Name = "smtpResponse", EmitDefaultValue = false)] + public string SmtpResponse { get; set; } + + /// + /// Gets or Sets SmtpStatusCode + /// + [DataMember(Name = "smtpStatusCode", EmitDefaultValue = false)] + public int SmtpStatusCode { get; set; } + + /// + /// Gets or Sets ProcessingTimeMillis + /// + [DataMember(Name = "processingTimeMillis", EmitDefaultValue = false)] + public long ProcessingTimeMillis { get; set; } + + /// + /// Gets or Sets Received + /// + [DataMember(Name = "received", EmitDefaultValue = false)] + public DateTime Received { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DeliveryStatusDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" SentId: ").Append(SentId).Append("\n"); + sb.Append(" RemoteMtaIp: ").Append(RemoteMtaIp).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" ReportingMta: ").Append(ReportingMta).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" SmtpResponse: ").Append(SmtpResponse).Append("\n"); + sb.Append(" SmtpStatusCode: ").Append(SmtpStatusCode).Append("\n"); + sb.Append(" ProcessingTimeMillis: ").Append(ProcessingTimeMillis).Append("\n"); + sb.Append(" Received: ").Append(Received).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DeliveryStatusDto); + } + + /// + /// Returns true if DeliveryStatusDto instances are equal + /// + /// Instance of DeliveryStatusDto to be compared + /// Boolean + public bool Equals(DeliveryStatusDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.SentId == input.SentId || + (this.SentId != null && + this.SentId.Equals(input.SentId)) + ) && + ( + this.RemoteMtaIp == input.RemoteMtaIp || + (this.RemoteMtaIp != null && + this.RemoteMtaIp.Equals(input.RemoteMtaIp)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.ReportingMta == input.ReportingMta || + (this.ReportingMta != null && + this.ReportingMta.Equals(input.ReportingMta)) + ) && + ( + this.Recipients == input.Recipients || + this.Recipients != null && + input.Recipients != null && + this.Recipients.SequenceEqual(input.Recipients) + ) && + ( + this.SmtpResponse == input.SmtpResponse || + (this.SmtpResponse != null && + this.SmtpResponse.Equals(input.SmtpResponse)) + ) && + ( + this.SmtpStatusCode == input.SmtpStatusCode || + this.SmtpStatusCode.Equals(input.SmtpStatusCode) + ) && + ( + this.ProcessingTimeMillis == input.ProcessingTimeMillis || + this.ProcessingTimeMillis.Equals(input.ProcessingTimeMillis) + ) && + ( + this.Received == input.Received || + (this.Received != null && + this.Received.Equals(input.Received)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.SentId != null) + { + hashCode = (hashCode * 59) + this.SentId.GetHashCode(); + } + if (this.RemoteMtaIp != null) + { + hashCode = (hashCode * 59) + this.RemoteMtaIp.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.ReportingMta != null) + { + hashCode = (hashCode * 59) + this.ReportingMta.GetHashCode(); + } + if (this.Recipients != null) + { + hashCode = (hashCode * 59) + this.Recipients.GetHashCode(); + } + if (this.SmtpResponse != null) + { + hashCode = (hashCode * 59) + this.SmtpResponse.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SmtpStatusCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ProcessingTimeMillis.GetHashCode(); + if (this.Received != null) + { + hashCode = (hashCode * 59) + this.Received.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DescribeDomainOptions.cs b/src/mailslurp/Model/DescribeDomainOptions.cs new file mode 100644 index 00000000..5a778816 --- /dev/null +++ b/src/mailslurp/Model/DescribeDomainOptions.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Domain record description + /// + [DataContract(Name = "DescribeDomainOptions")] + public partial class DescribeDomainOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DescribeDomainOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// domain (required). + public DescribeDomainOptions(string domain = default(string)) + { + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new ArgumentNullException("domain is a required property for DescribeDomainOptions and cannot be null"); + } + this.Domain = domain; + } + + /// + /// Gets or Sets Domain + /// + [DataMember(Name = "domain", IsRequired = true, EmitDefaultValue = true)] + public string Domain { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DescribeDomainOptions {\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DescribeDomainOptions); + } + + /// + /// Returns true if DescribeDomainOptions instances are equal + /// + /// Instance of DescribeDomainOptions to be compared + /// Boolean + public bool Equals(DescribeDomainOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Domain != null) + { + hashCode = (hashCode * 59) + this.Domain.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DescribeMailServerDomainResult.cs b/src/mailslurp/Model/DescribeMailServerDomainResult.cs new file mode 100644 index 00000000..af65dbfe --- /dev/null +++ b/src/mailslurp/Model/DescribeMailServerDomainResult.cs @@ -0,0 +1,181 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Name Server lookup result + /// + [DataContract(Name = "DescribeMailServerDomainResult")] + public partial class DescribeMailServerDomainResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DescribeMailServerDomainResult() { } + /// + /// Initializes a new instance of the class. + /// + /// mxRecords (required). + /// domain (required). + /// message. + public DescribeMailServerDomainResult(List mxRecords = default(List), string domain = default(string), string message = default(string)) + { + // to ensure "mxRecords" is required (not null) + if (mxRecords == null) + { + throw new ArgumentNullException("mxRecords is a required property for DescribeMailServerDomainResult and cannot be null"); + } + this.MxRecords = mxRecords; + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new ArgumentNullException("domain is a required property for DescribeMailServerDomainResult and cannot be null"); + } + this.Domain = domain; + this.Message = message; + } + + /// + /// Gets or Sets MxRecords + /// + [DataMember(Name = "mxRecords", IsRequired = true, EmitDefaultValue = true)] + public List MxRecords { get; set; } + + /// + /// Gets or Sets Domain + /// + [DataMember(Name = "domain", IsRequired = true, EmitDefaultValue = true)] + public string Domain { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DescribeMailServerDomainResult {\n"); + sb.Append(" MxRecords: ").Append(MxRecords).Append("\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DescribeMailServerDomainResult); + } + + /// + /// Returns true if DescribeMailServerDomainResult instances are equal + /// + /// Instance of DescribeMailServerDomainResult to be compared + /// Boolean + public bool Equals(DescribeMailServerDomainResult input) + { + if (input == null) + { + return false; + } + return + ( + this.MxRecords == input.MxRecords || + this.MxRecords != null && + input.MxRecords != null && + this.MxRecords.SequenceEqual(input.MxRecords) + ) && + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MxRecords != null) + { + hashCode = (hashCode * 59) + this.MxRecords.GetHashCode(); + } + if (this.Domain != null) + { + hashCode = (hashCode * 59) + this.Domain.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DomainDto.cs b/src/mailslurp/Model/DomainDto.cs new file mode 100644 index 00000000..2b6554f6 --- /dev/null +++ b/src/mailslurp/Model/DomainDto.cs @@ -0,0 +1,356 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Domain plus verification records and status + /// + [DataContract(Name = "DomainDto")] + public partial class DomainDto : IEquatable, IValidatableObject + { + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + [JsonConverter(typeof(StringEnumConverter))] + public enum DomainTypeEnum + { + /// + /// Enum HTTPINBOX for value: HTTP_INBOX + /// + [EnumMember(Value = "HTTP_INBOX")] + HTTPINBOX = 1, + + /// + /// Enum SMTPDOMAIN for value: SMTP_DOMAIN + /// + [EnumMember(Value = "SMTP_DOMAIN")] + SMTPDOMAIN = 2 + + } + + + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + [DataMember(Name = "domainType", IsRequired = true, EmitDefaultValue = true)] + public DomainTypeEnum DomainType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DomainDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// Custom domain name (required). + /// Verification tokens (required). + /// Unique token DKIM tokens (required). + /// Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. (required). + /// List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. (required). + /// The optional catch all inbox that will receive emails sent to the domain that cannot be matched.. + /// createdAt (required). + /// updatedAt (required). + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. (required). + public DomainDto(Guid id = default(Guid), Guid userId = default(Guid), string domain = default(string), string verificationToken = default(string), List dkimTokens = default(List), bool isVerified = default(bool), List domainNameRecords = default(List), Guid? catchAllInboxId = default(Guid?), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), DomainTypeEnum domainType = default(DomainTypeEnum)) + { + this.Id = id; + this.UserId = userId; + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new ArgumentNullException("domain is a required property for DomainDto and cannot be null"); + } + this.Domain = domain; + // to ensure "verificationToken" is required (not null) + if (verificationToken == null) + { + throw new ArgumentNullException("verificationToken is a required property for DomainDto and cannot be null"); + } + this.VerificationToken = verificationToken; + // to ensure "dkimTokens" is required (not null) + if (dkimTokens == null) + { + throw new ArgumentNullException("dkimTokens is a required property for DomainDto and cannot be null"); + } + this.DkimTokens = dkimTokens; + this.IsVerified = isVerified; + // to ensure "domainNameRecords" is required (not null) + if (domainNameRecords == null) + { + throw new ArgumentNullException("domainNameRecords is a required property for DomainDto and cannot be null"); + } + this.DomainNameRecords = domainNameRecords; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.DomainType = domainType; + this.CatchAllInboxId = catchAllInboxId; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Custom domain name + /// + /// Custom domain name + [DataMember(Name = "domain", IsRequired = true, EmitDefaultValue = true)] + public string Domain { get; set; } + + /// + /// Verification tokens + /// + /// Verification tokens + [DataMember(Name = "verificationToken", IsRequired = true, EmitDefaultValue = true)] + public string VerificationToken { get; set; } + + /// + /// Unique token DKIM tokens + /// + /// Unique token DKIM tokens + [DataMember(Name = "dkimTokens", IsRequired = true, EmitDefaultValue = true)] + public List DkimTokens { get; set; } + + /// + /// Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. + /// + /// Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. + [DataMember(Name = "isVerified", IsRequired = true, EmitDefaultValue = true)] + public bool IsVerified { get; set; } + + /// + /// List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. + /// + /// List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. + [DataMember(Name = "domainNameRecords", IsRequired = true, EmitDefaultValue = true)] + public List DomainNameRecords { get; set; } + + /// + /// The optional catch all inbox that will receive emails sent to the domain that cannot be matched. + /// + /// The optional catch all inbox that will receive emails sent to the domain that cannot be matched. + [DataMember(Name = "catchAllInboxId", EmitDefaultValue = true)] + public Guid? CatchAllInboxId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DomainDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append(" VerificationToken: ").Append(VerificationToken).Append("\n"); + sb.Append(" DkimTokens: ").Append(DkimTokens).Append("\n"); + sb.Append(" IsVerified: ").Append(IsVerified).Append("\n"); + sb.Append(" DomainNameRecords: ").Append(DomainNameRecords).Append("\n"); + sb.Append(" CatchAllInboxId: ").Append(CatchAllInboxId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" DomainType: ").Append(DomainType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DomainDto); + } + + /// + /// Returns true if DomainDto instances are equal + /// + /// Instance of DomainDto to be compared + /// Boolean + public bool Equals(DomainDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ) && + ( + this.VerificationToken == input.VerificationToken || + (this.VerificationToken != null && + this.VerificationToken.Equals(input.VerificationToken)) + ) && + ( + this.DkimTokens == input.DkimTokens || + this.DkimTokens != null && + input.DkimTokens != null && + this.DkimTokens.SequenceEqual(input.DkimTokens) + ) && + ( + this.IsVerified == input.IsVerified || + this.IsVerified.Equals(input.IsVerified) + ) && + ( + this.DomainNameRecords == input.DomainNameRecords || + this.DomainNameRecords != null && + input.DomainNameRecords != null && + this.DomainNameRecords.SequenceEqual(input.DomainNameRecords) + ) && + ( + this.CatchAllInboxId == input.CatchAllInboxId || + (this.CatchAllInboxId != null && + this.CatchAllInboxId.Equals(input.CatchAllInboxId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.DomainType == input.DomainType || + this.DomainType.Equals(input.DomainType) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.Domain != null) + { + hashCode = (hashCode * 59) + this.Domain.GetHashCode(); + } + if (this.VerificationToken != null) + { + hashCode = (hashCode * 59) + this.VerificationToken.GetHashCode(); + } + if (this.DkimTokens != null) + { + hashCode = (hashCode * 59) + this.DkimTokens.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsVerified.GetHashCode(); + if (this.DomainNameRecords != null) + { + hashCode = (hashCode * 59) + this.DomainNameRecords.GetHashCode(); + } + if (this.CatchAllInboxId != null) + { + hashCode = (hashCode * 59) + this.CatchAllInboxId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.DomainType.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DomainNameRecord.cs b/src/mailslurp/Model/DomainNameRecord.cs new file mode 100644 index 00000000..dbc232a7 --- /dev/null +++ b/src/mailslurp/Model/DomainNameRecord.cs @@ -0,0 +1,735 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// DNS Record required for verification of a domain. Record vary depending on domain type. + /// + [DataContract(Name = "DomainNameRecord")] + public partial class DomainNameRecord : IEquatable, IValidatableObject + { + /// + /// Domain Name Server Record Types + /// + /// Domain Name Server Record Types + [JsonConverter(typeof(StringEnumConverter))] + public enum RecordTypeEnum + { + /// + /// Enum A for value: A + /// + [EnumMember(Value = "A")] + A = 1, + + /// + /// Enum NS for value: NS + /// + [EnumMember(Value = "NS")] + NS = 2, + + /// + /// Enum MD for value: MD + /// + [EnumMember(Value = "MD")] + MD = 3, + + /// + /// Enum MF for value: MF + /// + [EnumMember(Value = "MF")] + MF = 4, + + /// + /// Enum CNAME for value: CNAME + /// + [EnumMember(Value = "CNAME")] + CNAME = 5, + + /// + /// Enum SOA for value: SOA + /// + [EnumMember(Value = "SOA")] + SOA = 6, + + /// + /// Enum MB for value: MB + /// + [EnumMember(Value = "MB")] + MB = 7, + + /// + /// Enum MG for value: MG + /// + [EnumMember(Value = "MG")] + MG = 8, + + /// + /// Enum MR for value: MR + /// + [EnumMember(Value = "MR")] + MR = 9, + + /// + /// Enum NULL for value: NULL + /// + [EnumMember(Value = "NULL")] + NULL = 10, + + /// + /// Enum WKS for value: WKS + /// + [EnumMember(Value = "WKS")] + WKS = 11, + + /// + /// Enum PTR for value: PTR + /// + [EnumMember(Value = "PTR")] + PTR = 12, + + /// + /// Enum HINFO for value: HINFO + /// + [EnumMember(Value = "HINFO")] + HINFO = 13, + + /// + /// Enum MINFO for value: MINFO + /// + [EnumMember(Value = "MINFO")] + MINFO = 14, + + /// + /// Enum MX for value: MX + /// + [EnumMember(Value = "MX")] + MX = 15, + + /// + /// Enum TXT for value: TXT + /// + [EnumMember(Value = "TXT")] + TXT = 16, + + /// + /// Enum RP for value: RP + /// + [EnumMember(Value = "RP")] + RP = 17, + + /// + /// Enum AFSDB for value: AFSDB + /// + [EnumMember(Value = "AFSDB")] + AFSDB = 18, + + /// + /// Enum X25 for value: X25 + /// + [EnumMember(Value = "X25")] + X25 = 19, + + /// + /// Enum ISDN for value: ISDN + /// + [EnumMember(Value = "ISDN")] + ISDN = 20, + + /// + /// Enum RT for value: RT + /// + [EnumMember(Value = "RT")] + RT = 21, + + /// + /// Enum NSAP for value: NSAP + /// + [EnumMember(Value = "NSAP")] + NSAP = 22, + + /// + /// Enum NSAPPTR for value: NSAP_PTR + /// + [EnumMember(Value = "NSAP_PTR")] + NSAPPTR = 23, + + /// + /// Enum SIG for value: SIG + /// + [EnumMember(Value = "SIG")] + SIG = 24, + + /// + /// Enum KEY for value: KEY + /// + [EnumMember(Value = "KEY")] + KEY = 25, + + /// + /// Enum PX for value: PX + /// + [EnumMember(Value = "PX")] + PX = 26, + + /// + /// Enum GPOS for value: GPOS + /// + [EnumMember(Value = "GPOS")] + GPOS = 27, + + /// + /// Enum AAAA for value: AAAA + /// + [EnumMember(Value = "AAAA")] + AAAA = 28, + + /// + /// Enum LOC for value: LOC + /// + [EnumMember(Value = "LOC")] + LOC = 29, + + /// + /// Enum NXT for value: NXT + /// + [EnumMember(Value = "NXT")] + NXT = 30, + + /// + /// Enum EID for value: EID + /// + [EnumMember(Value = "EID")] + EID = 31, + + /// + /// Enum NIMLOC for value: NIMLOC + /// + [EnumMember(Value = "NIMLOC")] + NIMLOC = 32, + + /// + /// Enum SRV for value: SRV + /// + [EnumMember(Value = "SRV")] + SRV = 33, + + /// + /// Enum ATMA for value: ATMA + /// + [EnumMember(Value = "ATMA")] + ATMA = 34, + + /// + /// Enum NAPTR for value: NAPTR + /// + [EnumMember(Value = "NAPTR")] + NAPTR = 35, + + /// + /// Enum KX for value: KX + /// + [EnumMember(Value = "KX")] + KX = 36, + + /// + /// Enum CERT for value: CERT + /// + [EnumMember(Value = "CERT")] + CERT = 37, + + /// + /// Enum A6 for value: A6 + /// + [EnumMember(Value = "A6")] + A6 = 38, + + /// + /// Enum DNAME for value: DNAME + /// + [EnumMember(Value = "DNAME")] + DNAME = 39, + + /// + /// Enum SINK for value: SINK + /// + [EnumMember(Value = "SINK")] + SINK = 40, + + /// + /// Enum OPT for value: OPT + /// + [EnumMember(Value = "OPT")] + OPT = 41, + + /// + /// Enum APL for value: APL + /// + [EnumMember(Value = "APL")] + APL = 42, + + /// + /// Enum DS for value: DS + /// + [EnumMember(Value = "DS")] + DS = 43, + + /// + /// Enum SSHFP for value: SSHFP + /// + [EnumMember(Value = "SSHFP")] + SSHFP = 44, + + /// + /// Enum IPSECKEY for value: IPSECKEY + /// + [EnumMember(Value = "IPSECKEY")] + IPSECKEY = 45, + + /// + /// Enum RRSIG for value: RRSIG + /// + [EnumMember(Value = "RRSIG")] + RRSIG = 46, + + /// + /// Enum NSEC for value: NSEC + /// + [EnumMember(Value = "NSEC")] + NSEC = 47, + + /// + /// Enum DNSKEY for value: DNSKEY + /// + [EnumMember(Value = "DNSKEY")] + DNSKEY = 48, + + /// + /// Enum DHCID for value: DHCID + /// + [EnumMember(Value = "DHCID")] + DHCID = 49, + + /// + /// Enum NSEC3 for value: NSEC3 + /// + [EnumMember(Value = "NSEC3")] + NSEC3 = 50, + + /// + /// Enum NSEC3PARAM for value: NSEC3PARAM + /// + [EnumMember(Value = "NSEC3PARAM")] + NSEC3PARAM = 51, + + /// + /// Enum TLSA for value: TLSA + /// + [EnumMember(Value = "TLSA")] + TLSA = 52, + + /// + /// Enum SMIMEA for value: SMIMEA + /// + [EnumMember(Value = "SMIMEA")] + SMIMEA = 53, + + /// + /// Enum HIP for value: HIP + /// + [EnumMember(Value = "HIP")] + HIP = 54, + + /// + /// Enum NINFO for value: NINFO + /// + [EnumMember(Value = "NINFO")] + NINFO = 55, + + /// + /// Enum RKEY for value: RKEY + /// + [EnumMember(Value = "RKEY")] + RKEY = 56, + + /// + /// Enum TALINK for value: TALINK + /// + [EnumMember(Value = "TALINK")] + TALINK = 57, + + /// + /// Enum CDS for value: CDS + /// + [EnumMember(Value = "CDS")] + CDS = 58, + + /// + /// Enum CDNSKEY for value: CDNSKEY + /// + [EnumMember(Value = "CDNSKEY")] + CDNSKEY = 59, + + /// + /// Enum OPENPGPKEY for value: OPENPGPKEY + /// + [EnumMember(Value = "OPENPGPKEY")] + OPENPGPKEY = 60, + + /// + /// Enum CSYNC for value: CSYNC + /// + [EnumMember(Value = "CSYNC")] + CSYNC = 61, + + /// + /// Enum ZONEMD for value: ZONEMD + /// + [EnumMember(Value = "ZONEMD")] + ZONEMD = 62, + + /// + /// Enum SVCB for value: SVCB + /// + [EnumMember(Value = "SVCB")] + SVCB = 63, + + /// + /// Enum HTTPS for value: HTTPS + /// + [EnumMember(Value = "HTTPS")] + HTTPS = 64, + + /// + /// Enum SPF for value: SPF + /// + [EnumMember(Value = "SPF")] + SPF = 65, + + /// + /// Enum UINFO for value: UINFO + /// + [EnumMember(Value = "UINFO")] + UINFO = 66, + + /// + /// Enum UID for value: UID + /// + [EnumMember(Value = "UID")] + UID = 67, + + /// + /// Enum GID for value: GID + /// + [EnumMember(Value = "GID")] + GID = 68, + + /// + /// Enum UNSPEC for value: UNSPEC + /// + [EnumMember(Value = "UNSPEC")] + UNSPEC = 69, + + /// + /// Enum NID for value: NID + /// + [EnumMember(Value = "NID")] + NID = 70, + + /// + /// Enum L32 for value: L32 + /// + [EnumMember(Value = "L32")] + L32 = 71, + + /// + /// Enum L64 for value: L64 + /// + [EnumMember(Value = "L64")] + L64 = 72, + + /// + /// Enum LP for value: LP + /// + [EnumMember(Value = "LP")] + LP = 73, + + /// + /// Enum EUI48 for value: EUI48 + /// + [EnumMember(Value = "EUI48")] + EUI48 = 74, + + /// + /// Enum EUI64 for value: EUI64 + /// + [EnumMember(Value = "EUI64")] + EUI64 = 75, + + /// + /// Enum TKEY for value: TKEY + /// + [EnumMember(Value = "TKEY")] + TKEY = 76, + + /// + /// Enum TSIG for value: TSIG + /// + [EnumMember(Value = "TSIG")] + TSIG = 77, + + /// + /// Enum IXFR for value: IXFR + /// + [EnumMember(Value = "IXFR")] + IXFR = 78, + + /// + /// Enum AXFR for value: AXFR + /// + [EnumMember(Value = "AXFR")] + AXFR = 79, + + /// + /// Enum MAILB for value: MAILB + /// + [EnumMember(Value = "MAILB")] + MAILB = 80, + + /// + /// Enum MAILA for value: MAILA + /// + [EnumMember(Value = "MAILA")] + MAILA = 81, + + /// + /// Enum ANY for value: ANY + /// + [EnumMember(Value = "ANY")] + ANY = 82, + + /// + /// Enum URI for value: URI + /// + [EnumMember(Value = "URI")] + URI = 83, + + /// + /// Enum CAA for value: CAA + /// + [EnumMember(Value = "CAA")] + CAA = 84, + + /// + /// Enum AVC for value: AVC + /// + [EnumMember(Value = "AVC")] + AVC = 85, + + /// + /// Enum DOA for value: DOA + /// + [EnumMember(Value = "DOA")] + DOA = 86, + + /// + /// Enum AMTRELAY for value: AMTRELAY + /// + [EnumMember(Value = "AMTRELAY")] + AMTRELAY = 87, + + /// + /// Enum TA for value: TA + /// + [EnumMember(Value = "TA")] + TA = 88, + + /// + /// Enum DLV for value: DLV + /// + [EnumMember(Value = "DLV")] + DLV = 89 + + } + + + /// + /// Domain Name Server Record Types + /// + /// Domain Name Server Record Types + [DataMember(Name = "recordType", IsRequired = true, EmitDefaultValue = true)] + public RecordTypeEnum RecordType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DomainNameRecord() { } + /// + /// Initializes a new instance of the class. + /// + /// Domain Name Server Record Types (required). + /// name (required). + /// recordEntries (required). + /// ttl (required). + public DomainNameRecord(RecordTypeEnum recordType = default(RecordTypeEnum), string name = default(string), List recordEntries = default(List), long ttl = default(long)) + { + this.RecordType = recordType; + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for DomainNameRecord and cannot be null"); + } + this.Name = name; + // to ensure "recordEntries" is required (not null) + if (recordEntries == null) + { + throw new ArgumentNullException("recordEntries is a required property for DomainNameRecord and cannot be null"); + } + this.RecordEntries = recordEntries; + this.Ttl = ttl; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets RecordEntries + /// + [DataMember(Name = "recordEntries", IsRequired = true, EmitDefaultValue = true)] + public List RecordEntries { get; set; } + + /// + /// Gets or Sets Ttl + /// + [DataMember(Name = "ttl", IsRequired = true, EmitDefaultValue = true)] + public long Ttl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DomainNameRecord {\n"); + sb.Append(" RecordType: ").Append(RecordType).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" RecordEntries: ").Append(RecordEntries).Append("\n"); + sb.Append(" Ttl: ").Append(Ttl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DomainNameRecord); + } + + /// + /// Returns true if DomainNameRecord instances are equal + /// + /// Instance of DomainNameRecord to be compared + /// Boolean + public bool Equals(DomainNameRecord input) + { + if (input == null) + { + return false; + } + return + ( + this.RecordType == input.RecordType || + this.RecordType.Equals(input.RecordType) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.RecordEntries == input.RecordEntries || + this.RecordEntries != null && + input.RecordEntries != null && + this.RecordEntries.SequenceEqual(input.RecordEntries) + ) && + ( + this.Ttl == input.Ttl || + this.Ttl.Equals(input.Ttl) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.RecordType.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.RecordEntries != null) + { + hashCode = (hashCode * 59) + this.RecordEntries.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Ttl.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DomainPreview.cs b/src/mailslurp/Model/DomainPreview.cs new file mode 100644 index 00000000..2fbdab19 --- /dev/null +++ b/src/mailslurp/Model/DomainPreview.cs @@ -0,0 +1,243 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Preview object for domain entity + /// + [DataContract(Name = "DomainPreview")] + public partial class DomainPreview : IEquatable, IValidatableObject + { + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + [JsonConverter(typeof(StringEnumConverter))] + public enum DomainTypeEnum + { + /// + /// Enum HTTPINBOX for value: HTTP_INBOX + /// + [EnumMember(Value = "HTTP_INBOX")] + HTTPINBOX = 1, + + /// + /// Enum SMTPDOMAIN for value: SMTP_DOMAIN + /// + [EnumMember(Value = "SMTP_DOMAIN")] + SMTPDOMAIN = 2 + + } + + + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + /// + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + [DataMember(Name = "domainType", IsRequired = true, EmitDefaultValue = true)] + public DomainTypeEnum DomainType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DomainPreview() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// domain (required). + /// catchAllInboxId. + /// createdAt (required). + /// Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. (required). + /// isVerified (required). + public DomainPreview(Guid id = default(Guid), string domain = default(string), Guid? catchAllInboxId = default(Guid?), DateTime createdAt = default(DateTime), DomainTypeEnum domainType = default(DomainTypeEnum), bool isVerified = default(bool)) + { + this.Id = id; + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new ArgumentNullException("domain is a required property for DomainPreview and cannot be null"); + } + this.Domain = domain; + this.CreatedAt = createdAt; + this.DomainType = domainType; + this.IsVerified = isVerified; + this.CatchAllInboxId = catchAllInboxId; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Domain + /// + [DataMember(Name = "domain", IsRequired = true, EmitDefaultValue = true)] + public string Domain { get; set; } + + /// + /// Gets or Sets CatchAllInboxId + /// + [DataMember(Name = "catchAllInboxId", EmitDefaultValue = true)] + public Guid? CatchAllInboxId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets IsVerified + /// + [DataMember(Name = "isVerified", IsRequired = true, EmitDefaultValue = true)] + public bool IsVerified { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DomainPreview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append(" CatchAllInboxId: ").Append(CatchAllInboxId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DomainType: ").Append(DomainType).Append("\n"); + sb.Append(" IsVerified: ").Append(IsVerified).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DomainPreview); + } + + /// + /// Returns true if DomainPreview instances are equal + /// + /// Instance of DomainPreview to be compared + /// Boolean + public bool Equals(DomainPreview input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ) && + ( + this.CatchAllInboxId == input.CatchAllInboxId || + (this.CatchAllInboxId != null && + this.CatchAllInboxId.Equals(input.CatchAllInboxId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.DomainType == input.DomainType || + this.DomainType.Equals(input.DomainType) + ) && + ( + this.IsVerified == input.IsVerified || + this.IsVerified.Equals(input.IsVerified) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Domain != null) + { + hashCode = (hashCode * 59) + this.Domain.GetHashCode(); + } + if (this.CatchAllInboxId != null) + { + hashCode = (hashCode * 59) + this.CatchAllInboxId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.DomainType.GetHashCode(); + hashCode = (hashCode * 59) + this.IsVerified.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/DownloadAttachmentDto.cs b/src/mailslurp/Model/DownloadAttachmentDto.cs new file mode 100644 index 00000000..8c9d438d --- /dev/null +++ b/src/mailslurp/Model/DownloadAttachmentDto.cs @@ -0,0 +1,179 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Content of attachment + /// + [DataContract(Name = "DownloadAttachmentDto")] + public partial class DownloadAttachmentDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DownloadAttachmentDto() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. (required). + /// Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. (required). + /// Size in bytes of attachment content (required). + public DownloadAttachmentDto(string base64FileContents = default(string), string contentType = default(string), long sizeBytes = default(long)) + { + // to ensure "base64FileContents" is required (not null) + if (base64FileContents == null) + { + throw new ArgumentNullException("base64FileContents is a required property for DownloadAttachmentDto and cannot be null"); + } + this.Base64FileContents = base64FileContents; + // to ensure "contentType" is required (not null) + if (contentType == null) + { + throw new ArgumentNullException("contentType is a required property for DownloadAttachmentDto and cannot be null"); + } + this.ContentType = contentType; + this.SizeBytes = sizeBytes; + } + + /// + /// Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. + /// + /// Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. + [DataMember(Name = "base64FileContents", IsRequired = true, EmitDefaultValue = true)] + public string Base64FileContents { get; set; } + + /// + /// Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. + /// + /// Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. + [DataMember(Name = "contentType", IsRequired = true, EmitDefaultValue = true)] + public string ContentType { get; set; } + + /// + /// Size in bytes of attachment content + /// + /// Size in bytes of attachment content + [DataMember(Name = "sizeBytes", IsRequired = true, EmitDefaultValue = true)] + public long SizeBytes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DownloadAttachmentDto {\n"); + sb.Append(" Base64FileContents: ").Append(Base64FileContents).Append("\n"); + sb.Append(" ContentType: ").Append(ContentType).Append("\n"); + sb.Append(" SizeBytes: ").Append(SizeBytes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DownloadAttachmentDto); + } + + /// + /// Returns true if DownloadAttachmentDto instances are equal + /// + /// Instance of DownloadAttachmentDto to be compared + /// Boolean + public bool Equals(DownloadAttachmentDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Base64FileContents == input.Base64FileContents || + (this.Base64FileContents != null && + this.Base64FileContents.Equals(input.Base64FileContents)) + ) && + ( + this.ContentType == input.ContentType || + (this.ContentType != null && + this.ContentType.Equals(input.ContentType)) + ) && + ( + this.SizeBytes == input.SizeBytes || + this.SizeBytes.Equals(input.SizeBytes) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Base64FileContents != null) + { + hashCode = (hashCode * 59) + this.Base64FileContents.GetHashCode(); + } + if (this.ContentType != null) + { + hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SizeBytes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/Email.cs b/src/mailslurp/Model/Email.cs new file mode 100644 index 00000000..b16803e5 --- /dev/null +++ b/src/mailslurp/Model/Email.cs @@ -0,0 +1,585 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email entity (also known as EmailDto). When an SMTP email message is received by MailSlurp it is parsed. The body and attachments are written to disk and the fields such as to, from, subject etc are stored in a database. The `body` contains the email content. If you want the original SMTP message see the `getRawEmail` endpoints. The attachments can be fetched using the AttachmentController + /// + [DataContract(Name = "Email")] + public partial class Email : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Email() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the email entity (required). + /// ID of user that email belongs to (required). + /// ID of the inbox that received the email (required). + /// ID of the domain that received the email. + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. (required). + /// Who the email was sent from. An email address - see fromName for the sender name.. + /// sender. + /// recipients. + /// The `replyTo` field on the received email message. + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names.. + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names.. + /// Collection of SMTP headers attached to email. + /// List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.. + /// The subject line of the email message as specified by SMTP subject header. + /// The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests.. + /// An excerpt of the body of the email message for quick preview .. + /// A hash signature of the email message using MD5. Useful for comparing emails without fetching full body.. + /// Is the email body content type HTML?. + /// Detected character set of the email body such as UTF-8. + /// analysis. + /// When was the email received by MailSlurp (required). + /// When was the email last updated (required). + /// Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. (required). + /// Can the email be accessed by organization team members (required). + /// html. + public Email(Guid id = default(Guid), Guid userId = default(Guid), Guid inboxId = default(Guid), Guid? domainId = default(Guid?), List to = default(List), string from = default(string), Sender sender = default(Sender), EmailRecipients recipients = default(EmailRecipients), string replyTo = default(string), List cc = default(List), List bcc = default(List), Dictionary headers = default(Dictionary), List attachments = default(List), string subject = default(string), string body = default(string), string bodyExcerpt = default(string), string bodyMD5Hash = default(string), bool? isHTML = default(bool?), string charset = default(string), EmailAnalysis analysis = default(EmailAnalysis), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), bool read = default(bool), bool teamAccess = default(bool), bool html = default(bool)) + { + this.Id = id; + this.UserId = userId; + this.InboxId = inboxId; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for Email and cannot be null"); + } + this.To = to; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Read = read; + this.TeamAccess = teamAccess; + this.DomainId = domainId; + this.From = from; + this.Sender = sender; + this.Recipients = recipients; + this.ReplyTo = replyTo; + this.Cc = cc; + this.Bcc = bcc; + this.Headers = headers; + this.Attachments = attachments; + this.Subject = subject; + this.Body = body; + this.BodyExcerpt = bodyExcerpt; + this.BodyMD5Hash = bodyMD5Hash; + this.IsHTML = isHTML; + this.Charset = charset; + this.Analysis = analysis; + this.Html = html; + } + + /// + /// ID of the email entity + /// + /// ID of the email entity + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// ID of user that email belongs to + /// + /// ID of user that email belongs to + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// ID of the inbox that received the email + /// + /// ID of the inbox that received the email + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// ID of the domain that received the email + /// + /// ID of the domain that received the email + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Who the email was sent from. An email address - see fromName for the sender name. + /// + /// Who the email was sent from. An email address - see fromName for the sender name. + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name = "sender", EmitDefaultValue = true)] + public Sender Sender { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name = "recipients", EmitDefaultValue = true)] + public EmailRecipients Recipients { get; set; } + + /// + /// The `replyTo` field on the received email message + /// + /// The `replyTo` field on the received email message + [DataMember(Name = "replyTo", EmitDefaultValue = true)] + public string ReplyTo { get; set; } + + /// + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "cc", EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "bcc", EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// Collection of SMTP headers attached to email + /// + /// Collection of SMTP headers attached to email + [DataMember(Name = "headers", EmitDefaultValue = true)] + public Dictionary Headers { get; set; } + + /// + /// List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. + /// + /// List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// The subject line of the email message as specified by SMTP subject header + /// + /// The subject line of the email message as specified by SMTP subject header + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests. + /// + /// The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests. + [DataMember(Name = "body", EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// An excerpt of the body of the email message for quick preview . + /// + /// An excerpt of the body of the email message for quick preview . + [DataMember(Name = "bodyExcerpt", EmitDefaultValue = true)] + public string BodyExcerpt { get; set; } + + /// + /// A hash signature of the email message using MD5. Useful for comparing emails without fetching full body. + /// + /// A hash signature of the email message using MD5. Useful for comparing emails without fetching full body. + [DataMember(Name = "bodyMD5Hash", EmitDefaultValue = true)] + public string BodyMD5Hash { get; set; } + + /// + /// Is the email body content type HTML? + /// + /// Is the email body content type HTML? + [DataMember(Name = "isHTML", EmitDefaultValue = true)] + public bool? IsHTML { get; set; } + + /// + /// Detected character set of the email body such as UTF-8 + /// + /// Detected character set of the email body such as UTF-8 + [DataMember(Name = "charset", EmitDefaultValue = true)] + public string Charset { get; set; } + + /// + /// Gets or Sets Analysis + /// + [DataMember(Name = "analysis", EmitDefaultValue = true)] + public EmailAnalysis Analysis { get; set; } + + /// + /// When was the email received by MailSlurp + /// + /// When was the email received by MailSlurp + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// When was the email last updated + /// + /// When was the email last updated + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. + /// + /// Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. + [DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)] + public bool Read { get; set; } + + /// + /// Can the email be accessed by organization team members + /// + /// Can the email be accessed by organization team members + [DataMember(Name = "teamAccess", IsRequired = true, EmitDefaultValue = true)] + public bool TeamAccess { get; set; } + + /// + /// Gets or Sets Html + /// + [DataMember(Name = "html", EmitDefaultValue = true)] + public bool Html { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Email {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" BodyExcerpt: ").Append(BodyExcerpt).Append("\n"); + sb.Append(" BodyMD5Hash: ").Append(BodyMD5Hash).Append("\n"); + sb.Append(" IsHTML: ").Append(IsHTML).Append("\n"); + sb.Append(" Charset: ").Append(Charset).Append("\n"); + sb.Append(" Analysis: ").Append(Analysis).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + sb.Append(" TeamAccess: ").Append(TeamAccess).Append("\n"); + sb.Append(" Html: ").Append(Html).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Email); + } + + /// + /// Returns true if Email instances are equal + /// + /// Instance of Email to be compared + /// Boolean + public bool Equals(Email input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Recipients == input.Recipients || + (this.Recipients != null && + this.Recipients.Equals(input.Recipients)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Headers == input.Headers || + this.Headers != null && + input.Headers != null && + this.Headers.SequenceEqual(input.Headers) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.BodyExcerpt == input.BodyExcerpt || + (this.BodyExcerpt != null && + this.BodyExcerpt.Equals(input.BodyExcerpt)) + ) && + ( + this.BodyMD5Hash == input.BodyMD5Hash || + (this.BodyMD5Hash != null && + this.BodyMD5Hash.Equals(input.BodyMD5Hash)) + ) && + ( + this.IsHTML == input.IsHTML || + (this.IsHTML != null && + this.IsHTML.Equals(input.IsHTML)) + ) && + ( + this.Charset == input.Charset || + (this.Charset != null && + this.Charset.Equals(input.Charset)) + ) && + ( + this.Analysis == input.Analysis || + (this.Analysis != null && + this.Analysis.Equals(input.Analysis)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.Read == input.Read || + this.Read.Equals(input.Read) + ) && + ( + this.TeamAccess == input.TeamAccess || + this.TeamAccess.Equals(input.TeamAccess) + ) && + ( + this.Html == input.Html || + this.Html.Equals(input.Html) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + if (this.Recipients != null) + { + hashCode = (hashCode * 59) + this.Recipients.GetHashCode(); + } + if (this.ReplyTo != null) + { + hashCode = (hashCode * 59) + this.ReplyTo.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Headers != null) + { + hashCode = (hashCode * 59) + this.Headers.GetHashCode(); + } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + if (this.BodyExcerpt != null) + { + hashCode = (hashCode * 59) + this.BodyExcerpt.GetHashCode(); + } + if (this.BodyMD5Hash != null) + { + hashCode = (hashCode * 59) + this.BodyMD5Hash.GetHashCode(); + } + if (this.IsHTML != null) + { + hashCode = (hashCode * 59) + this.IsHTML.GetHashCode(); + } + if (this.Charset != null) + { + hashCode = (hashCode * 59) + this.Charset.GetHashCode(); + } + if (this.Analysis != null) + { + hashCode = (hashCode * 59) + this.Analysis.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Read.GetHashCode(); + hashCode = (hashCode * 59) + this.TeamAccess.GetHashCode(); + hashCode = (hashCode * 59) + this.Html.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailAnalysis.cs b/src/mailslurp/Model/EmailAnalysis.cs new file mode 100644 index 00000000..ee191833 --- /dev/null +++ b/src/mailslurp/Model/EmailAnalysis.cs @@ -0,0 +1,206 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Analysis result for email. Each verdict property is a string PASS|FAIL|GRAY or dynamic error message + /// + [DataContract(Name = "EmailAnalysis")] + public partial class EmailAnalysis : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Verdict of spam ranking analysis. + /// Verdict of virus scan analysis. + /// Verdict of Send Policy Framework record spoofing analysis. + /// Verdict of DomainKeys Identified Mail analysis. + /// Verdict of Domain-based Message Authentication Reporting and Conformance analysis. + public EmailAnalysis(string spamVerdict = default(string), string virusVerdict = default(string), string spfVerdict = default(string), string dkimVerdict = default(string), string dmarcVerdict = default(string)) + { + this.SpamVerdict = spamVerdict; + this.VirusVerdict = virusVerdict; + this.SpfVerdict = spfVerdict; + this.DkimVerdict = dkimVerdict; + this.DmarcVerdict = dmarcVerdict; + } + + /// + /// Verdict of spam ranking analysis + /// + /// Verdict of spam ranking analysis + [DataMember(Name = "spamVerdict", EmitDefaultValue = true)] + public string SpamVerdict { get; set; } + + /// + /// Verdict of virus scan analysis + /// + /// Verdict of virus scan analysis + [DataMember(Name = "virusVerdict", EmitDefaultValue = true)] + public string VirusVerdict { get; set; } + + /// + /// Verdict of Send Policy Framework record spoofing analysis + /// + /// Verdict of Send Policy Framework record spoofing analysis + [DataMember(Name = "spfVerdict", EmitDefaultValue = true)] + public string SpfVerdict { get; set; } + + /// + /// Verdict of DomainKeys Identified Mail analysis + /// + /// Verdict of DomainKeys Identified Mail analysis + [DataMember(Name = "dkimVerdict", EmitDefaultValue = true)] + public string DkimVerdict { get; set; } + + /// + /// Verdict of Domain-based Message Authentication Reporting and Conformance analysis + /// + /// Verdict of Domain-based Message Authentication Reporting and Conformance analysis + [DataMember(Name = "dmarcVerdict", EmitDefaultValue = true)] + public string DmarcVerdict { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailAnalysis {\n"); + sb.Append(" SpamVerdict: ").Append(SpamVerdict).Append("\n"); + sb.Append(" VirusVerdict: ").Append(VirusVerdict).Append("\n"); + sb.Append(" SpfVerdict: ").Append(SpfVerdict).Append("\n"); + sb.Append(" DkimVerdict: ").Append(DkimVerdict).Append("\n"); + sb.Append(" DmarcVerdict: ").Append(DmarcVerdict).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailAnalysis); + } + + /// + /// Returns true if EmailAnalysis instances are equal + /// + /// Instance of EmailAnalysis to be compared + /// Boolean + public bool Equals(EmailAnalysis input) + { + if (input == null) + { + return false; + } + return + ( + this.SpamVerdict == input.SpamVerdict || + (this.SpamVerdict != null && + this.SpamVerdict.Equals(input.SpamVerdict)) + ) && + ( + this.VirusVerdict == input.VirusVerdict || + (this.VirusVerdict != null && + this.VirusVerdict.Equals(input.VirusVerdict)) + ) && + ( + this.SpfVerdict == input.SpfVerdict || + (this.SpfVerdict != null && + this.SpfVerdict.Equals(input.SpfVerdict)) + ) && + ( + this.DkimVerdict == input.DkimVerdict || + (this.DkimVerdict != null && + this.DkimVerdict.Equals(input.DkimVerdict)) + ) && + ( + this.DmarcVerdict == input.DmarcVerdict || + (this.DmarcVerdict != null && + this.DmarcVerdict.Equals(input.DmarcVerdict)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SpamVerdict != null) + { + hashCode = (hashCode * 59) + this.SpamVerdict.GetHashCode(); + } + if (this.VirusVerdict != null) + { + hashCode = (hashCode * 59) + this.VirusVerdict.GetHashCode(); + } + if (this.SpfVerdict != null) + { + hashCode = (hashCode * 59) + this.SpfVerdict.GetHashCode(); + } + if (this.DkimVerdict != null) + { + hashCode = (hashCode * 59) + this.DkimVerdict.GetHashCode(); + } + if (this.DmarcVerdict != null) + { + hashCode = (hashCode * 59) + this.DmarcVerdict.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailContentMatchResult.cs b/src/mailslurp/Model/EmailContentMatchResult.cs new file mode 100644 index 00000000..bf8ce7c7 --- /dev/null +++ b/src/mailslurp/Model/EmailContentMatchResult.cs @@ -0,0 +1,163 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Matches for the given pattern + /// + [DataContract(Name = "EmailContentMatchResult")] + public partial class EmailContentMatchResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailContentMatchResult() { } + /// + /// Initializes a new instance of the class. + /// + /// pattern (required). + /// matches (required). + public EmailContentMatchResult(string pattern = default(string), List matches = default(List)) + { + // to ensure "pattern" is required (not null) + if (pattern == null) + { + throw new ArgumentNullException("pattern is a required property for EmailContentMatchResult and cannot be null"); + } + this.Pattern = pattern; + // to ensure "matches" is required (not null) + if (matches == null) + { + throw new ArgumentNullException("matches is a required property for EmailContentMatchResult and cannot be null"); + } + this.Matches = matches; + } + + /// + /// Gets or Sets Pattern + /// + [DataMember(Name = "pattern", IsRequired = true, EmitDefaultValue = true)] + public string Pattern { get; set; } + + /// + /// Gets or Sets Matches + /// + [DataMember(Name = "matches", IsRequired = true, EmitDefaultValue = true)] + public List Matches { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailContentMatchResult {\n"); + sb.Append(" Pattern: ").Append(Pattern).Append("\n"); + sb.Append(" Matches: ").Append(Matches).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailContentMatchResult); + } + + /// + /// Returns true if EmailContentMatchResult instances are equal + /// + /// Instance of EmailContentMatchResult to be compared + /// Boolean + public bool Equals(EmailContentMatchResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Pattern == input.Pattern || + (this.Pattern != null && + this.Pattern.Equals(input.Pattern)) + ) && + ( + this.Matches == input.Matches || + this.Matches != null && + input.Matches != null && + this.Matches.SequenceEqual(input.Matches) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Pattern != null) + { + hashCode = (hashCode * 59) + this.Pattern.GetHashCode(); + } + if (this.Matches != null) + { + hashCode = (hashCode * 59) + this.Matches.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailHtmlDto.cs b/src/mailslurp/Model/EmailHtmlDto.cs new file mode 100644 index 00000000..15695b23 --- /dev/null +++ b/src/mailslurp/Model/EmailHtmlDto.cs @@ -0,0 +1,147 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// EmailHtmlDto + /// + [DataContract(Name = "EmailHtmlDto")] + public partial class EmailHtmlDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// subject. + /// body. + public EmailHtmlDto(string subject = default(string), string body = default(string)) + { + this.Subject = subject; + this.Body = body; + } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Gets or Sets Body + /// + [DataMember(Name = "body", EmitDefaultValue = false)] + public string Body { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailHtmlDto {\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailHtmlDto); + } + + /// + /// Returns true if EmailHtmlDto instances are equal + /// + /// Instance of EmailHtmlDto to be compared + /// Boolean + public bool Equals(EmailHtmlDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailLinksResult.cs b/src/mailslurp/Model/EmailLinksResult.cs new file mode 100644 index 00000000..16e2c1b9 --- /dev/null +++ b/src/mailslurp/Model/EmailLinksResult.cs @@ -0,0 +1,163 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Links found in HTML + /// + [DataContract(Name = "EmailLinksResult")] + public partial class EmailLinksResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailLinksResult() { } + /// + /// Initializes a new instance of the class. + /// + /// links (required). + /// body (required). + public EmailLinksResult(List links = default(List), string body = default(string)) + { + // to ensure "links" is required (not null) + if (links == null) + { + throw new ArgumentNullException("links is a required property for EmailLinksResult and cannot be null"); + } + this.Links = links; + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for EmailLinksResult and cannot be null"); + } + this.Body = body; + } + + /// + /// Gets or Sets Links + /// + [DataMember(Name = "links", IsRequired = true, EmitDefaultValue = true)] + public List Links { get; set; } + + /// + /// Gets or Sets Body + /// + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailLinksResult {\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailLinksResult); + } + + /// + /// Returns true if EmailLinksResult instances are equal + /// + /// Instance of EmailLinksResult to be compared + /// Boolean + public bool Equals(EmailLinksResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Links == input.Links || + this.Links != null && + input.Links != null && + this.Links.SequenceEqual(input.Links) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Links != null) + { + hashCode = (hashCode * 59) + this.Links.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailPreview.cs b/src/mailslurp/Model/EmailPreview.cs new file mode 100644 index 00000000..dcd2de42 --- /dev/null +++ b/src/mailslurp/Model/EmailPreview.cs @@ -0,0 +1,311 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Preview of an email message. For full message (including body and attachments) call the `getEmail` or other email endpoints with the provided email ID. + /// + [DataContract(Name = "EmailPreview")] + public partial class EmailPreview : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailPreview() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the email entity (required). + /// ID of the domain that received the email. + /// The subject line of the email message as specified by SMTP subject header. + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. (required). + /// Who the email was sent from. An email address - see fromName for the sender name.. + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names.. + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names.. + /// When was the email received by MailSlurp (required). + /// Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. (required). + /// List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.. + public EmailPreview(Guid id = default(Guid), Guid? domainId = default(Guid?), string subject = default(string), List to = default(List), string from = default(string), List bcc = default(List), List cc = default(List), DateTime createdAt = default(DateTime), bool read = default(bool), List attachments = default(List)) + { + this.Id = id; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for EmailPreview and cannot be null"); + } + this.To = to; + this.CreatedAt = createdAt; + this.Read = read; + this.DomainId = domainId; + this.Subject = subject; + this.From = from; + this.Bcc = bcc; + this.Cc = cc; + this.Attachments = attachments; + } + + /// + /// ID of the email entity + /// + /// ID of the email entity + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// ID of the domain that received the email + /// + /// ID of the domain that received the email + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// The subject line of the email message as specified by SMTP subject header + /// + /// The subject line of the email message as specified by SMTP subject header + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Who the email was sent from. An email address - see fromName for the sender name. + /// + /// Who the email was sent from. An email address - see fromName for the sender name. + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "bcc", EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "cc", EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// When was the email received by MailSlurp + /// + /// When was the email received by MailSlurp + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. + /// + /// Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. + [DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)] + public bool Read { get; set; } + + /// + /// List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. + /// + /// List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailPreview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailPreview); + } + + /// + /// Returns true if EmailPreview instances are equal + /// + /// Instance of EmailPreview to be compared + /// Boolean + public bool Equals(EmailPreview input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.Read == input.Read || + this.Read.Equals(input.Read) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Read.GetHashCode(); + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailPreviewUrls.cs b/src/mailslurp/Model/EmailPreviewUrls.cs new file mode 100644 index 00000000..734b65e2 --- /dev/null +++ b/src/mailslurp/Model/EmailPreviewUrls.cs @@ -0,0 +1,162 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// URLs for email body + /// + [DataContract(Name = "EmailPreviewUrls")] + public partial class EmailPreviewUrls : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailPreviewUrls() { } + /// + /// Initializes a new instance of the class. + /// + /// rawSmtpMessageUrl (required). + /// plainHtmlBodyUrl (required). + public EmailPreviewUrls(string rawSmtpMessageUrl = default(string), string plainHtmlBodyUrl = default(string)) + { + // to ensure "rawSmtpMessageUrl" is required (not null) + if (rawSmtpMessageUrl == null) + { + throw new ArgumentNullException("rawSmtpMessageUrl is a required property for EmailPreviewUrls and cannot be null"); + } + this.RawSmtpMessageUrl = rawSmtpMessageUrl; + // to ensure "plainHtmlBodyUrl" is required (not null) + if (plainHtmlBodyUrl == null) + { + throw new ArgumentNullException("plainHtmlBodyUrl is a required property for EmailPreviewUrls and cannot be null"); + } + this.PlainHtmlBodyUrl = plainHtmlBodyUrl; + } + + /// + /// Gets or Sets RawSmtpMessageUrl + /// + [DataMember(Name = "rawSmtpMessageUrl", IsRequired = true, EmitDefaultValue = true)] + public string RawSmtpMessageUrl { get; set; } + + /// + /// Gets or Sets PlainHtmlBodyUrl + /// + [DataMember(Name = "plainHtmlBodyUrl", IsRequired = true, EmitDefaultValue = true)] + public string PlainHtmlBodyUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailPreviewUrls {\n"); + sb.Append(" RawSmtpMessageUrl: ").Append(RawSmtpMessageUrl).Append("\n"); + sb.Append(" PlainHtmlBodyUrl: ").Append(PlainHtmlBodyUrl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailPreviewUrls); + } + + /// + /// Returns true if EmailPreviewUrls instances are equal + /// + /// Instance of EmailPreviewUrls to be compared + /// Boolean + public bool Equals(EmailPreviewUrls input) + { + if (input == null) + { + return false; + } + return + ( + this.RawSmtpMessageUrl == input.RawSmtpMessageUrl || + (this.RawSmtpMessageUrl != null && + this.RawSmtpMessageUrl.Equals(input.RawSmtpMessageUrl)) + ) && + ( + this.PlainHtmlBodyUrl == input.PlainHtmlBodyUrl || + (this.PlainHtmlBodyUrl != null && + this.PlainHtmlBodyUrl.Equals(input.PlainHtmlBodyUrl)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RawSmtpMessageUrl != null) + { + hashCode = (hashCode * 59) + this.RawSmtpMessageUrl.GetHashCode(); + } + if (this.PlainHtmlBodyUrl != null) + { + hashCode = (hashCode * 59) + this.PlainHtmlBodyUrl.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailProjection.cs b/src/mailslurp/Model/EmailProjection.cs new file mode 100644 index 00000000..0df2c291 --- /dev/null +++ b/src/mailslurp/Model/EmailProjection.cs @@ -0,0 +1,369 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties. + /// + [DataContract(Name = "EmailProjection")] + public partial class EmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// from. + /// subject. + /// inboxId (required). + /// attachments. + /// createdAt (required). + /// to (required). + /// bcc. + /// cc. + /// domainId. + /// read (required). + /// bodyExcerpt. + /// teamAccess (required). + /// bodyMD5Hash. + public EmailProjection(Guid id = default(Guid), string from = default(string), string subject = default(string), Guid inboxId = default(Guid), List attachments = default(List), DateTime createdAt = default(DateTime), List to = default(List), List bcc = default(List), List cc = default(List), Guid? domainId = default(Guid?), bool read = default(bool), string bodyExcerpt = default(string), bool teamAccess = default(bool), string bodyMD5Hash = default(string)) + { + this.Id = id; + this.InboxId = inboxId; + this.CreatedAt = createdAt; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for EmailProjection and cannot be null"); + } + this.To = to; + this.Read = read; + this.TeamAccess = teamAccess; + this.From = from; + this.Subject = subject; + this.Attachments = attachments; + this.Bcc = bcc; + this.Cc = cc; + this.DomainId = domainId; + this.BodyExcerpt = bodyExcerpt; + this.BodyMD5Hash = bodyMD5Hash; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets From + /// + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets Attachments + /// + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets To + /// + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Gets or Sets Bcc + /// + [DataMember(Name = "bcc", EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// Gets or Sets Cc + /// + [DataMember(Name = "cc", EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// Gets or Sets DomainId + /// + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// Gets or Sets Read + /// + [DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)] + public bool Read { get; set; } + + /// + /// Gets or Sets BodyExcerpt + /// + [DataMember(Name = "bodyExcerpt", EmitDefaultValue = true)] + public string BodyExcerpt { get; set; } + + /// + /// Gets or Sets TeamAccess + /// + [DataMember(Name = "teamAccess", IsRequired = true, EmitDefaultValue = true)] + public bool TeamAccess { get; set; } + + /// + /// Gets or Sets BodyMD5Hash + /// + [DataMember(Name = "bodyMD5Hash", EmitDefaultValue = true)] + public string BodyMD5Hash { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + sb.Append(" BodyExcerpt: ").Append(BodyExcerpt).Append("\n"); + sb.Append(" TeamAccess: ").Append(TeamAccess).Append("\n"); + sb.Append(" BodyMD5Hash: ").Append(BodyMD5Hash).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailProjection); + } + + /// + /// Returns true if EmailProjection instances are equal + /// + /// Instance of EmailProjection to be compared + /// Boolean + public bool Equals(EmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.Read == input.Read || + this.Read.Equals(input.Read) + ) && + ( + this.BodyExcerpt == input.BodyExcerpt || + (this.BodyExcerpt != null && + this.BodyExcerpt.Equals(input.BodyExcerpt)) + ) && + ( + this.TeamAccess == input.TeamAccess || + this.TeamAccess.Equals(input.TeamAccess) + ) && + ( + this.BodyMD5Hash == input.BodyMD5Hash || + (this.BodyMD5Hash != null && + this.BodyMD5Hash.Equals(input.BodyMD5Hash)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Read.GetHashCode(); + if (this.BodyExcerpt != null) + { + hashCode = (hashCode * 59) + this.BodyExcerpt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TeamAccess.GetHashCode(); + if (this.BodyMD5Hash != null) + { + hashCode = (hashCode * 59) + this.BodyMD5Hash.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailRecipients.cs b/src/mailslurp/Model/EmailRecipients.cs new file mode 100644 index 00000000..69200b86 --- /dev/null +++ b/src/mailslurp/Model/EmailRecipients.cs @@ -0,0 +1,168 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// The `To`,`CC`,`BCC` recipients stored in object form with email address and name accessible. + /// + [DataContract(Name = "EmailRecipients")] + public partial class EmailRecipients : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// to. + /// cc. + /// bcc. + public EmailRecipients(List to = default(List), List cc = default(List), List bcc = default(List)) + { + this.To = to; + this.Cc = cc; + this.Bcc = bcc; + } + + /// + /// Gets or Sets To + /// + [DataMember(Name = "to", EmitDefaultValue = false)] + public List To { get; set; } + + /// + /// Gets or Sets Cc + /// + [DataMember(Name = "cc", EmitDefaultValue = false)] + public List Cc { get; set; } + + /// + /// Gets or Sets Bcc + /// + [DataMember(Name = "bcc", EmitDefaultValue = false)] + public List Bcc { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailRecipients {\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailRecipients); + } + + /// + /// Returns true if EmailRecipients instances are equal + /// + /// Instance of EmailRecipients to be compared + /// Boolean + public bool Equals(EmailRecipients input) + { + if (input == null) + { + return false; + } + return + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailTextLinesResult.cs b/src/mailslurp/Model/EmailTextLinesResult.cs new file mode 100644 index 00000000..961fe72b --- /dev/null +++ b/src/mailslurp/Model/EmailTextLinesResult.cs @@ -0,0 +1,163 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Parsed text of an email + /// + [DataContract(Name = "EmailTextLinesResult")] + public partial class EmailTextLinesResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailTextLinesResult() { } + /// + /// Initializes a new instance of the class. + /// + /// lines (required). + /// body (required). + public EmailTextLinesResult(List lines = default(List), string body = default(string)) + { + // to ensure "lines" is required (not null) + if (lines == null) + { + throw new ArgumentNullException("lines is a required property for EmailTextLinesResult and cannot be null"); + } + this.Lines = lines; + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for EmailTextLinesResult and cannot be null"); + } + this.Body = body; + } + + /// + /// Gets or Sets Lines + /// + [DataMember(Name = "lines", IsRequired = true, EmitDefaultValue = true)] + public List Lines { get; set; } + + /// + /// Gets or Sets Body + /// + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailTextLinesResult {\n"); + sb.Append(" Lines: ").Append(Lines).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailTextLinesResult); + } + + /// + /// Returns true if EmailTextLinesResult instances are equal + /// + /// Instance of EmailTextLinesResult to be compared + /// Boolean + public bool Equals(EmailTextLinesResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Lines == input.Lines || + this.Lines != null && + input.Lines != null && + this.Lines.SequenceEqual(input.Lines) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Lines != null) + { + hashCode = (hashCode * 59) + this.Lines.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailValidationRequestDto.cs b/src/mailslurp/Model/EmailValidationRequestDto.cs new file mode 100644 index 00000000..6ae0c5cb --- /dev/null +++ b/src/mailslurp/Model/EmailValidationRequestDto.cs @@ -0,0 +1,225 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email validation request + /// + [DataContract(Name = "EmailValidationRequestDto")] + public partial class EmailValidationRequestDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailValidationRequestDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// emailAddress (required). + /// isValid (required). + /// createdAt (required). + /// updatedAt (required). + public EmailValidationRequestDto(Guid id = default(Guid), Guid userId = default(Guid), string emailAddress = default(string), bool isValid = default(bool), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for EmailValidationRequestDto and cannot be null"); + } + this.EmailAddress = emailAddress; + this.IsValid = isValid; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets IsValid + /// + [DataMember(Name = "isValid", IsRequired = true, EmitDefaultValue = true)] + public bool IsValid { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailValidationRequestDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" IsValid: ").Append(IsValid).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailValidationRequestDto); + } + + /// + /// Returns true if EmailValidationRequestDto instances are equal + /// + /// Instance of EmailValidationRequestDto to be compared + /// Boolean + public bool Equals(EmailValidationRequestDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.IsValid == input.IsValid || + this.IsValid.Equals(input.IsValid) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsValid.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmailVerificationResult.cs b/src/mailslurp/Model/EmailVerificationResult.cs new file mode 100644 index 00000000..5fe07a48 --- /dev/null +++ b/src/mailslurp/Model/EmailVerificationResult.cs @@ -0,0 +1,208 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email verification result. Valid means email address exists according to response from mail server running at the domain and port given. + /// + [DataContract(Name = "EmailVerificationResult")] + public partial class EmailVerificationResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailVerificationResult() { } + /// + /// Initializes a new instance of the class. + /// + /// domainName (required). + /// port (required). + /// emailAddress (required). + /// isValid (required). + /// error. + public EmailVerificationResult(string domainName = default(string), int port = default(int), string emailAddress = default(string), bool isValid = default(bool), string error = default(string)) + { + // to ensure "domainName" is required (not null) + if (domainName == null) + { + throw new ArgumentNullException("domainName is a required property for EmailVerificationResult and cannot be null"); + } + this.DomainName = domainName; + this.Port = port; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for EmailVerificationResult and cannot be null"); + } + this.EmailAddress = emailAddress; + this.IsValid = isValid; + this.Error = error; + } + + /// + /// Gets or Sets DomainName + /// + [DataMember(Name = "domainName", IsRequired = true, EmitDefaultValue = true)] + public string DomainName { get; set; } + + /// + /// Gets or Sets Port + /// + [DataMember(Name = "port", IsRequired = true, EmitDefaultValue = true)] + public int Port { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets IsValid + /// + [DataMember(Name = "isValid", IsRequired = true, EmitDefaultValue = true)] + public bool IsValid { get; set; } + + /// + /// Gets or Sets Error + /// + [DataMember(Name = "error", EmitDefaultValue = true)] + public string Error { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmailVerificationResult {\n"); + sb.Append(" DomainName: ").Append(DomainName).Append("\n"); + sb.Append(" Port: ").Append(Port).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" IsValid: ").Append(IsValid).Append("\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailVerificationResult); + } + + /// + /// Returns true if EmailVerificationResult instances are equal + /// + /// Instance of EmailVerificationResult to be compared + /// Boolean + public bool Equals(EmailVerificationResult input) + { + if (input == null) + { + return false; + } + return + ( + this.DomainName == input.DomainName || + (this.DomainName != null && + this.DomainName.Equals(input.DomainName)) + ) && + ( + this.Port == input.Port || + this.Port.Equals(input.Port) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.IsValid == input.IsValid || + this.IsValid.Equals(input.IsValid) + ) && + ( + this.Error == input.Error || + (this.Error != null && + this.Error.Equals(input.Error)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.DomainName != null) + { + hashCode = (hashCode * 59) + this.DomainName.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Port.GetHashCode(); + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsValid.GetHashCode(); + if (this.Error != null) + { + hashCode = (hashCode * 59) + this.Error.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmergencyAddress.cs b/src/mailslurp/Model/EmergencyAddress.cs new file mode 100644 index 00000000..7395e42b --- /dev/null +++ b/src/mailslurp/Model/EmergencyAddress.cs @@ -0,0 +1,406 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// EmergencyAddress + /// + [DataContract(Name = "EmergencyAddress")] + public partial class EmergencyAddress : IEquatable, IValidatableObject + { + /// + /// Defines PhoneCountry + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PhoneCountryEnum + { + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 1, + + /// + /// Enum GB for value: GB + /// + [EnumMember(Value = "GB")] + GB = 2 + + } + + + /// + /// Gets or Sets PhoneCountry + /// + [DataMember(Name = "phoneCountry", IsRequired = true, EmitDefaultValue = true)] + public PhoneCountryEnum PhoneCountry { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmergencyAddress() { } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// sid (required). + /// userId (required). + /// displayName (required). + /// customerName (required). + /// address1 (required). + /// city (required). + /// region (required). + /// postalCode (required). + /// phoneCountry (required). + /// accountSid (required). + /// createdAt (required). + /// updatedAt (required). + public EmergencyAddress(Guid id = default(Guid), string sid = default(string), Guid userId = default(Guid), string displayName = default(string), string customerName = default(string), string address1 = default(string), string city = default(string), string region = default(string), string postalCode = default(string), PhoneCountryEnum phoneCountry = default(PhoneCountryEnum), string accountSid = default(string), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + // to ensure "sid" is required (not null) + if (sid == null) + { + throw new ArgumentNullException("sid is a required property for EmergencyAddress and cannot be null"); + } + this.Sid = sid; + this.UserId = userId; + // to ensure "displayName" is required (not null) + if (displayName == null) + { + throw new ArgumentNullException("displayName is a required property for EmergencyAddress and cannot be null"); + } + this.DisplayName = displayName; + // to ensure "customerName" is required (not null) + if (customerName == null) + { + throw new ArgumentNullException("customerName is a required property for EmergencyAddress and cannot be null"); + } + this.CustomerName = customerName; + // to ensure "address1" is required (not null) + if (address1 == null) + { + throw new ArgumentNullException("address1 is a required property for EmergencyAddress and cannot be null"); + } + this.Address1 = address1; + // to ensure "city" is required (not null) + if (city == null) + { + throw new ArgumentNullException("city is a required property for EmergencyAddress and cannot be null"); + } + this.City = city; + // to ensure "region" is required (not null) + if (region == null) + { + throw new ArgumentNullException("region is a required property for EmergencyAddress and cannot be null"); + } + this.Region = region; + // to ensure "postalCode" is required (not null) + if (postalCode == null) + { + throw new ArgumentNullException("postalCode is a required property for EmergencyAddress and cannot be null"); + } + this.PostalCode = postalCode; + this.PhoneCountry = phoneCountry; + // to ensure "accountSid" is required (not null) + if (accountSid == null) + { + throw new ArgumentNullException("accountSid is a required property for EmergencyAddress and cannot be null"); + } + this.AccountSid = accountSid; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Id = id; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Sid + /// + [DataMember(Name = "sid", IsRequired = true, EmitDefaultValue = true)] + public string Sid { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets DisplayName + /// + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] + public string DisplayName { get; set; } + + /// + /// Gets or Sets CustomerName + /// + [DataMember(Name = "customerName", IsRequired = true, EmitDefaultValue = true)] + public string CustomerName { get; set; } + + /// + /// Gets or Sets Address1 + /// + [DataMember(Name = "address1", IsRequired = true, EmitDefaultValue = true)] + public string Address1 { get; set; } + + /// + /// Gets or Sets City + /// + [DataMember(Name = "city", IsRequired = true, EmitDefaultValue = true)] + public string City { get; set; } + + /// + /// Gets or Sets Region + /// + [DataMember(Name = "region", IsRequired = true, EmitDefaultValue = true)] + public string Region { get; set; } + + /// + /// Gets or Sets PostalCode + /// + [DataMember(Name = "postalCode", IsRequired = true, EmitDefaultValue = true)] + public string PostalCode { get; set; } + + /// + /// Gets or Sets AccountSid + /// + [DataMember(Name = "accountSid", IsRequired = true, EmitDefaultValue = true)] + public string AccountSid { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmergencyAddress {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Sid: ").Append(Sid).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" CustomerName: ").Append(CustomerName).Append("\n"); + sb.Append(" Address1: ").Append(Address1).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Region: ").Append(Region).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" PhoneCountry: ").Append(PhoneCountry).Append("\n"); + sb.Append(" AccountSid: ").Append(AccountSid).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmergencyAddress); + } + + /// + /// Returns true if EmergencyAddress instances are equal + /// + /// Instance of EmergencyAddress to be compared + /// Boolean + public bool Equals(EmergencyAddress input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Sid == input.Sid || + (this.Sid != null && + this.Sid.Equals(input.Sid)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.DisplayName == input.DisplayName || + (this.DisplayName != null && + this.DisplayName.Equals(input.DisplayName)) + ) && + ( + this.CustomerName == input.CustomerName || + (this.CustomerName != null && + this.CustomerName.Equals(input.CustomerName)) + ) && + ( + this.Address1 == input.Address1 || + (this.Address1 != null && + this.Address1.Equals(input.Address1)) + ) && + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && + ( + this.Region == input.Region || + (this.Region != null && + this.Region.Equals(input.Region)) + ) && + ( + this.PostalCode == input.PostalCode || + (this.PostalCode != null && + this.PostalCode.Equals(input.PostalCode)) + ) && + ( + this.PhoneCountry == input.PhoneCountry || + this.PhoneCountry.Equals(input.PhoneCountry) + ) && + ( + this.AccountSid == input.AccountSid || + (this.AccountSid != null && + this.AccountSid.Equals(input.AccountSid)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Sid != null) + { + hashCode = (hashCode * 59) + this.Sid.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.DisplayName != null) + { + hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); + } + if (this.CustomerName != null) + { + hashCode = (hashCode * 59) + this.CustomerName.GetHashCode(); + } + if (this.Address1 != null) + { + hashCode = (hashCode * 59) + this.Address1.GetHashCode(); + } + if (this.City != null) + { + hashCode = (hashCode * 59) + this.City.GetHashCode(); + } + if (this.Region != null) + { + hashCode = (hashCode * 59) + this.Region.GetHashCode(); + } + if (this.PostalCode != null) + { + hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PhoneCountry.GetHashCode(); + if (this.AccountSid != null) + { + hashCode = (hashCode * 59) + this.AccountSid.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmergencyAddressDto.cs b/src/mailslurp/Model/EmergencyAddressDto.cs new file mode 100644 index 00000000..6f1e3c83 --- /dev/null +++ b/src/mailslurp/Model/EmergencyAddressDto.cs @@ -0,0 +1,191 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// EmergencyAddressDto + /// + [DataContract(Name = "EmergencyAddressDto")] + public partial class EmergencyAddressDto : IEquatable, IValidatableObject + { + /// + /// Defines PhoneCountry + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PhoneCountryEnum + { + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 1, + + /// + /// Enum GB for value: GB + /// + [EnumMember(Value = "GB")] + GB = 2 + + } + + + /// + /// Gets or Sets PhoneCountry + /// + [DataMember(Name = "phoneCountry", IsRequired = true, EmitDefaultValue = true)] + public PhoneCountryEnum PhoneCountry { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmergencyAddressDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// address1 (required). + /// phoneCountry (required). + public EmergencyAddressDto(Guid id = default(Guid), string address1 = default(string), PhoneCountryEnum phoneCountry = default(PhoneCountryEnum)) + { + this.Id = id; + // to ensure "address1" is required (not null) + if (address1 == null) + { + throw new ArgumentNullException("address1 is a required property for EmergencyAddressDto and cannot be null"); + } + this.Address1 = address1; + this.PhoneCountry = phoneCountry; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Address1 + /// + [DataMember(Name = "address1", IsRequired = true, EmitDefaultValue = true)] + public string Address1 { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmergencyAddressDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Address1: ").Append(Address1).Append("\n"); + sb.Append(" PhoneCountry: ").Append(PhoneCountry).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmergencyAddressDto); + } + + /// + /// Returns true if EmergencyAddressDto instances are equal + /// + /// Instance of EmergencyAddressDto to be compared + /// Boolean + public bool Equals(EmergencyAddressDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Address1 == input.Address1 || + (this.Address1 != null && + this.Address1.Equals(input.Address1)) + ) && + ( + this.PhoneCountry == input.PhoneCountry || + this.PhoneCountry.Equals(input.PhoneCountry) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Address1 != null) + { + hashCode = (hashCode * 59) + this.Address1.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PhoneCountry.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/EmptyResponseDto.cs b/src/mailslurp/Model/EmptyResponseDto.cs new file mode 100644 index 00000000..c152d015 --- /dev/null +++ b/src/mailslurp/Model/EmptyResponseDto.cs @@ -0,0 +1,129 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// EmptyResponseDto + /// + [DataContract(Name = "EmptyResponseDto")] + public partial class EmptyResponseDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// message. + public EmptyResponseDto(string message = default(string)) + { + this.Message = message; + } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EmptyResponseDto {\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmptyResponseDto); + } + + /// + /// Returns true if EmptyResponseDto instances are equal + /// + /// Instance of EmptyResponseDto to be compared + /// Boolean + public bool Equals(EmptyResponseDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ExpirationDefaults.cs b/src/mailslurp/Model/ExpirationDefaults.cs new file mode 100644 index 00000000..7a3495a1 --- /dev/null +++ b/src/mailslurp/Model/ExpirationDefaults.cs @@ -0,0 +1,198 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Expiration defaults for your account + /// + [DataContract(Name = "ExpirationDefaults")] + public partial class ExpirationDefaults : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExpirationDefaults() { } + /// + /// Initializes a new instance of the class. + /// + /// defaultExpirationMillis. + /// maxExpirationMillis. + /// defaultExpiresAt. + /// canPermanentInbox (required). + /// nextInboxAllowsPermanent (required). + public ExpirationDefaults(long? defaultExpirationMillis = default(long?), long? maxExpirationMillis = default(long?), DateTime? defaultExpiresAt = default(DateTime?), bool canPermanentInbox = default(bool), bool nextInboxAllowsPermanent = default(bool)) + { + this.CanPermanentInbox = canPermanentInbox; + this.NextInboxAllowsPermanent = nextInboxAllowsPermanent; + this.DefaultExpirationMillis = defaultExpirationMillis; + this.MaxExpirationMillis = maxExpirationMillis; + this.DefaultExpiresAt = defaultExpiresAt; + } + + /// + /// Gets or Sets DefaultExpirationMillis + /// + [DataMember(Name = "defaultExpirationMillis", EmitDefaultValue = true)] + public long? DefaultExpirationMillis { get; set; } + + /// + /// Gets or Sets MaxExpirationMillis + /// + [DataMember(Name = "maxExpirationMillis", EmitDefaultValue = true)] + public long? MaxExpirationMillis { get; set; } + + /// + /// Gets or Sets DefaultExpiresAt + /// + [DataMember(Name = "defaultExpiresAt", EmitDefaultValue = true)] + public DateTime? DefaultExpiresAt { get; set; } + + /// + /// Gets or Sets CanPermanentInbox + /// + [DataMember(Name = "canPermanentInbox", IsRequired = true, EmitDefaultValue = true)] + public bool CanPermanentInbox { get; set; } + + /// + /// Gets or Sets NextInboxAllowsPermanent + /// + [DataMember(Name = "nextInboxAllowsPermanent", IsRequired = true, EmitDefaultValue = true)] + public bool NextInboxAllowsPermanent { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExpirationDefaults {\n"); + sb.Append(" DefaultExpirationMillis: ").Append(DefaultExpirationMillis).Append("\n"); + sb.Append(" MaxExpirationMillis: ").Append(MaxExpirationMillis).Append("\n"); + sb.Append(" DefaultExpiresAt: ").Append(DefaultExpiresAt).Append("\n"); + sb.Append(" CanPermanentInbox: ").Append(CanPermanentInbox).Append("\n"); + sb.Append(" NextInboxAllowsPermanent: ").Append(NextInboxAllowsPermanent).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExpirationDefaults); + } + + /// + /// Returns true if ExpirationDefaults instances are equal + /// + /// Instance of ExpirationDefaults to be compared + /// Boolean + public bool Equals(ExpirationDefaults input) + { + if (input == null) + { + return false; + } + return + ( + this.DefaultExpirationMillis == input.DefaultExpirationMillis || + (this.DefaultExpirationMillis != null && + this.DefaultExpirationMillis.Equals(input.DefaultExpirationMillis)) + ) && + ( + this.MaxExpirationMillis == input.MaxExpirationMillis || + (this.MaxExpirationMillis != null && + this.MaxExpirationMillis.Equals(input.MaxExpirationMillis)) + ) && + ( + this.DefaultExpiresAt == input.DefaultExpiresAt || + (this.DefaultExpiresAt != null && + this.DefaultExpiresAt.Equals(input.DefaultExpiresAt)) + ) && + ( + this.CanPermanentInbox == input.CanPermanentInbox || + this.CanPermanentInbox.Equals(input.CanPermanentInbox) + ) && + ( + this.NextInboxAllowsPermanent == input.NextInboxAllowsPermanent || + this.NextInboxAllowsPermanent.Equals(input.NextInboxAllowsPermanent) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.DefaultExpirationMillis != null) + { + hashCode = (hashCode * 59) + this.DefaultExpirationMillis.GetHashCode(); + } + if (this.MaxExpirationMillis != null) + { + hashCode = (hashCode * 59) + this.MaxExpirationMillis.GetHashCode(); + } + if (this.DefaultExpiresAt != null) + { + hashCode = (hashCode * 59) + this.DefaultExpiresAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.CanPermanentInbox.GetHashCode(); + hashCode = (hashCode * 59) + this.NextInboxAllowsPermanent.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ExpiredInboxDto.cs b/src/mailslurp/Model/ExpiredInboxDto.cs new file mode 100644 index 00000000..612ba9dd --- /dev/null +++ b/src/mailslurp/Model/ExpiredInboxDto.cs @@ -0,0 +1,175 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Expired inbox + /// + [DataContract(Name = "ExpiredInboxDto")] + public partial class ExpiredInboxDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExpiredInboxDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// inboxId (required). + /// emailAddress (required). + public ExpiredInboxDto(Guid id = default(Guid), Guid inboxId = default(Guid), string emailAddress = default(string)) + { + this.Id = id; + this.InboxId = inboxId; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for ExpiredInboxDto and cannot be null"); + } + this.EmailAddress = emailAddress; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExpiredInboxDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExpiredInboxDto); + } + + /// + /// Returns true if ExpiredInboxDto instances are equal + /// + /// Instance of ExpiredInboxDto to be compared + /// Boolean + public bool Equals(ExpiredInboxDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ExpiredInboxRecordProjection.cs b/src/mailslurp/Model/ExpiredInboxRecordProjection.cs new file mode 100644 index 00000000..640fa09f --- /dev/null +++ b/src/mailslurp/Model/ExpiredInboxRecordProjection.cs @@ -0,0 +1,193 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Record of inbox expiration + /// + [DataContract(Name = "ExpiredInboxRecordProjection")] + public partial class ExpiredInboxRecordProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExpiredInboxRecordProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// emailAddress (required). + /// createdAt (required). + public ExpiredInboxRecordProjection(Guid id = default(Guid), Guid userId = default(Guid), string emailAddress = default(string), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for ExpiredInboxRecordProjection and cannot be null"); + } + this.EmailAddress = emailAddress; + this.CreatedAt = createdAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExpiredInboxRecordProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExpiredInboxRecordProjection); + } + + /// + /// Returns true if ExpiredInboxRecordProjection instances are equal + /// + /// Instance of ExpiredInboxRecordProjection to be compared + /// Boolean + public bool Equals(ExpiredInboxRecordProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ExportLink.cs b/src/mailslurp/Model/ExportLink.cs new file mode 100644 index 00000000..7a1858e0 --- /dev/null +++ b/src/mailslurp/Model/ExportLink.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Export download link + /// + [DataContract(Name = "ExportLink")] + public partial class ExportLink : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExportLink() { } + /// + /// Initializes a new instance of the class. + /// + /// downloadLink (required). + public ExportLink(string downloadLink = default(string)) + { + // to ensure "downloadLink" is required (not null) + if (downloadLink == null) + { + throw new ArgumentNullException("downloadLink is a required property for ExportLink and cannot be null"); + } + this.DownloadLink = downloadLink; + } + + /// + /// Gets or Sets DownloadLink + /// + [DataMember(Name = "downloadLink", IsRequired = true, EmitDefaultValue = true)] + public string DownloadLink { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExportLink {\n"); + sb.Append(" DownloadLink: ").Append(DownloadLink).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExportLink); + } + + /// + /// Returns true if ExportLink instances are equal + /// + /// Instance of ExportLink to be compared + /// Boolean + public bool Equals(ExportLink input) + { + if (input == null) + { + return false; + } + return + ( + this.DownloadLink == input.DownloadLink || + (this.DownloadLink != null && + this.DownloadLink.Equals(input.DownloadLink)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.DownloadLink != null) + { + hashCode = (hashCode * 59) + this.DownloadLink.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ExportOptions.cs b/src/mailslurp/Model/ExportOptions.cs new file mode 100644 index 00000000..5c21c82f --- /dev/null +++ b/src/mailslurp/Model/ExportOptions.cs @@ -0,0 +1,240 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for exporting user data + /// + [DataContract(Name = "ExportOptions")] + public partial class ExportOptions : IEquatable, IValidatableObject + { + /// + /// Defines OutputFormat + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OutputFormatEnum + { + /// + /// Enum DEFAULT for value: CSV_DEFAULT + /// + [EnumMember(Value = "CSV_DEFAULT")] + DEFAULT = 1, + + /// + /// Enum EXCEL for value: CSV_EXCEL + /// + [EnumMember(Value = "CSV_EXCEL")] + EXCEL = 2 + + } + + + /// + /// Gets or Sets OutputFormat + /// + [DataMember(Name = "outputFormat", IsRequired = true, EmitDefaultValue = true)] + public OutputFormatEnum OutputFormat { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExportOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// outputFormat (required). + /// excludePreviouslyExported. + /// createdEarliestTime. + /// createdOldestTime. + /// filter. + /// listSeparatorToken. + public ExportOptions(OutputFormatEnum outputFormat = default(OutputFormatEnum), bool? excludePreviouslyExported = default(bool?), DateTime? createdEarliestTime = default(DateTime?), DateTime? createdOldestTime = default(DateTime?), string filter = default(string), string listSeparatorToken = default(string)) + { + this.OutputFormat = outputFormat; + this.ExcludePreviouslyExported = excludePreviouslyExported; + this.CreatedEarliestTime = createdEarliestTime; + this.CreatedOldestTime = createdOldestTime; + this.Filter = filter; + this.ListSeparatorToken = listSeparatorToken; + } + + /// + /// Gets or Sets ExcludePreviouslyExported + /// + [DataMember(Name = "excludePreviouslyExported", EmitDefaultValue = true)] + public bool? ExcludePreviouslyExported { get; set; } + + /// + /// Gets or Sets CreatedEarliestTime + /// + [DataMember(Name = "createdEarliestTime", EmitDefaultValue = true)] + public DateTime? CreatedEarliestTime { get; set; } + + /// + /// Gets or Sets CreatedOldestTime + /// + [DataMember(Name = "createdOldestTime", EmitDefaultValue = true)] + public DateTime? CreatedOldestTime { get; set; } + + /// + /// Gets or Sets Filter + /// + [DataMember(Name = "filter", EmitDefaultValue = true)] + public string Filter { get; set; } + + /// + /// Gets or Sets ListSeparatorToken + /// + [DataMember(Name = "listSeparatorToken", EmitDefaultValue = true)] + public string ListSeparatorToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExportOptions {\n"); + sb.Append(" OutputFormat: ").Append(OutputFormat).Append("\n"); + sb.Append(" ExcludePreviouslyExported: ").Append(ExcludePreviouslyExported).Append("\n"); + sb.Append(" CreatedEarliestTime: ").Append(CreatedEarliestTime).Append("\n"); + sb.Append(" CreatedOldestTime: ").Append(CreatedOldestTime).Append("\n"); + sb.Append(" Filter: ").Append(Filter).Append("\n"); + sb.Append(" ListSeparatorToken: ").Append(ListSeparatorToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExportOptions); + } + + /// + /// Returns true if ExportOptions instances are equal + /// + /// Instance of ExportOptions to be compared + /// Boolean + public bool Equals(ExportOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.OutputFormat == input.OutputFormat || + this.OutputFormat.Equals(input.OutputFormat) + ) && + ( + this.ExcludePreviouslyExported == input.ExcludePreviouslyExported || + (this.ExcludePreviouslyExported != null && + this.ExcludePreviouslyExported.Equals(input.ExcludePreviouslyExported)) + ) && + ( + this.CreatedEarliestTime == input.CreatedEarliestTime || + (this.CreatedEarliestTime != null && + this.CreatedEarliestTime.Equals(input.CreatedEarliestTime)) + ) && + ( + this.CreatedOldestTime == input.CreatedOldestTime || + (this.CreatedOldestTime != null && + this.CreatedOldestTime.Equals(input.CreatedOldestTime)) + ) && + ( + this.Filter == input.Filter || + (this.Filter != null && + this.Filter.Equals(input.Filter)) + ) && + ( + this.ListSeparatorToken == input.ListSeparatorToken || + (this.ListSeparatorToken != null && + this.ListSeparatorToken.Equals(input.ListSeparatorToken)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.OutputFormat.GetHashCode(); + if (this.ExcludePreviouslyExported != null) + { + hashCode = (hashCode * 59) + this.ExcludePreviouslyExported.GetHashCode(); + } + if (this.CreatedEarliestTime != null) + { + hashCode = (hashCode * 59) + this.CreatedEarliestTime.GetHashCode(); + } + if (this.CreatedOldestTime != null) + { + hashCode = (hashCode * 59) + this.CreatedOldestTime.GetHashCode(); + } + if (this.Filter != null) + { + hashCode = (hashCode * 59) + this.Filter.GetHashCode(); + } + if (this.ListSeparatorToken != null) + { + hashCode = (hashCode * 59) + this.ListSeparatorToken.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/FilterBouncedRecipientsOptions.cs b/src/mailslurp/Model/FilterBouncedRecipientsOptions.cs new file mode 100644 index 00000000..d05e7482 --- /dev/null +++ b/src/mailslurp/Model/FilterBouncedRecipientsOptions.cs @@ -0,0 +1,140 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for filtering bounced email recipients + /// + [DataContract(Name = "FilterBouncedRecipientsOptions")] + public partial class FilterBouncedRecipientsOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FilterBouncedRecipientsOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// emailRecipients (required). + public FilterBouncedRecipientsOptions(List emailRecipients = default(List)) + { + // to ensure "emailRecipients" is required (not null) + if (emailRecipients == null) + { + throw new ArgumentNullException("emailRecipients is a required property for FilterBouncedRecipientsOptions and cannot be null"); + } + this.EmailRecipients = emailRecipients; + } + + /// + /// Gets or Sets EmailRecipients + /// + [DataMember(Name = "emailRecipients", IsRequired = true, EmitDefaultValue = true)] + public List EmailRecipients { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FilterBouncedRecipientsOptions {\n"); + sb.Append(" EmailRecipients: ").Append(EmailRecipients).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FilterBouncedRecipientsOptions); + } + + /// + /// Returns true if FilterBouncedRecipientsOptions instances are equal + /// + /// Instance of FilterBouncedRecipientsOptions to be compared + /// Boolean + public bool Equals(FilterBouncedRecipientsOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.EmailRecipients == input.EmailRecipients || + this.EmailRecipients != null && + input.EmailRecipients != null && + this.EmailRecipients.SequenceEqual(input.EmailRecipients) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailRecipients != null) + { + hashCode = (hashCode * 59) + this.EmailRecipients.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/FilterBouncedRecipientsResult.cs b/src/mailslurp/Model/FilterBouncedRecipientsResult.cs new file mode 100644 index 00000000..c59d2431 --- /dev/null +++ b/src/mailslurp/Model/FilterBouncedRecipientsResult.cs @@ -0,0 +1,140 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Remaining recipients that were filtered to remove bounced recipients + /// + [DataContract(Name = "FilterBouncedRecipientsResult")] + public partial class FilterBouncedRecipientsResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FilterBouncedRecipientsResult() { } + /// + /// Initializes a new instance of the class. + /// + /// filteredRecipients (required). + public FilterBouncedRecipientsResult(List filteredRecipients = default(List)) + { + // to ensure "filteredRecipients" is required (not null) + if (filteredRecipients == null) + { + throw new ArgumentNullException("filteredRecipients is a required property for FilterBouncedRecipientsResult and cannot be null"); + } + this.FilteredRecipients = filteredRecipients; + } + + /// + /// Gets or Sets FilteredRecipients + /// + [DataMember(Name = "filteredRecipients", IsRequired = true, EmitDefaultValue = true)] + public List FilteredRecipients { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FilterBouncedRecipientsResult {\n"); + sb.Append(" FilteredRecipients: ").Append(FilteredRecipients).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FilterBouncedRecipientsResult); + } + + /// + /// Returns true if FilterBouncedRecipientsResult instances are equal + /// + /// Instance of FilterBouncedRecipientsResult to be compared + /// Boolean + public bool Equals(FilterBouncedRecipientsResult input) + { + if (input == null) + { + return false; + } + return + ( + this.FilteredRecipients == input.FilteredRecipients || + this.FilteredRecipients != null && + input.FilteredRecipients != null && + this.FilteredRecipients.SequenceEqual(input.FilteredRecipients) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FilteredRecipients != null) + { + hashCode = (hashCode * 59) + this.FilteredRecipients.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/FlushExpiredInboxesResult.cs b/src/mailslurp/Model/FlushExpiredInboxesResult.cs new file mode 100644 index 00000000..00a96832 --- /dev/null +++ b/src/mailslurp/Model/FlushExpiredInboxesResult.cs @@ -0,0 +1,160 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result from calling expire on any inboxes that have applicable expiration dates given current time. + /// + [DataContract(Name = "FlushExpiredInboxesResult")] + public partial class FlushExpiredInboxesResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FlushExpiredInboxesResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Inbox IDs affected by expiration (required). + /// DateTime to filter inboxes so that those expiring before this time are expired (required). + public FlushExpiredInboxesResult(List inboxIds = default(List), DateTime expireBefore = default(DateTime)) + { + // to ensure "inboxIds" is required (not null) + if (inboxIds == null) + { + throw new ArgumentNullException("inboxIds is a required property for FlushExpiredInboxesResult and cannot be null"); + } + this.InboxIds = inboxIds; + this.ExpireBefore = expireBefore; + } + + /// + /// Inbox IDs affected by expiration + /// + /// Inbox IDs affected by expiration + [DataMember(Name = "inboxIds", IsRequired = true, EmitDefaultValue = true)] + public List InboxIds { get; set; } + + /// + /// DateTime to filter inboxes so that those expiring before this time are expired + /// + /// DateTime to filter inboxes so that those expiring before this time are expired + [DataMember(Name = "expireBefore", IsRequired = true, EmitDefaultValue = true)] + public DateTime ExpireBefore { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FlushExpiredInboxesResult {\n"); + sb.Append(" InboxIds: ").Append(InboxIds).Append("\n"); + sb.Append(" ExpireBefore: ").Append(ExpireBefore).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FlushExpiredInboxesResult); + } + + /// + /// Returns true if FlushExpiredInboxesResult instances are equal + /// + /// Instance of FlushExpiredInboxesResult to be compared + /// Boolean + public bool Equals(FlushExpiredInboxesResult input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxIds == input.InboxIds || + this.InboxIds != null && + input.InboxIds != null && + this.InboxIds.SequenceEqual(input.InboxIds) + ) && + ( + this.ExpireBefore == input.ExpireBefore || + (this.ExpireBefore != null && + this.ExpireBefore.Equals(input.ExpireBefore)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxIds != null) + { + hashCode = (hashCode * 59) + this.InboxIds.GetHashCode(); + } + if (this.ExpireBefore != null) + { + hashCode = (hashCode * 59) + this.ExpireBefore.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ForwardEmailOptions.cs b/src/mailslurp/Model/ForwardEmailOptions.cs new file mode 100644 index 00000000..593671fb --- /dev/null +++ b/src/mailslurp/Model/ForwardEmailOptions.cs @@ -0,0 +1,257 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for forwarding an email + /// + [DataContract(Name = "ForwardEmailOptions")] + public partial class ForwardEmailOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ForwardEmailOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// To recipients for forwarded email (required). + /// Subject for forwarded email. + /// Optional cc recipients. + /// Optional bcc recipients. + /// Optional from override. + /// Optionally use inbox name as display name for sender email address. + /// Filter recipients to remove any bounced recipients from to, bcc, and cc before sending. + public ForwardEmailOptions(List to = default(List), string subject = default(string), List cc = default(List), List bcc = default(List), string from = default(string), bool? useInboxName = default(bool?), bool? filterBouncedRecipients = default(bool?)) + { + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for ForwardEmailOptions and cannot be null"); + } + this.To = to; + this.Subject = subject; + this.Cc = cc; + this.Bcc = bcc; + this.From = from; + this.UseInboxName = useInboxName; + this.FilterBouncedRecipients = filterBouncedRecipients; + } + + /// + /// To recipients for forwarded email + /// + /// To recipients for forwarded email + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Subject for forwarded email + /// + /// Subject for forwarded email + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Optional cc recipients + /// + /// Optional cc recipients + [DataMember(Name = "cc", EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// Optional bcc recipients + /// + /// Optional bcc recipients + [DataMember(Name = "bcc", EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// Optional from override + /// + /// Optional from override + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Optionally use inbox name as display name for sender email address + /// + /// Optionally use inbox name as display name for sender email address + [DataMember(Name = "useInboxName", EmitDefaultValue = true)] + public bool? UseInboxName { get; set; } + + /// + /// Filter recipients to remove any bounced recipients from to, bcc, and cc before sending + /// + /// Filter recipients to remove any bounced recipients from to, bcc, and cc before sending + [DataMember(Name = "filterBouncedRecipients", EmitDefaultValue = true)] + public bool? FilterBouncedRecipients { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ForwardEmailOptions {\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" UseInboxName: ").Append(UseInboxName).Append("\n"); + sb.Append(" FilterBouncedRecipients: ").Append(FilterBouncedRecipients).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ForwardEmailOptions); + } + + /// + /// Returns true if ForwardEmailOptions instances are equal + /// + /// Instance of ForwardEmailOptions to be compared + /// Boolean + public bool Equals(ForwardEmailOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.UseInboxName == input.UseInboxName || + (this.UseInboxName != null && + this.UseInboxName.Equals(input.UseInboxName)) + ) && + ( + this.FilterBouncedRecipients == input.FilterBouncedRecipients || + (this.FilterBouncedRecipients != null && + this.FilterBouncedRecipients.Equals(input.FilterBouncedRecipients)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.UseInboxName != null) + { + hashCode = (hashCode * 59) + this.UseInboxName.GetHashCode(); + } + if (this.FilterBouncedRecipients != null) + { + hashCode = (hashCode * 59) + this.FilterBouncedRecipients.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/GravatarUrl.cs b/src/mailslurp/Model/GravatarUrl.cs new file mode 100644 index 00000000..61b4b33b --- /dev/null +++ b/src/mailslurp/Model/GravatarUrl.cs @@ -0,0 +1,162 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// User image + /// + [DataContract(Name = "GravatarUrl")] + public partial class GravatarUrl : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GravatarUrl() { } + /// + /// Initializes a new instance of the class. + /// + /// url (required). + /// hash (required). + public GravatarUrl(string url = default(string), string hash = default(string)) + { + // to ensure "url" is required (not null) + if (url == null) + { + throw new ArgumentNullException("url is a required property for GravatarUrl and cannot be null"); + } + this.Url = url; + // to ensure "hash" is required (not null) + if (hash == null) + { + throw new ArgumentNullException("hash is a required property for GravatarUrl and cannot be null"); + } + this.Hash = hash; + } + + /// + /// Gets or Sets Url + /// + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + public string Url { get; set; } + + /// + /// Gets or Sets Hash + /// + [DataMember(Name = "hash", IsRequired = true, EmitDefaultValue = true)] + public string Hash { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GravatarUrl {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Hash: ").Append(Hash).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GravatarUrl); + } + + /// + /// Returns true if GravatarUrl instances are equal + /// + /// Instance of GravatarUrl to be compared + /// Boolean + public bool Equals(GravatarUrl input) + { + if (input == null) + { + return false; + } + return + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.Hash == input.Hash || + (this.Hash != null && + this.Hash.Equals(input.Hash)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Url != null) + { + hashCode = (hashCode * 59) + this.Url.GetHashCode(); + } + if (this.Hash != null) + { + hashCode = (hashCode * 59) + this.Hash.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/GroupContactsDto.cs b/src/mailslurp/Model/GroupContactsDto.cs new file mode 100644 index 00000000..cf09e778 --- /dev/null +++ b/src/mailslurp/Model/GroupContactsDto.cs @@ -0,0 +1,163 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Describes contacts attached to a contact group + /// + [DataContract(Name = "GroupContactsDto")] + public partial class GroupContactsDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GroupContactsDto() { } + /// + /// Initializes a new instance of the class. + /// + /// group (required). + /// contacts (required). + public GroupContactsDto(GroupDto group = default(GroupDto), List contacts = default(List)) + { + // to ensure "group" is required (not null) + if (group == null) + { + throw new ArgumentNullException("group is a required property for GroupContactsDto and cannot be null"); + } + this.Group = group; + // to ensure "contacts" is required (not null) + if (contacts == null) + { + throw new ArgumentNullException("contacts is a required property for GroupContactsDto and cannot be null"); + } + this.Contacts = contacts; + } + + /// + /// Gets or Sets Group + /// + [DataMember(Name = "group", IsRequired = true, EmitDefaultValue = true)] + public GroupDto Group { get; set; } + + /// + /// Gets or Sets Contacts + /// + [DataMember(Name = "contacts", IsRequired = true, EmitDefaultValue = true)] + public List Contacts { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GroupContactsDto {\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); + sb.Append(" Contacts: ").Append(Contacts).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupContactsDto); + } + + /// + /// Returns true if GroupContactsDto instances are equal + /// + /// Instance of GroupContactsDto to be compared + /// Boolean + public bool Equals(GroupContactsDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) + ) && + ( + this.Contacts == input.Contacts || + this.Contacts != null && + input.Contacts != null && + this.Contacts.SequenceEqual(input.Contacts) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } + if (this.Contacts != null) + { + hashCode = (hashCode * 59) + this.Contacts.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/GroupDto.cs b/src/mailslurp/Model/GroupDto.cs new file mode 100644 index 00000000..a638dfb4 --- /dev/null +++ b/src/mailslurp/Model/GroupDto.cs @@ -0,0 +1,193 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Contact group data + /// + [DataContract(Name = "GroupDto")] + public partial class GroupDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GroupDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// name (required). + /// description. + /// createdAt (required). + public GroupDto(Guid id = default(Guid), string name = default(string), string description = default(string), DateTime createdAt = default(DateTime)) + { + this.Id = id; + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for GroupDto and cannot be null"); + } + this.Name = name; + this.CreatedAt = createdAt; + this.Description = description; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GroupDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupDto); + } + + /// + /// Returns true if GroupDto instances are equal + /// + /// Instance of GroupDto to be compared + /// Boolean + public bool Equals(GroupDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/GroupProjection.cs b/src/mailslurp/Model/GroupProjection.cs new file mode 100644 index 00000000..b52f6c97 --- /dev/null +++ b/src/mailslurp/Model/GroupProjection.cs @@ -0,0 +1,193 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Data for contact group + /// + [DataContract(Name = "GroupProjection")] + public partial class GroupProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GroupProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// id (required). + /// description. + /// createdAt (required). + public GroupProjection(string name = default(string), Guid id = default(Guid), string description = default(string), DateTime createdAt = default(DateTime)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for GroupProjection and cannot be null"); + } + this.Name = name; + this.Id = id; + this.CreatedAt = createdAt; + this.Description = description; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GroupProjection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupProjection); + } + + /// + /// Returns true if GroupProjection instances are equal + /// + /// Instance of GroupProjection to be compared + /// Boolean + public bool Equals(GroupProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/HTMLValidationResult.cs b/src/mailslurp/Model/HTMLValidationResult.cs new file mode 100644 index 00000000..98d84830 --- /dev/null +++ b/src/mailslurp/Model/HTMLValidationResult.cs @@ -0,0 +1,181 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// HTML Validation Results + /// + [DataContract(Name = "HTMLValidationResult")] + public partial class HTMLValidationResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HTMLValidationResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Is HTML validation result valid (required). + /// Optional errors resulting from HTML validation (required). + /// Optional warnings resulting from HTML validation (required). + public HTMLValidationResult(bool isValid = default(bool), List errors = default(List), List warnings = default(List)) + { + this.IsValid = isValid; + // to ensure "errors" is required (not null) + if (errors == null) + { + throw new ArgumentNullException("errors is a required property for HTMLValidationResult and cannot be null"); + } + this.Errors = errors; + // to ensure "warnings" is required (not null) + if (warnings == null) + { + throw new ArgumentNullException("warnings is a required property for HTMLValidationResult and cannot be null"); + } + this.Warnings = warnings; + } + + /// + /// Is HTML validation result valid + /// + /// Is HTML validation result valid + [DataMember(Name = "isValid", IsRequired = true, EmitDefaultValue = true)] + public bool IsValid { get; set; } + + /// + /// Optional errors resulting from HTML validation + /// + /// Optional errors resulting from HTML validation + [DataMember(Name = "errors", IsRequired = true, EmitDefaultValue = true)] + public List Errors { get; set; } + + /// + /// Optional warnings resulting from HTML validation + /// + /// Optional warnings resulting from HTML validation + [DataMember(Name = "warnings", IsRequired = true, EmitDefaultValue = true)] + public List Warnings { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HTMLValidationResult {\n"); + sb.Append(" IsValid: ").Append(IsValid).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as HTMLValidationResult); + } + + /// + /// Returns true if HTMLValidationResult instances are equal + /// + /// Instance of HTMLValidationResult to be compared + /// Boolean + public bool Equals(HTMLValidationResult input) + { + if (input == null) + { + return false; + } + return + ( + this.IsValid == input.IsValid || + this.IsValid.Equals(input.IsValid) + ) && + ( + this.Errors == input.Errors || + this.Errors != null && + input.Errors != null && + this.Errors.SequenceEqual(input.Errors) + ) && + ( + this.Warnings == input.Warnings || + this.Warnings != null && + input.Warnings != null && + this.Warnings.SequenceEqual(input.Warnings) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.IsValid.GetHashCode(); + if (this.Errors != null) + { + hashCode = (hashCode * 59) + this.Errors.GetHashCode(); + } + if (this.Warnings != null) + { + hashCode = (hashCode * 59) + this.Warnings.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/IPAddressResult.cs b/src/mailslurp/Model/IPAddressResult.cs new file mode 100644 index 00000000..217d179f --- /dev/null +++ b/src/mailslurp/Model/IPAddressResult.cs @@ -0,0 +1,162 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// IP Address look up result for a given domain / hostname + /// + [DataContract(Name = "IPAddressResult")] + public partial class IPAddressResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected IPAddressResult() { } + /// + /// Initializes a new instance of the class. + /// + /// address (required). + /// hostname (required). + public IPAddressResult(string address = default(string), string hostname = default(string)) + { + // to ensure "address" is required (not null) + if (address == null) + { + throw new ArgumentNullException("address is a required property for IPAddressResult and cannot be null"); + } + this.Address = address; + // to ensure "hostname" is required (not null) + if (hostname == null) + { + throw new ArgumentNullException("hostname is a required property for IPAddressResult and cannot be null"); + } + this.Hostname = hostname; + } + + /// + /// Gets or Sets Address + /// + [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = true)] + public string Address { get; set; } + + /// + /// Gets or Sets Hostname + /// + [DataMember(Name = "hostname", IsRequired = true, EmitDefaultValue = true)] + public string Hostname { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IPAddressResult {\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" Hostname: ").Append(Hostname).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IPAddressResult); + } + + /// + /// Returns true if IPAddressResult instances are equal + /// + /// Instance of IPAddressResult to be compared + /// Boolean + public bool Equals(IPAddressResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Address == input.Address || + (this.Address != null && + this.Address.Equals(input.Address)) + ) && + ( + this.Hostname == input.Hostname || + (this.Hostname != null && + this.Hostname.Equals(input.Hostname)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Address != null) + { + hashCode = (hashCode * 59) + this.Address.GetHashCode(); + } + if (this.Hostname != null) + { + hashCode = (hashCode * 59) + this.Hostname.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ImapFlagOperationOptions.cs b/src/mailslurp/Model/ImapFlagOperationOptions.cs new file mode 100644 index 00000000..6f1c9245 --- /dev/null +++ b/src/mailslurp/Model/ImapFlagOperationOptions.cs @@ -0,0 +1,180 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// IMAP operation flags + /// + [DataContract(Name = "ImapFlagOperationOptions")] + public partial class ImapFlagOperationOptions : IEquatable, IValidatableObject + { + /// + /// Defines FlagOperation + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FlagOperationEnum + { + /// + /// Enum SETFLAGS for value: SET_FLAGS + /// + [EnumMember(Value = "SET_FLAGS")] + SETFLAGS = 1, + + /// + /// Enum ADDFLAGS for value: ADD_FLAGS + /// + [EnumMember(Value = "ADD_FLAGS")] + ADDFLAGS = 2, + + /// + /// Enum REMOVEFLAGS for value: REMOVE_FLAGS + /// + [EnumMember(Value = "REMOVE_FLAGS")] + REMOVEFLAGS = 3 + + } + + + /// + /// Gets or Sets FlagOperation + /// + [DataMember(Name = "flagOperation", IsRequired = true, EmitDefaultValue = true)] + public FlagOperationEnum FlagOperation { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ImapFlagOperationOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// flagOperation (required). + /// flags (required). + public ImapFlagOperationOptions(FlagOperationEnum flagOperation = default(FlagOperationEnum), List flags = default(List)) + { + this.FlagOperation = flagOperation; + // to ensure "flags" is required (not null) + if (flags == null) + { + throw new ArgumentNullException("flags is a required property for ImapFlagOperationOptions and cannot be null"); + } + this.Flags = flags; + } + + /// + /// Gets or Sets Flags + /// + [DataMember(Name = "flags", IsRequired = true, EmitDefaultValue = true)] + public List Flags { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ImapFlagOperationOptions {\n"); + sb.Append(" FlagOperation: ").Append(FlagOperation).Append("\n"); + sb.Append(" Flags: ").Append(Flags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ImapFlagOperationOptions); + } + + /// + /// Returns true if ImapFlagOperationOptions instances are equal + /// + /// Instance of ImapFlagOperationOptions to be compared + /// Boolean + public bool Equals(ImapFlagOperationOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.FlagOperation == input.FlagOperation || + this.FlagOperation.Equals(input.FlagOperation) + ) && + ( + this.Flags == input.Flags || + this.Flags != null && + input.Flags != null && + this.Flags.SequenceEqual(input.Flags) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.FlagOperation.GetHashCode(); + if (this.Flags != null) + { + hashCode = (hashCode * 59) + this.Flags.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ImapSmtpAccessDetails.cs b/src/mailslurp/Model/ImapSmtpAccessDetails.cs new file mode 100644 index 00000000..dd176943 --- /dev/null +++ b/src/mailslurp/Model/ImapSmtpAccessDetails.cs @@ -0,0 +1,377 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Access details for inbox using SMTP or IMAP + /// + [DataContract(Name = "ImapSmtpAccessDetails")] + public partial class ImapSmtpAccessDetails : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ImapSmtpAccessDetails() { } + /// + /// Initializes a new instance of the class. + /// + /// Secure TLS SMTP server host domain (required). + /// Secure TLS SMTP server host port (required). + /// Secure TLS SMTP username for login (required). + /// Secure TLS SMTP password for login (required). + /// SMTP server host domain (required). + /// SMTP server host port (required). + /// SMTP username for login (required). + /// SMTP password for login (required). + /// IMAP server host domain (required). + /// IMAP server host port (required). + /// IMAP username for login (required). + /// IMAP password for login (required). + public ImapSmtpAccessDetails(string secureSmtpServerHost = default(string), int secureSmtpServerPort = default(int), string secureSmtpUsername = default(string), string secureSmtpPassword = default(string), string smtpServerHost = default(string), int smtpServerPort = default(int), string smtpUsername = default(string), string smtpPassword = default(string), string imapServerHost = default(string), int imapServerPort = default(int), string imapUsername = default(string), string imapPassword = default(string)) + { + // to ensure "secureSmtpServerHost" is required (not null) + if (secureSmtpServerHost == null) + { + throw new ArgumentNullException("secureSmtpServerHost is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.SecureSmtpServerHost = secureSmtpServerHost; + this.SecureSmtpServerPort = secureSmtpServerPort; + // to ensure "secureSmtpUsername" is required (not null) + if (secureSmtpUsername == null) + { + throw new ArgumentNullException("secureSmtpUsername is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.SecureSmtpUsername = secureSmtpUsername; + // to ensure "secureSmtpPassword" is required (not null) + if (secureSmtpPassword == null) + { + throw new ArgumentNullException("secureSmtpPassword is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.SecureSmtpPassword = secureSmtpPassword; + // to ensure "smtpServerHost" is required (not null) + if (smtpServerHost == null) + { + throw new ArgumentNullException("smtpServerHost is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.SmtpServerHost = smtpServerHost; + this.SmtpServerPort = smtpServerPort; + // to ensure "smtpUsername" is required (not null) + if (smtpUsername == null) + { + throw new ArgumentNullException("smtpUsername is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.SmtpUsername = smtpUsername; + // to ensure "smtpPassword" is required (not null) + if (smtpPassword == null) + { + throw new ArgumentNullException("smtpPassword is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.SmtpPassword = smtpPassword; + // to ensure "imapServerHost" is required (not null) + if (imapServerHost == null) + { + throw new ArgumentNullException("imapServerHost is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.ImapServerHost = imapServerHost; + this.ImapServerPort = imapServerPort; + // to ensure "imapUsername" is required (not null) + if (imapUsername == null) + { + throw new ArgumentNullException("imapUsername is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.ImapUsername = imapUsername; + // to ensure "imapPassword" is required (not null) + if (imapPassword == null) + { + throw new ArgumentNullException("imapPassword is a required property for ImapSmtpAccessDetails and cannot be null"); + } + this.ImapPassword = imapPassword; + } + + /// + /// Secure TLS SMTP server host domain + /// + /// Secure TLS SMTP server host domain + [DataMember(Name = "secureSmtpServerHost", IsRequired = true, EmitDefaultValue = true)] + public string SecureSmtpServerHost { get; set; } + + /// + /// Secure TLS SMTP server host port + /// + /// Secure TLS SMTP server host port + [DataMember(Name = "secureSmtpServerPort", IsRequired = true, EmitDefaultValue = true)] + public int SecureSmtpServerPort { get; set; } + + /// + /// Secure TLS SMTP username for login + /// + /// Secure TLS SMTP username for login + [DataMember(Name = "secureSmtpUsername", IsRequired = true, EmitDefaultValue = true)] + public string SecureSmtpUsername { get; set; } + + /// + /// Secure TLS SMTP password for login + /// + /// Secure TLS SMTP password for login + [DataMember(Name = "secureSmtpPassword", IsRequired = true, EmitDefaultValue = true)] + public string SecureSmtpPassword { get; set; } + + /// + /// SMTP server host domain + /// + /// SMTP server host domain + [DataMember(Name = "smtpServerHost", IsRequired = true, EmitDefaultValue = true)] + public string SmtpServerHost { get; set; } + + /// + /// SMTP server host port + /// + /// SMTP server host port + [DataMember(Name = "smtpServerPort", IsRequired = true, EmitDefaultValue = true)] + public int SmtpServerPort { get; set; } + + /// + /// SMTP username for login + /// + /// SMTP username for login + [DataMember(Name = "smtpUsername", IsRequired = true, EmitDefaultValue = true)] + public string SmtpUsername { get; set; } + + /// + /// SMTP password for login + /// + /// SMTP password for login + [DataMember(Name = "smtpPassword", IsRequired = true, EmitDefaultValue = true)] + public string SmtpPassword { get; set; } + + /// + /// IMAP server host domain + /// + /// IMAP server host domain + [DataMember(Name = "imapServerHost", IsRequired = true, EmitDefaultValue = true)] + public string ImapServerHost { get; set; } + + /// + /// IMAP server host port + /// + /// IMAP server host port + [DataMember(Name = "imapServerPort", IsRequired = true, EmitDefaultValue = true)] + public int ImapServerPort { get; set; } + + /// + /// IMAP username for login + /// + /// IMAP username for login + [DataMember(Name = "imapUsername", IsRequired = true, EmitDefaultValue = true)] + public string ImapUsername { get; set; } + + /// + /// IMAP password for login + /// + /// IMAP password for login + [DataMember(Name = "imapPassword", IsRequired = true, EmitDefaultValue = true)] + public string ImapPassword { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ImapSmtpAccessDetails {\n"); + sb.Append(" SecureSmtpServerHost: ").Append(SecureSmtpServerHost).Append("\n"); + sb.Append(" SecureSmtpServerPort: ").Append(SecureSmtpServerPort).Append("\n"); + sb.Append(" SecureSmtpUsername: ").Append(SecureSmtpUsername).Append("\n"); + sb.Append(" SecureSmtpPassword: ").Append(SecureSmtpPassword).Append("\n"); + sb.Append(" SmtpServerHost: ").Append(SmtpServerHost).Append("\n"); + sb.Append(" SmtpServerPort: ").Append(SmtpServerPort).Append("\n"); + sb.Append(" SmtpUsername: ").Append(SmtpUsername).Append("\n"); + sb.Append(" SmtpPassword: ").Append(SmtpPassword).Append("\n"); + sb.Append(" ImapServerHost: ").Append(ImapServerHost).Append("\n"); + sb.Append(" ImapServerPort: ").Append(ImapServerPort).Append("\n"); + sb.Append(" ImapUsername: ").Append(ImapUsername).Append("\n"); + sb.Append(" ImapPassword: ").Append(ImapPassword).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ImapSmtpAccessDetails); + } + + /// + /// Returns true if ImapSmtpAccessDetails instances are equal + /// + /// Instance of ImapSmtpAccessDetails to be compared + /// Boolean + public bool Equals(ImapSmtpAccessDetails input) + { + if (input == null) + { + return false; + } + return + ( + this.SecureSmtpServerHost == input.SecureSmtpServerHost || + (this.SecureSmtpServerHost != null && + this.SecureSmtpServerHost.Equals(input.SecureSmtpServerHost)) + ) && + ( + this.SecureSmtpServerPort == input.SecureSmtpServerPort || + this.SecureSmtpServerPort.Equals(input.SecureSmtpServerPort) + ) && + ( + this.SecureSmtpUsername == input.SecureSmtpUsername || + (this.SecureSmtpUsername != null && + this.SecureSmtpUsername.Equals(input.SecureSmtpUsername)) + ) && + ( + this.SecureSmtpPassword == input.SecureSmtpPassword || + (this.SecureSmtpPassword != null && + this.SecureSmtpPassword.Equals(input.SecureSmtpPassword)) + ) && + ( + this.SmtpServerHost == input.SmtpServerHost || + (this.SmtpServerHost != null && + this.SmtpServerHost.Equals(input.SmtpServerHost)) + ) && + ( + this.SmtpServerPort == input.SmtpServerPort || + this.SmtpServerPort.Equals(input.SmtpServerPort) + ) && + ( + this.SmtpUsername == input.SmtpUsername || + (this.SmtpUsername != null && + this.SmtpUsername.Equals(input.SmtpUsername)) + ) && + ( + this.SmtpPassword == input.SmtpPassword || + (this.SmtpPassword != null && + this.SmtpPassword.Equals(input.SmtpPassword)) + ) && + ( + this.ImapServerHost == input.ImapServerHost || + (this.ImapServerHost != null && + this.ImapServerHost.Equals(input.ImapServerHost)) + ) && + ( + this.ImapServerPort == input.ImapServerPort || + this.ImapServerPort.Equals(input.ImapServerPort) + ) && + ( + this.ImapUsername == input.ImapUsername || + (this.ImapUsername != null && + this.ImapUsername.Equals(input.ImapUsername)) + ) && + ( + this.ImapPassword == input.ImapPassword || + (this.ImapPassword != null && + this.ImapPassword.Equals(input.ImapPassword)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SecureSmtpServerHost != null) + { + hashCode = (hashCode * 59) + this.SecureSmtpServerHost.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SecureSmtpServerPort.GetHashCode(); + if (this.SecureSmtpUsername != null) + { + hashCode = (hashCode * 59) + this.SecureSmtpUsername.GetHashCode(); + } + if (this.SecureSmtpPassword != null) + { + hashCode = (hashCode * 59) + this.SecureSmtpPassword.GetHashCode(); + } + if (this.SmtpServerHost != null) + { + hashCode = (hashCode * 59) + this.SmtpServerHost.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SmtpServerPort.GetHashCode(); + if (this.SmtpUsername != null) + { + hashCode = (hashCode * 59) + this.SmtpUsername.GetHashCode(); + } + if (this.SmtpPassword != null) + { + hashCode = (hashCode * 59) + this.SmtpPassword.GetHashCode(); + } + if (this.ImapServerHost != null) + { + hashCode = (hashCode * 59) + this.ImapServerHost.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ImapServerPort.GetHashCode(); + if (this.ImapUsername != null) + { + hashCode = (hashCode * 59) + this.ImapUsername.GetHashCode(); + } + if (this.ImapPassword != null) + { + hashCode = (hashCode * 59) + this.ImapPassword.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxByEmailAddressResult.cs b/src/mailslurp/Model/InboxByEmailAddressResult.cs new file mode 100644 index 00000000..90a55173 --- /dev/null +++ b/src/mailslurp/Model/InboxByEmailAddressResult.cs @@ -0,0 +1,148 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of search for inbox by email address + /// + [DataContract(Name = "InboxByEmailAddressResult")] + public partial class InboxByEmailAddressResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxByEmailAddressResult() { } + /// + /// Initializes a new instance of the class. + /// + /// inboxId. + /// exists (required). + public InboxByEmailAddressResult(Guid? inboxId = default(Guid?), bool exists = default(bool)) + { + this.Exists = exists; + this.InboxId = inboxId; + } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Gets or Sets Exists + /// + [DataMember(Name = "exists", IsRequired = true, EmitDefaultValue = true)] + public bool Exists { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxByEmailAddressResult {\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Exists: ").Append(Exists).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxByEmailAddressResult); + } + + /// + /// Returns true if InboxByEmailAddressResult instances are equal + /// + /// Instance of InboxByEmailAddressResult to be compared + /// Boolean + public bool Equals(InboxByEmailAddressResult input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Exists == input.Exists || + this.Exists.Equals(input.Exists) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Exists.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxByNameResult.cs b/src/mailslurp/Model/InboxByNameResult.cs new file mode 100644 index 00000000..acbb953f --- /dev/null +++ b/src/mailslurp/Model/InboxByNameResult.cs @@ -0,0 +1,148 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of search for inbox by name + /// + [DataContract(Name = "InboxByNameResult")] + public partial class InboxByNameResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxByNameResult() { } + /// + /// Initializes a new instance of the class. + /// + /// inboxId. + /// exists (required). + public InboxByNameResult(Guid? inboxId = default(Guid?), bool exists = default(bool)) + { + this.Exists = exists; + this.InboxId = inboxId; + } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Gets or Sets Exists + /// + [DataMember(Name = "exists", IsRequired = true, EmitDefaultValue = true)] + public bool Exists { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxByNameResult {\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Exists: ").Append(Exists).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxByNameResult); + } + + /// + /// Returns true if InboxByNameResult instances are equal + /// + /// Instance of InboxByNameResult to be compared + /// Boolean + public bool Equals(InboxByNameResult input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Exists == input.Exists || + this.Exists.Equals(input.Exists) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Exists.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxDto.cs b/src/mailslurp/Model/InboxDto.cs new file mode 100644 index 00000000..9ff9c14f --- /dev/null +++ b/src/mailslurp/Model/InboxDto.cs @@ -0,0 +1,374 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Representation of a MailSlurp inbox. An inbox has an ID and a real email address. Emails can be sent to or from this email address. Inboxes are either `SMTP` or `HTTP` mailboxes. The default, `HTTP` inboxes, use AWS SES to process emails and are best suited as test email accounts and do not support IMAP or POP3. `SMTP` inboxes use a custom mail server at `mx.mailslurp.com` and support SMTP login, IMAP and POP3. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments. Inboxes may have a description, name, and tags for display purposes. You can also favourite an inbox for easier searching. + /// + [DataContract(Name = "InboxDto")] + public partial class InboxDto : IEquatable, IValidatableObject + { + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [JsonConverter(typeof(StringEnumConverter))] + public enum InboxTypeEnum + { + /// + /// Enum HTTPINBOX for value: HTTP_INBOX + /// + [EnumMember(Value = "HTTP_INBOX")] + HTTPINBOX = 1, + + /// + /// Enum SMTPINBOX for value: SMTP_INBOX + /// + [EnumMember(Value = "SMTP_INBOX")] + SMTPINBOX = 2 + + } + + + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [DataMember(Name = "inboxType", EmitDefaultValue = true)] + public InboxTypeEnum? InboxType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxDto() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. (required). + /// ID of user that inbox belongs to. + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. (required). + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search. + /// ID of custom domain used by the inbox if any. + /// Description of an inbox for labelling and searching purposes. + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (required). + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.. + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering (required). + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.. + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).. + /// Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. (required). + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. (required). + public InboxDto(Guid id = default(Guid), Guid? userId = default(Guid?), DateTime createdAt = default(DateTime), string name = default(string), Guid? domainId = default(Guid?), string description = default(string), string emailAddress = default(string), string expiresAt = default(string), bool favourite = default(bool), List tags = default(List), InboxTypeEnum? inboxType = default(InboxTypeEnum?), bool readOnly = default(bool), bool virtualInbox = default(bool)) + { + this.Id = id; + this.CreatedAt = createdAt; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for InboxDto and cannot be null"); + } + this.EmailAddress = emailAddress; + this.Favourite = favourite; + this.ReadOnly = readOnly; + this.VirtualInbox = virtualInbox; + this.UserId = userId; + this.Name = name; + this.DomainId = domainId; + this.Description = description; + this.ExpiresAt = expiresAt; + this.Tags = tags; + this.InboxType = inboxType; + } + + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// ID of user that inbox belongs to + /// + /// ID of user that inbox belongs to + [DataMember(Name = "userId", EmitDefaultValue = true)] + public Guid? UserId { get; set; } + + /// + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + /// + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// ID of custom domain used by the inbox if any + /// + /// ID of custom domain used by the inbox if any + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// Description of an inbox for labelling and searching purposes + /// + /// Description of an inbox for labelling and searching purposes + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + /// + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + /// + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + [DataMember(Name = "expiresAt", EmitDefaultValue = true)] + public string ExpiresAt { get; set; } + + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + [DataMember(Name = "favourite", IsRequired = true, EmitDefaultValue = true)] + public bool Favourite { get; set; } + + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + [DataMember(Name = "tags", EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. + /// + /// Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. + [DataMember(Name = "readOnly", IsRequired = true, EmitDefaultValue = true)] + public bool ReadOnly { get; set; } + + /// + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + /// + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + [DataMember(Name = "virtualInbox", IsRequired = true, EmitDefaultValue = true)] + public bool VirtualInbox { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" Favourite: ").Append(Favourite).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" InboxType: ").Append(InboxType).Append("\n"); + sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n"); + sb.Append(" VirtualInbox: ").Append(VirtualInbox).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxDto); + } + + /// + /// Returns true if InboxDto instances are equal + /// + /// Instance of InboxDto to be compared + /// Boolean + public bool Equals(InboxDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.ExpiresAt == input.ExpiresAt || + (this.ExpiresAt != null && + this.ExpiresAt.Equals(input.ExpiresAt)) + ) && + ( + this.Favourite == input.Favourite || + this.Favourite.Equals(input.Favourite) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.InboxType == input.InboxType || + this.InboxType.Equals(input.InboxType) + ) && + ( + this.ReadOnly == input.ReadOnly || + this.ReadOnly.Equals(input.ReadOnly) + ) && + ( + this.VirtualInbox == input.VirtualInbox || + this.VirtualInbox.Equals(input.VirtualInbox) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.ExpiresAt != null) + { + hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Favourite.GetHashCode(); + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + hashCode = (hashCode * 59) + this.InboxType.GetHashCode(); + hashCode = (hashCode * 59) + this.ReadOnly.GetHashCode(); + hashCode = (hashCode * 59) + this.VirtualInbox.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxExistsDto.cs b/src/mailslurp/Model/InboxExistsDto.cs new file mode 100644 index 00000000..619cbc28 --- /dev/null +++ b/src/mailslurp/Model/InboxExistsDto.cs @@ -0,0 +1,130 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of email exists query + /// + [DataContract(Name = "InboxExistsDto")] + public partial class InboxExistsDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxExistsDto() { } + /// + /// Initializes a new instance of the class. + /// + /// exists (required). + public InboxExistsDto(bool exists = default(bool)) + { + this.Exists = exists; + } + + /// + /// Gets or Sets Exists + /// + [DataMember(Name = "exists", IsRequired = true, EmitDefaultValue = true)] + public bool Exists { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxExistsDto {\n"); + sb.Append(" Exists: ").Append(Exists).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxExistsDto); + } + + /// + /// Returns true if InboxExistsDto instances are equal + /// + /// Instance of InboxExistsDto to be compared + /// Boolean + public bool Equals(InboxExistsDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Exists == input.Exists || + this.Exists.Equals(input.Exists) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Exists.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxForwarderDto.cs b/src/mailslurp/Model/InboxForwarderDto.cs new file mode 100644 index 00000000..c28408c2 --- /dev/null +++ b/src/mailslurp/Model/InboxForwarderDto.cs @@ -0,0 +1,263 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Inbox forwarder + /// + [DataContract(Name = "InboxForwarderDto")] + public partial class InboxForwarderDto : IEquatable, IValidatableObject + { + /// + /// Defines Field + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FieldEnum + { + /// + /// Enum RECIPIENTS for value: RECIPIENTS + /// + [EnumMember(Value = "RECIPIENTS")] + RECIPIENTS = 1, + + /// + /// Enum SENDER for value: SENDER + /// + [EnumMember(Value = "SENDER")] + SENDER = 2, + + /// + /// Enum SUBJECT for value: SUBJECT + /// + [EnumMember(Value = "SUBJECT")] + SUBJECT = 3, + + /// + /// Enum ATTACHMENTS for value: ATTACHMENTS + /// + [EnumMember(Value = "ATTACHMENTS")] + ATTACHMENTS = 4 + + } + + + /// + /// Gets or Sets Field + /// + [DataMember(Name = "field", IsRequired = true, EmitDefaultValue = true)] + public FieldEnum Field { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxForwarderDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// inboxId (required). + /// field (required). + /// match (required). + /// forwardToRecipients (required). + /// createdAt (required). + public InboxForwarderDto(Guid id = default(Guid), Guid inboxId = default(Guid), FieldEnum field = default(FieldEnum), string match = default(string), List forwardToRecipients = default(List), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.InboxId = inboxId; + this.Field = field; + // to ensure "match" is required (not null) + if (match == null) + { + throw new ArgumentNullException("match is a required property for InboxForwarderDto and cannot be null"); + } + this.Match = match; + // to ensure "forwardToRecipients" is required (not null) + if (forwardToRecipients == null) + { + throw new ArgumentNullException("forwardToRecipients is a required property for InboxForwarderDto and cannot be null"); + } + this.ForwardToRecipients = forwardToRecipients; + this.CreatedAt = createdAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets Match + /// + [DataMember(Name = "match", IsRequired = true, EmitDefaultValue = true)] + public string Match { get; set; } + + /// + /// Gets or Sets ForwardToRecipients + /// + [DataMember(Name = "forwardToRecipients", IsRequired = true, EmitDefaultValue = true)] + public List ForwardToRecipients { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxForwarderDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Field: ").Append(Field).Append("\n"); + sb.Append(" Match: ").Append(Match).Append("\n"); + sb.Append(" ForwardToRecipients: ").Append(ForwardToRecipients).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxForwarderDto); + } + + /// + /// Returns true if InboxForwarderDto instances are equal + /// + /// Instance of InboxForwarderDto to be compared + /// Boolean + public bool Equals(InboxForwarderDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Field == input.Field || + this.Field.Equals(input.Field) + ) && + ( + this.Match == input.Match || + (this.Match != null && + this.Match.Equals(input.Match)) + ) && + ( + this.ForwardToRecipients == input.ForwardToRecipients || + this.ForwardToRecipients != null && + input.ForwardToRecipients != null && + this.ForwardToRecipients.SequenceEqual(input.ForwardToRecipients) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Field.GetHashCode(); + if (this.Match != null) + { + hashCode = (hashCode * 59) + this.Match.GetHashCode(); + } + if (this.ForwardToRecipients != null) + { + hashCode = (hashCode * 59) + this.ForwardToRecipients.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxForwarderEventProjection.cs b/src/mailslurp/Model/InboxForwarderEventProjection.cs new file mode 100644 index 00000000..5911d7d0 --- /dev/null +++ b/src/mailslurp/Model/InboxForwarderEventProjection.cs @@ -0,0 +1,276 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Inbox forwarder event + /// + [DataContract(Name = "InboxForwarderEventProjection")] + public partial class InboxForwarderEventProjection : IEquatable, IValidatableObject + { + /// + /// Defines Status + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + /// + /// Enum SUCCESS for value: SUCCESS + /// + [EnumMember(Value = "SUCCESS")] + SUCCESS = 1, + + /// + /// Enum FAILURE for value: FAILURE + /// + [EnumMember(Value = "FAILURE")] + FAILURE = 2 + + } + + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxForwarderEventProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// message. + /// id. + /// status. + /// userId. + /// emailId. + /// inboxId. + /// createdAt (required). + /// forwarderId. + public InboxForwarderEventProjection(string message = default(string), Guid? id = default(Guid?), StatusEnum? status = default(StatusEnum?), Guid? userId = default(Guid?), Guid? emailId = default(Guid?), Guid? inboxId = default(Guid?), DateTime createdAt = default(DateTime), Guid? forwarderId = default(Guid?)) + { + this.CreatedAt = createdAt; + this.Message = message; + this.Id = id; + this.Status = status; + this.UserId = userId; + this.EmailId = emailId; + this.InboxId = inboxId; + this.ForwarderId = forwarderId; + } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = true)] + public Guid? Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", EmitDefaultValue = true)] + public Guid? UserId { get; set; } + + /// + /// Gets or Sets EmailId + /// + [DataMember(Name = "emailId", EmitDefaultValue = true)] + public Guid? EmailId { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets ForwarderId + /// + [DataMember(Name = "forwarderId", EmitDefaultValue = true)] + public Guid? ForwarderId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxForwarderEventProjection {\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" EmailId: ").Append(EmailId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ForwarderId: ").Append(ForwarderId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxForwarderEventProjection); + } + + /// + /// Returns true if InboxForwarderEventProjection instances are equal + /// + /// Instance of InboxForwarderEventProjection to be compared + /// Boolean + public bool Equals(InboxForwarderEventProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.EmailId == input.EmailId || + (this.EmailId != null && + this.EmailId.Equals(input.EmailId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ForwarderId == input.ForwarderId || + (this.ForwarderId != null && + this.ForwarderId.Equals(input.ForwarderId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.EmailId != null) + { + hashCode = (hashCode * 59) + this.EmailId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.ForwarderId != null) + { + hashCode = (hashCode * 59) + this.ForwarderId.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxForwarderTestOptions.cs b/src/mailslurp/Model/InboxForwarderTestOptions.cs new file mode 100644 index 00000000..30ddaa5a --- /dev/null +++ b/src/mailslurp/Model/InboxForwarderTestOptions.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for testing an inbox forwarder against a value + /// + [DataContract(Name = "InboxForwarderTestOptions")] + public partial class InboxForwarderTestOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxForwarderTestOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// testValue (required). + public InboxForwarderTestOptions(string testValue = default(string)) + { + // to ensure "testValue" is required (not null) + if (testValue == null) + { + throw new ArgumentNullException("testValue is a required property for InboxForwarderTestOptions and cannot be null"); + } + this.TestValue = testValue; + } + + /// + /// Gets or Sets TestValue + /// + [DataMember(Name = "testValue", IsRequired = true, EmitDefaultValue = true)] + public string TestValue { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxForwarderTestOptions {\n"); + sb.Append(" TestValue: ").Append(TestValue).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxForwarderTestOptions); + } + + /// + /// Returns true if InboxForwarderTestOptions instances are equal + /// + /// Instance of InboxForwarderTestOptions to be compared + /// Boolean + public bool Equals(InboxForwarderTestOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.TestValue == input.TestValue || + (this.TestValue != null && + this.TestValue.Equals(input.TestValue)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TestValue != null) + { + hashCode = (hashCode * 59) + this.TestValue.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxForwarderTestResult.cs b/src/mailslurp/Model/InboxForwarderTestResult.cs new file mode 100644 index 00000000..af981cd0 --- /dev/null +++ b/src/mailslurp/Model/InboxForwarderTestResult.cs @@ -0,0 +1,154 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Results of inbox forwarder test + /// + [DataContract(Name = "InboxForwarderTestResult")] + public partial class InboxForwarderTestResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxForwarderTestResult() { } + /// + /// Initializes a new instance of the class. + /// + /// matches (required). + /// doesMatch (required). + public InboxForwarderTestResult(Dictionary matches = default(Dictionary), bool doesMatch = default(bool)) + { + // to ensure "matches" is required (not null) + if (matches == null) + { + throw new ArgumentNullException("matches is a required property for InboxForwarderTestResult and cannot be null"); + } + this.Matches = matches; + this.DoesMatch = doesMatch; + } + + /// + /// Gets or Sets Matches + /// + [DataMember(Name = "matches", IsRequired = true, EmitDefaultValue = true)] + public Dictionary Matches { get; set; } + + /// + /// Gets or Sets DoesMatch + /// + [DataMember(Name = "doesMatch", IsRequired = true, EmitDefaultValue = true)] + public bool DoesMatch { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxForwarderTestResult {\n"); + sb.Append(" Matches: ").Append(Matches).Append("\n"); + sb.Append(" DoesMatch: ").Append(DoesMatch).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxForwarderTestResult); + } + + /// + /// Returns true if InboxForwarderTestResult instances are equal + /// + /// Instance of InboxForwarderTestResult to be compared + /// Boolean + public bool Equals(InboxForwarderTestResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Matches == input.Matches || + this.Matches != null && + input.Matches != null && + this.Matches.SequenceEqual(input.Matches) + ) && + ( + this.DoesMatch == input.DoesMatch || + this.DoesMatch.Equals(input.DoesMatch) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Matches != null) + { + hashCode = (hashCode * 59) + this.Matches.GetHashCode(); + } + hashCode = (hashCode * 59) + this.DoesMatch.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxIdItem.cs b/src/mailslurp/Model/InboxIdItem.cs new file mode 100644 index 00000000..af55b2bf --- /dev/null +++ b/src/mailslurp/Model/InboxIdItem.cs @@ -0,0 +1,157 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Inbox ID and email address pair + /// + [DataContract(Name = "InboxIdItem")] + public partial class InboxIdItem : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxIdItem() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// emailAddress (required). + public InboxIdItem(Guid id = default(Guid), string emailAddress = default(string)) + { + this.Id = id; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for InboxIdItem and cannot be null"); + } + this.EmailAddress = emailAddress; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxIdItem {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxIdItem); + } + + /// + /// Returns true if InboxIdItem instances are equal + /// + /// Instance of InboxIdItem to be compared + /// Boolean + public bool Equals(InboxIdItem input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxIdsResult.cs b/src/mailslurp/Model/InboxIdsResult.cs new file mode 100644 index 00000000..6a35f474 --- /dev/null +++ b/src/mailslurp/Model/InboxIdsResult.cs @@ -0,0 +1,140 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// List of inbox IDs and email addresses + /// + [DataContract(Name = "InboxIdsResult")] + public partial class InboxIdsResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxIdsResult() { } + /// + /// Initializes a new instance of the class. + /// + /// inboxIds (required). + public InboxIdsResult(List inboxIds = default(List)) + { + // to ensure "inboxIds" is required (not null) + if (inboxIds == null) + { + throw new ArgumentNullException("inboxIds is a required property for InboxIdsResult and cannot be null"); + } + this.InboxIds = inboxIds; + } + + /// + /// Gets or Sets InboxIds + /// + [DataMember(Name = "inboxIds", IsRequired = true, EmitDefaultValue = true)] + public List InboxIds { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxIdsResult {\n"); + sb.Append(" InboxIds: ").Append(InboxIds).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxIdsResult); + } + + /// + /// Returns true if InboxIdsResult instances are equal + /// + /// Instance of InboxIdsResult to be compared + /// Boolean + public bool Equals(InboxIdsResult input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxIds == input.InboxIds || + this.InboxIds != null && + input.InboxIds != null && + this.InboxIds.SequenceEqual(input.InboxIds) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxIds != null) + { + hashCode = (hashCode * 59) + this.InboxIds.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxPreview.cs b/src/mailslurp/Model/InboxPreview.cs new file mode 100644 index 00000000..68bd9425 --- /dev/null +++ b/src/mailslurp/Model/InboxPreview.cs @@ -0,0 +1,331 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Inbox data preview element. + /// + [DataContract(Name = "InboxPreview")] + public partial class InboxPreview : IEquatable, IValidatableObject + { + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [JsonConverter(typeof(StringEnumConverter))] + public enum InboxTypeEnum + { + /// + /// Enum HTTPINBOX for value: HTTP_INBOX + /// + [EnumMember(Value = "HTTP_INBOX")] + HTTPINBOX = 1, + + /// + /// Enum SMTPINBOX for value: SMTP_INBOX + /// + [EnumMember(Value = "SMTP_INBOX")] + SMTPINBOX = 2 + + } + + + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [DataMember(Name = "inboxType", EmitDefaultValue = true)] + public InboxTypeEnum? InboxType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxPreview() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. (required). + /// ID of custom domain used by the inbox if any. + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.. + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. (required). + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering (required). + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search. + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.. + /// Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ (required). + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).. + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. (required). + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.. + public InboxPreview(Guid id = default(Guid), Guid? domainId = default(Guid?), string emailAddress = default(string), DateTime createdAt = default(DateTime), bool favourite = default(bool), string name = default(string), List tags = default(List), bool teamAccess = default(bool), InboxTypeEnum? inboxType = default(InboxTypeEnum?), bool virtualInbox = default(bool), string expiresAt = default(string)) + { + this.Id = id; + this.CreatedAt = createdAt; + this.Favourite = favourite; + this.TeamAccess = teamAccess; + this.VirtualInbox = virtualInbox; + this.DomainId = domainId; + this.EmailAddress = emailAddress; + this.Name = name; + this.Tags = tags; + this.InboxType = inboxType; + this.ExpiresAt = expiresAt; + } + + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// ID of custom domain used by the inbox if any + /// + /// ID of custom domain used by the inbox if any + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + /// + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + [DataMember(Name = "emailAddress", EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + /// + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + [DataMember(Name = "favourite", IsRequired = true, EmitDefaultValue = true)] + public bool Favourite { get; set; } + + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + [DataMember(Name = "tags", EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ + /// + /// Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ + [DataMember(Name = "teamAccess", IsRequired = true, EmitDefaultValue = true)] + public bool TeamAccess { get; set; } + + /// + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + /// + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + [DataMember(Name = "virtualInbox", IsRequired = true, EmitDefaultValue = true)] + public bool VirtualInbox { get; set; } + + /// + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + /// + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + [DataMember(Name = "expiresAt", EmitDefaultValue = true)] + public string ExpiresAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxPreview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Favourite: ").Append(Favourite).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TeamAccess: ").Append(TeamAccess).Append("\n"); + sb.Append(" InboxType: ").Append(InboxType).Append("\n"); + sb.Append(" VirtualInbox: ").Append(VirtualInbox).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxPreview); + } + + /// + /// Returns true if InboxPreview instances are equal + /// + /// Instance of InboxPreview to be compared + /// Boolean + public bool Equals(InboxPreview input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.Favourite == input.Favourite || + this.Favourite.Equals(input.Favourite) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.TeamAccess == input.TeamAccess || + this.TeamAccess.Equals(input.TeamAccess) + ) && + ( + this.InboxType == input.InboxType || + this.InboxType.Equals(input.InboxType) + ) && + ( + this.VirtualInbox == input.VirtualInbox || + this.VirtualInbox.Equals(input.VirtualInbox) + ) && + ( + this.ExpiresAt == input.ExpiresAt || + (this.ExpiresAt != null && + this.ExpiresAt.Equals(input.ExpiresAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Favourite.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TeamAccess.GetHashCode(); + hashCode = (hashCode * 59) + this.InboxType.GetHashCode(); + hashCode = (hashCode * 59) + this.VirtualInbox.GetHashCode(); + if (this.ExpiresAt != null) + { + hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxRulesetDto.cs b/src/mailslurp/Model/InboxRulesetDto.cs new file mode 100644 index 00000000..f3c74add --- /dev/null +++ b/src/mailslurp/Model/InboxRulesetDto.cs @@ -0,0 +1,295 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Rules for inbox + /// + [DataContract(Name = "InboxRulesetDto")] + public partial class InboxRulesetDto : IEquatable, IValidatableObject + { + /// + /// Defines Scope + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ScopeEnum + { + /// + /// Enum RECEIVINGEMAILS for value: RECEIVING_EMAILS + /// + [EnumMember(Value = "RECEIVING_EMAILS")] + RECEIVINGEMAILS = 1, + + /// + /// Enum SENDINGEMAILS for value: SENDING_EMAILS + /// + [EnumMember(Value = "SENDING_EMAILS")] + SENDINGEMAILS = 2 + + } + + + /// + /// Gets or Sets Scope + /// + [DataMember(Name = "scope", IsRequired = true, EmitDefaultValue = true)] + public ScopeEnum Scope { get; set; } + /// + /// Defines Action + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionEnum + { + /// + /// Enum BLOCK for value: BLOCK + /// + [EnumMember(Value = "BLOCK")] + BLOCK = 1, + + /// + /// Enum ALLOW for value: ALLOW + /// + [EnumMember(Value = "ALLOW")] + ALLOW = 2, + + /// + /// Enum FILTERREMOVE for value: FILTER_REMOVE + /// + [EnumMember(Value = "FILTER_REMOVE")] + FILTERREMOVE = 3 + + } + + + /// + /// Gets or Sets Action + /// + [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] + public ActionEnum Action { get; set; } + /// + /// Defines Handler + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum HandlerEnum + { + /// + /// Enum EXCEPTION for value: EXCEPTION + /// + [EnumMember(Value = "EXCEPTION")] + EXCEPTION = 1 + + } + + + /// + /// Gets or Sets Handler + /// + [DataMember(Name = "handler", IsRequired = true, EmitDefaultValue = true)] + public HandlerEnum Handler { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxRulesetDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// inboxId (required). + /// scope (required). + /// action (required). + /// target (required). + /// handler (required). + /// createdAt (required). + public InboxRulesetDto(Guid id = default(Guid), Guid inboxId = default(Guid), ScopeEnum scope = default(ScopeEnum), ActionEnum action = default(ActionEnum), string target = default(string), HandlerEnum handler = default(HandlerEnum), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.InboxId = inboxId; + this.Scope = scope; + this.Action = action; + // to ensure "target" is required (not null) + if (target == null) + { + throw new ArgumentNullException("target is a required property for InboxRulesetDto and cannot be null"); + } + this.Target = target; + this.Handler = handler; + this.CreatedAt = createdAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets Target + /// + [DataMember(Name = "target", IsRequired = true, EmitDefaultValue = true)] + public string Target { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxRulesetDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" Action: ").Append(Action).Append("\n"); + sb.Append(" Target: ").Append(Target).Append("\n"); + sb.Append(" Handler: ").Append(Handler).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxRulesetDto); + } + + /// + /// Returns true if InboxRulesetDto instances are equal + /// + /// Instance of InboxRulesetDto to be compared + /// Boolean + public bool Equals(InboxRulesetDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Scope == input.Scope || + this.Scope.Equals(input.Scope) + ) && + ( + this.Action == input.Action || + this.Action.Equals(input.Action) + ) && + ( + this.Target == input.Target || + (this.Target != null && + this.Target.Equals(input.Target)) + ) && + ( + this.Handler == input.Handler || + this.Handler.Equals(input.Handler) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Scope.GetHashCode(); + hashCode = (hashCode * 59) + this.Action.GetHashCode(); + if (this.Target != null) + { + hashCode = (hashCode * 59) + this.Target.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Handler.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxRulesetTestOptions.cs b/src/mailslurp/Model/InboxRulesetTestOptions.cs new file mode 100644 index 00000000..47619b62 --- /dev/null +++ b/src/mailslurp/Model/InboxRulesetTestOptions.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Test options for inbox ruleset + /// + [DataContract(Name = "InboxRulesetTestOptions")] + public partial class InboxRulesetTestOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxRulesetTestOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// testTarget (required). + public InboxRulesetTestOptions(string testTarget = default(string)) + { + // to ensure "testTarget" is required (not null) + if (testTarget == null) + { + throw new ArgumentNullException("testTarget is a required property for InboxRulesetTestOptions and cannot be null"); + } + this.TestTarget = testTarget; + } + + /// + /// Gets or Sets TestTarget + /// + [DataMember(Name = "testTarget", IsRequired = true, EmitDefaultValue = true)] + public string TestTarget { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxRulesetTestOptions {\n"); + sb.Append(" TestTarget: ").Append(TestTarget).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxRulesetTestOptions); + } + + /// + /// Returns true if InboxRulesetTestOptions instances are equal + /// + /// Instance of InboxRulesetTestOptions to be compared + /// Boolean + public bool Equals(InboxRulesetTestOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.TestTarget == input.TestTarget || + (this.TestTarget != null && + this.TestTarget.Equals(input.TestTarget)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TestTarget != null) + { + hashCode = (hashCode * 59) + this.TestTarget.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/InboxRulesetTestResult.cs b/src/mailslurp/Model/InboxRulesetTestResult.cs new file mode 100644 index 00000000..9f4ac96d --- /dev/null +++ b/src/mailslurp/Model/InboxRulesetTestResult.cs @@ -0,0 +1,155 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of test of inbox ruleset + /// + [DataContract(Name = "InboxRulesetTestResult")] + public partial class InboxRulesetTestResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboxRulesetTestResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Map of inbox ruleset ID to boolean of if target matches (required). + /// matches (required). + public InboxRulesetTestResult(Dictionary rulesetMatches = default(Dictionary), bool matches = default(bool)) + { + // to ensure "rulesetMatches" is required (not null) + if (rulesetMatches == null) + { + throw new ArgumentNullException("rulesetMatches is a required property for InboxRulesetTestResult and cannot be null"); + } + this.RulesetMatches = rulesetMatches; + this.Matches = matches; + } + + /// + /// Map of inbox ruleset ID to boolean of if target matches + /// + /// Map of inbox ruleset ID to boolean of if target matches + [DataMember(Name = "rulesetMatches", IsRequired = true, EmitDefaultValue = true)] + public Dictionary RulesetMatches { get; set; } + + /// + /// Gets or Sets Matches + /// + [DataMember(Name = "matches", IsRequired = true, EmitDefaultValue = true)] + public bool Matches { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboxRulesetTestResult {\n"); + sb.Append(" RulesetMatches: ").Append(RulesetMatches).Append("\n"); + sb.Append(" Matches: ").Append(Matches).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InboxRulesetTestResult); + } + + /// + /// Returns true if InboxRulesetTestResult instances are equal + /// + /// Instance of InboxRulesetTestResult to be compared + /// Boolean + public bool Equals(InboxRulesetTestResult input) + { + if (input == null) + { + return false; + } + return + ( + this.RulesetMatches == input.RulesetMatches || + this.RulesetMatches != null && + input.RulesetMatches != null && + this.RulesetMatches.SequenceEqual(input.RulesetMatches) + ) && + ( + this.Matches == input.Matches || + this.Matches.Equals(input.Matches) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RulesetMatches != null) + { + hashCode = (hashCode * 59) + this.RulesetMatches.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Matches.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/JSONSchemaDto.cs b/src/mailslurp/Model/JSONSchemaDto.cs new file mode 100644 index 00000000..a4ae53b9 --- /dev/null +++ b/src/mailslurp/Model/JSONSchemaDto.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// JSONSchema for payload + /// + [DataContract(Name = "JSONSchemaDto")] + public partial class JSONSchemaDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected JSONSchemaDto() { } + /// + /// Initializes a new instance of the class. + /// + /// value (required). + public JSONSchemaDto(string value = default(string)) + { + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for JSONSchemaDto and cannot be null"); + } + this.Value = value; + } + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class JSONSchemaDto {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as JSONSchemaDto); + } + + /// + /// Returns true if JSONSchemaDto instances are equal + /// + /// Instance of JSONSchemaDto to be compared + /// Boolean + public bool Equals(JSONSchemaDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ListUnsubscribeRecipientProjection.cs b/src/mailslurp/Model/ListUnsubscribeRecipientProjection.cs new file mode 100644 index 00000000..3018fd97 --- /dev/null +++ b/src/mailslurp/Model/ListUnsubscribeRecipientProjection.cs @@ -0,0 +1,193 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// List unsubscribe recipient + /// + [DataContract(Name = "ListUnsubscribeRecipientProjection")] + public partial class ListUnsubscribeRecipientProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ListUnsubscribeRecipientProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// emailAddress (required). + /// createdAt (required). + /// domainId. + public ListUnsubscribeRecipientProjection(Guid id = default(Guid), string emailAddress = default(string), DateTime createdAt = default(DateTime), Guid? domainId = default(Guid?)) + { + this.Id = id; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for ListUnsubscribeRecipientProjection and cannot be null"); + } + this.EmailAddress = emailAddress; + this.CreatedAt = createdAt; + this.DomainId = domainId; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets DomainId + /// + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListUnsubscribeRecipientProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ListUnsubscribeRecipientProjection); + } + + /// + /// Returns true if ListUnsubscribeRecipientProjection instances are equal + /// + /// Instance of ListUnsubscribeRecipientProjection to be compared + /// Boolean + public bool Equals(ListUnsubscribeRecipientProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/MatchOption.cs b/src/mailslurp/Model/MatchOption.cs new file mode 100644 index 00000000..666c22fb --- /dev/null +++ b/src/mailslurp/Model/MatchOption.cs @@ -0,0 +1,230 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for matching emails in an inbox. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `SUBJECT` should `CONTAIN` value. + /// + [DataContract(Name = "MatchOption")] + public partial class MatchOption : IEquatable, IValidatableObject + { + /// + /// Fields of an email object that can be used to filter results + /// + /// Fields of an email object that can be used to filter results + [JsonConverter(typeof(StringEnumConverter))] + public enum FieldEnum + { + /// + /// Enum SUBJECT for value: SUBJECT + /// + [EnumMember(Value = "SUBJECT")] + SUBJECT = 1, + + /// + /// Enum TO for value: TO + /// + [EnumMember(Value = "TO")] + TO = 2, + + /// + /// Enum BCC for value: BCC + /// + [EnumMember(Value = "BCC")] + BCC = 3, + + /// + /// Enum CC for value: CC + /// + [EnumMember(Value = "CC")] + CC = 4, + + /// + /// Enum FROM for value: FROM + /// + [EnumMember(Value = "FROM")] + FROM = 5 + + } + + + /// + /// Fields of an email object that can be used to filter results + /// + /// Fields of an email object that can be used to filter results + [DataMember(Name = "field", IsRequired = true, EmitDefaultValue = true)] + public FieldEnum Field { get; set; } + /// + /// How the value of the email field specified should be compared to the value given in the match options. + /// + /// How the value of the email field specified should be compared to the value given in the match options. + [JsonConverter(typeof(StringEnumConverter))] + public enum ShouldEnum + { + /// + /// Enum CONTAIN for value: CONTAIN + /// + [EnumMember(Value = "CONTAIN")] + CONTAIN = 1, + + /// + /// Enum EQUAL for value: EQUAL + /// + [EnumMember(Value = "EQUAL")] + EQUAL = 2 + + } + + + /// + /// How the value of the email field specified should be compared to the value given in the match options. + /// + /// How the value of the email field specified should be compared to the value given in the match options. + [DataMember(Name = "should", IsRequired = true, EmitDefaultValue = true)] + public ShouldEnum Should { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MatchOption() { } + /// + /// Initializes a new instance of the class. + /// + /// Fields of an email object that can be used to filter results (required). + /// How the value of the email field specified should be compared to the value given in the match options. (required). + /// The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. (required). + public MatchOption(FieldEnum field = default(FieldEnum), ShouldEnum should = default(ShouldEnum), string value = default(string)) + { + this.Field = field; + this.Should = should; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for MatchOption and cannot be null"); + } + this.Value = value; + } + + /// + /// The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. + /// + /// The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MatchOption {\n"); + sb.Append(" Field: ").Append(Field).Append("\n"); + sb.Append(" Should: ").Append(Should).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as MatchOption); + } + + /// + /// Returns true if MatchOption instances are equal + /// + /// Instance of MatchOption to be compared + /// Boolean + public bool Equals(MatchOption input) + { + if (input == null) + { + return false; + } + return + ( + this.Field == input.Field || + this.Field.Equals(input.Field) + ) && + ( + this.Should == input.Should || + this.Should.Equals(input.Should) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Field.GetHashCode(); + hashCode = (hashCode * 59) + this.Should.GetHashCode(); + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/MatchOptions.cs b/src/mailslurp/Model/MatchOptions.cs new file mode 100644 index 00000000..42e6a97e --- /dev/null +++ b/src/mailslurp/Model/MatchOptions.cs @@ -0,0 +1,151 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Optional filter for matching emails based on fields. For instance filter results to only include emails whose `SUBJECT` value does `CONTAIN` given match value. An example payload would be `{ matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }`. You can also pass conditions such as `HAS_ATTACHMENT`. If you wish to extract regex matches inside the email content see the `getEmailContentMatch` method in the EmailController. + /// + [DataContract(Name = "MatchOptions")] + public partial class MatchOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results. + /// Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans.. + public MatchOptions(List matches = default(List), List conditions = default(List)) + { + this.Matches = matches; + this.Conditions = conditions; + } + + /// + /// Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results + /// + /// Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results + [DataMember(Name = "matches", EmitDefaultValue = true)] + public List Matches { get; set; } + + /// + /// Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans. + /// + /// Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans. + [DataMember(Name = "conditions", EmitDefaultValue = true)] + public List Conditions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MatchOptions {\n"); + sb.Append(" Matches: ").Append(Matches).Append("\n"); + sb.Append(" Conditions: ").Append(Conditions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as MatchOptions); + } + + /// + /// Returns true if MatchOptions instances are equal + /// + /// Instance of MatchOptions to be compared + /// Boolean + public bool Equals(MatchOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Matches == input.Matches || + this.Matches != null && + input.Matches != null && + this.Matches.SequenceEqual(input.Matches) + ) && + ( + this.Conditions == input.Conditions || + this.Conditions != null && + input.Conditions != null && + this.Conditions.SequenceEqual(input.Conditions) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Matches != null) + { + hashCode = (hashCode * 59) + this.Matches.GetHashCode(); + } + if (this.Conditions != null) + { + hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/MissedEmailDto.cs b/src/mailslurp/Model/MissedEmailDto.cs new file mode 100644 index 00000000..8f276f1f --- /dev/null +++ b/src/mailslurp/Model/MissedEmailDto.cs @@ -0,0 +1,424 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Missed email + /// + [DataContract(Name = "MissedEmailDto")] + public partial class MissedEmailDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MissedEmailDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId. + /// subject. + /// bodyExcerpt. + /// attachmentCount (required). + /// from. + /// rawUrl. + /// rawKey. + /// rawBucket. + /// canRestore. + /// to (required). + /// cc (required). + /// bcc (required). + /// inboxIds (required). + /// createdAt (required). + /// updatedAt (required). + public MissedEmailDto(Guid id = default(Guid), Guid? userId = default(Guid?), string subject = default(string), string bodyExcerpt = default(string), int attachmentCount = default(int), string from = default(string), string rawUrl = default(string), string rawKey = default(string), string rawBucket = default(string), bool? canRestore = default(bool?), List to = default(List), List cc = default(List), List bcc = default(List), List inboxIds = default(List), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.AttachmentCount = attachmentCount; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for MissedEmailDto and cannot be null"); + } + this.To = to; + // to ensure "cc" is required (not null) + if (cc == null) + { + throw new ArgumentNullException("cc is a required property for MissedEmailDto and cannot be null"); + } + this.Cc = cc; + // to ensure "bcc" is required (not null) + if (bcc == null) + { + throw new ArgumentNullException("bcc is a required property for MissedEmailDto and cannot be null"); + } + this.Bcc = bcc; + // to ensure "inboxIds" is required (not null) + if (inboxIds == null) + { + throw new ArgumentNullException("inboxIds is a required property for MissedEmailDto and cannot be null"); + } + this.InboxIds = inboxIds; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.UserId = userId; + this.Subject = subject; + this.BodyExcerpt = bodyExcerpt; + this.From = from; + this.RawUrl = rawUrl; + this.RawKey = rawKey; + this.RawBucket = rawBucket; + this.CanRestore = canRestore; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", EmitDefaultValue = true)] + public Guid? UserId { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Gets or Sets BodyExcerpt + /// + [DataMember(Name = "bodyExcerpt", EmitDefaultValue = true)] + public string BodyExcerpt { get; set; } + + /// + /// Gets or Sets AttachmentCount + /// + [DataMember(Name = "attachmentCount", IsRequired = true, EmitDefaultValue = true)] + public int AttachmentCount { get; set; } + + /// + /// Gets or Sets From + /// + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Gets or Sets RawUrl + /// + [DataMember(Name = "rawUrl", EmitDefaultValue = true)] + public string RawUrl { get; set; } + + /// + /// Gets or Sets RawKey + /// + [DataMember(Name = "rawKey", EmitDefaultValue = true)] + public string RawKey { get; set; } + + /// + /// Gets or Sets RawBucket + /// + [DataMember(Name = "rawBucket", EmitDefaultValue = true)] + public string RawBucket { get; set; } + + /// + /// Gets or Sets CanRestore + /// + [DataMember(Name = "canRestore", EmitDefaultValue = true)] + public bool? CanRestore { get; set; } + + /// + /// Gets or Sets To + /// + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Gets or Sets Cc + /// + [DataMember(Name = "cc", IsRequired = true, EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// Gets or Sets Bcc + /// + [DataMember(Name = "bcc", IsRequired = true, EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// Gets or Sets InboxIds + /// + [DataMember(Name = "inboxIds", IsRequired = true, EmitDefaultValue = true)] + public List InboxIds { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MissedEmailDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" BodyExcerpt: ").Append(BodyExcerpt).Append("\n"); + sb.Append(" AttachmentCount: ").Append(AttachmentCount).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" RawUrl: ").Append(RawUrl).Append("\n"); + sb.Append(" RawKey: ").Append(RawKey).Append("\n"); + sb.Append(" RawBucket: ").Append(RawBucket).Append("\n"); + sb.Append(" CanRestore: ").Append(CanRestore).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" InboxIds: ").Append(InboxIds).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as MissedEmailDto); + } + + /// + /// Returns true if MissedEmailDto instances are equal + /// + /// Instance of MissedEmailDto to be compared + /// Boolean + public bool Equals(MissedEmailDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.BodyExcerpt == input.BodyExcerpt || + (this.BodyExcerpt != null && + this.BodyExcerpt.Equals(input.BodyExcerpt)) + ) && + ( + this.AttachmentCount == input.AttachmentCount || + this.AttachmentCount.Equals(input.AttachmentCount) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.RawUrl == input.RawUrl || + (this.RawUrl != null && + this.RawUrl.Equals(input.RawUrl)) + ) && + ( + this.RawKey == input.RawKey || + (this.RawKey != null && + this.RawKey.Equals(input.RawKey)) + ) && + ( + this.RawBucket == input.RawBucket || + (this.RawBucket != null && + this.RawBucket.Equals(input.RawBucket)) + ) && + ( + this.CanRestore == input.CanRestore || + (this.CanRestore != null && + this.CanRestore.Equals(input.CanRestore)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.InboxIds == input.InboxIds || + this.InboxIds != null && + input.InboxIds != null && + this.InboxIds.SequenceEqual(input.InboxIds) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.BodyExcerpt != null) + { + hashCode = (hashCode * 59) + this.BodyExcerpt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AttachmentCount.GetHashCode(); + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.RawUrl != null) + { + hashCode = (hashCode * 59) + this.RawUrl.GetHashCode(); + } + if (this.RawKey != null) + { + hashCode = (hashCode * 59) + this.RawKey.GetHashCode(); + } + if (this.RawBucket != null) + { + hashCode = (hashCode * 59) + this.RawBucket.GetHashCode(); + } + if (this.CanRestore != null) + { + hashCode = (hashCode * 59) + this.CanRestore.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.InboxIds != null) + { + hashCode = (hashCode * 59) + this.InboxIds.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/MissedEmailProjection.cs b/src/mailslurp/Model/MissedEmailProjection.cs new file mode 100644 index 00000000..315b6a7f --- /dev/null +++ b/src/mailslurp/Model/MissedEmailProjection.cs @@ -0,0 +1,206 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Missed email data + /// + [DataContract(Name = "MissedEmailProjection")] + public partial class MissedEmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MissedEmailProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// from. + /// subject. + /// userId. + /// createdAt (required). + public MissedEmailProjection(Guid id = default(Guid), string from = default(string), string subject = default(string), Guid? userId = default(Guid?), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.CreatedAt = createdAt; + this.From = from; + this.Subject = subject; + this.UserId = userId; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets From + /// + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", EmitDefaultValue = true)] + public Guid? UserId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MissedEmailProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as MissedEmailProjection); + } + + /// + /// Returns true if MissedEmailProjection instances are equal + /// + /// Instance of MissedEmailProjection to be compared + /// Boolean + public bool Equals(MissedEmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/NameServerRecord.cs b/src/mailslurp/Model/NameServerRecord.cs new file mode 100644 index 00000000..646e90fb --- /dev/null +++ b/src/mailslurp/Model/NameServerRecord.cs @@ -0,0 +1,208 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Name Server Record + /// + [DataContract(Name = "NameServerRecord")] + public partial class NameServerRecord : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NameServerRecord() { } + /// + /// Initializes a new instance of the class. + /// + /// raw (required). + /// recordType (required). + /// priority (required). + /// value (required). + public NameServerRecord(string raw = default(string), string recordType = default(string), string priority = default(string), string value = default(string)) + { + // to ensure "raw" is required (not null) + if (raw == null) + { + throw new ArgumentNullException("raw is a required property for NameServerRecord and cannot be null"); + } + this.Raw = raw; + // to ensure "recordType" is required (not null) + if (recordType == null) + { + throw new ArgumentNullException("recordType is a required property for NameServerRecord and cannot be null"); + } + this.RecordType = recordType; + // to ensure "priority" is required (not null) + if (priority == null) + { + throw new ArgumentNullException("priority is a required property for NameServerRecord and cannot be null"); + } + this.Priority = priority; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for NameServerRecord and cannot be null"); + } + this.Value = value; + } + + /// + /// Gets or Sets Raw + /// + [DataMember(Name = "raw", IsRequired = true, EmitDefaultValue = true)] + public string Raw { get; set; } + + /// + /// Gets or Sets RecordType + /// + [DataMember(Name = "recordType", IsRequired = true, EmitDefaultValue = true)] + public string RecordType { get; set; } + + /// + /// Gets or Sets Priority + /// + [DataMember(Name = "priority", IsRequired = true, EmitDefaultValue = true)] + public string Priority { get; set; } + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NameServerRecord {\n"); + sb.Append(" Raw: ").Append(Raw).Append("\n"); + sb.Append(" RecordType: ").Append(RecordType).Append("\n"); + sb.Append(" Priority: ").Append(Priority).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NameServerRecord); + } + + /// + /// Returns true if NameServerRecord instances are equal + /// + /// Instance of NameServerRecord to be compared + /// Boolean + public bool Equals(NameServerRecord input) + { + if (input == null) + { + return false; + } + return + ( + this.Raw == input.Raw || + (this.Raw != null && + this.Raw.Equals(input.Raw)) + ) && + ( + this.RecordType == input.RecordType || + (this.RecordType != null && + this.RecordType.Equals(input.RecordType)) + ) && + ( + this.Priority == input.Priority || + (this.Priority != null && + this.Priority.Equals(input.Priority)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Raw != null) + { + hashCode = (hashCode * 59) + this.Raw.GetHashCode(); + } + if (this.RecordType != null) + { + hashCode = (hashCode * 59) + this.RecordType.GetHashCode(); + } + if (this.Priority != null) + { + hashCode = (hashCode * 59) + this.Priority.GetHashCode(); + } + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/OrganizationInboxProjection.cs b/src/mailslurp/Model/OrganizationInboxProjection.cs new file mode 100644 index 00000000..14d1e85b --- /dev/null +++ b/src/mailslurp/Model/OrganizationInboxProjection.cs @@ -0,0 +1,327 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Organization team inbox + /// + [DataContract(Name = "OrganizationInboxProjection")] + public partial class OrganizationInboxProjection : IEquatable, IValidatableObject + { + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [JsonConverter(typeof(StringEnumConverter))] + public enum InboxTypeEnum + { + /// + /// Enum HTTPINBOX for value: HTTP_INBOX + /// + [EnumMember(Value = "HTTP_INBOX")] + HTTPINBOX = 1, + + /// + /// Enum SMTPINBOX for value: SMTP_INBOX + /// + [EnumMember(Value = "SMTP_INBOX")] + SMTPINBOX = 2 + + } + + + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + /// + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + [DataMember(Name = "inboxType", EmitDefaultValue = true)] + public InboxTypeEnum? InboxType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OrganizationInboxProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. (required). + /// ID of custom domain used by the inbox if any. + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. (required). + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search. + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.. + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering (required). + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.. + /// Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ (required). + /// Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).. + /// Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. (required). + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. (required). + public OrganizationInboxProjection(Guid id = default(Guid), Guid? domainId = default(Guid?), DateTime createdAt = default(DateTime), string name = default(string), string emailAddress = default(string), bool favourite = default(bool), List tags = default(List), bool teamAccess = default(bool), InboxTypeEnum? inboxType = default(InboxTypeEnum?), bool readOnly = default(bool), bool virtualInbox = default(bool)) + { + this.Id = id; + this.CreatedAt = createdAt; + this.Favourite = favourite; + this.TeamAccess = teamAccess; + this.ReadOnly = readOnly; + this.VirtualInbox = virtualInbox; + this.DomainId = domainId; + this.Name = name; + this.EmailAddress = emailAddress; + this.Tags = tags; + this.InboxType = inboxType; + } + + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + /// + /// ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// ID of custom domain used by the inbox if any + /// + /// ID of custom domain used by the inbox if any + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + /// + /// When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + /// + /// The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + [DataMember(Name = "emailAddress", EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + [DataMember(Name = "favourite", IsRequired = true, EmitDefaultValue = true)] + public bool Favourite { get; set; } + + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + [DataMember(Name = "tags", EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ + /// + /// Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ + [DataMember(Name = "teamAccess", IsRequired = true, EmitDefaultValue = true)] + public bool TeamAccess { get; set; } + + /// + /// Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. + /// + /// Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. + [DataMember(Name = "readOnly", IsRequired = true, EmitDefaultValue = true)] + public bool ReadOnly { get; set; } + + /// + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + /// + /// Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + [DataMember(Name = "virtualInbox", IsRequired = true, EmitDefaultValue = true)] + public bool VirtualInbox { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OrganizationInboxProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" Favourite: ").Append(Favourite).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TeamAccess: ").Append(TeamAccess).Append("\n"); + sb.Append(" InboxType: ").Append(InboxType).Append("\n"); + sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n"); + sb.Append(" VirtualInbox: ").Append(VirtualInbox).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OrganizationInboxProjection); + } + + /// + /// Returns true if OrganizationInboxProjection instances are equal + /// + /// Instance of OrganizationInboxProjection to be compared + /// Boolean + public bool Equals(OrganizationInboxProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.Favourite == input.Favourite || + this.Favourite.Equals(input.Favourite) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.TeamAccess == input.TeamAccess || + this.TeamAccess.Equals(input.TeamAccess) + ) && + ( + this.InboxType == input.InboxType || + this.InboxType.Equals(input.InboxType) + ) && + ( + this.ReadOnly == input.ReadOnly || + this.ReadOnly.Equals(input.ReadOnly) + ) && + ( + this.VirtualInbox == input.VirtualInbox || + this.VirtualInbox.Equals(input.VirtualInbox) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Favourite.GetHashCode(); + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TeamAccess.GetHashCode(); + hashCode = (hashCode * 59) + this.InboxType.GetHashCode(); + hashCode = (hashCode * 59) + this.ReadOnly.GetHashCode(); + hashCode = (hashCode * 59) + this.VirtualInbox.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageAlias.cs b/src/mailslurp/Model/PageAlias.cs new file mode 100644 index 00000000..a771c076 --- /dev/null +++ b/src/mailslurp/Model/PageAlias.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated email alias results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageAlias")] + public partial class PageAlias : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageAlias(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageAlias {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageAlias); + } + + /// + /// Returns true if PageAlias instances are equal + /// + /// Instance of PageAlias to be compared + /// Boolean + public bool Equals(PageAlias input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageAttachmentEntity.cs b/src/mailslurp/Model/PageAttachmentEntity.cs new file mode 100644 index 00000000..9b6e3c79 --- /dev/null +++ b/src/mailslurp/Model/PageAttachmentEntity.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated attachment entity results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageAttachmentEntity")] + public partial class PageAttachmentEntity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageAttachmentEntity(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageAttachmentEntity {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageAttachmentEntity); + } + + /// + /// Returns true if PageAttachmentEntity instances are equal + /// + /// Instance of PageAttachmentEntity to be compared + /// Boolean + public bool Equals(PageAttachmentEntity input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageBouncedEmail.cs b/src/mailslurp/Model/PageBouncedEmail.cs new file mode 100644 index 00000000..3e1fc95b --- /dev/null +++ b/src/mailslurp/Model/PageBouncedEmail.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated bounced email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageBouncedEmail")] + public partial class PageBouncedEmail : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageBouncedEmail(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageBouncedEmail {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageBouncedEmail); + } + + /// + /// Returns true if PageBouncedEmail instances are equal + /// + /// Instance of PageBouncedEmail to be compared + /// Boolean + public bool Equals(PageBouncedEmail input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageBouncedRecipients.cs b/src/mailslurp/Model/PageBouncedRecipients.cs new file mode 100644 index 00000000..d1455ad7 --- /dev/null +++ b/src/mailslurp/Model/PageBouncedRecipients.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated bounced recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageBouncedRecipients")] + public partial class PageBouncedRecipients : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageBouncedRecipients(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageBouncedRecipients {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageBouncedRecipients); + } + + /// + /// Returns true if PageBouncedRecipients instances are equal + /// + /// Instance of PageBouncedRecipients to be compared + /// Boolean + public bool Equals(PageBouncedRecipients input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageComplaint.cs b/src/mailslurp/Model/PageComplaint.cs new file mode 100644 index 00000000..a356a0d3 --- /dev/null +++ b/src/mailslurp/Model/PageComplaint.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated complaint email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageComplaint")] + public partial class PageComplaint : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageComplaint(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageComplaint {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageComplaint); + } + + /// + /// Returns true if PageComplaint instances are equal + /// + /// Instance of PageComplaint to be compared + /// Boolean + public bool Equals(PageComplaint input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageContactProjection.cs b/src/mailslurp/Model/PageContactProjection.cs new file mode 100644 index 00000000..ca20d6fe --- /dev/null +++ b/src/mailslurp/Model/PageContactProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated contact results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageContactProjection")] + public partial class PageContactProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageContactProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageContactProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageContactProjection); + } + + /// + /// Returns true if PageContactProjection instances are equal + /// + /// Instance of PageContactProjection to be compared + /// Boolean + public bool Equals(PageContactProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageDeliveryStatus.cs b/src/mailslurp/Model/PageDeliveryStatus.cs new file mode 100644 index 00000000..110e37b4 --- /dev/null +++ b/src/mailslurp/Model/PageDeliveryStatus.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated delivery status results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageDeliveryStatus")] + public partial class PageDeliveryStatus : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageDeliveryStatus(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageDeliveryStatus {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageDeliveryStatus); + } + + /// + /// Returns true if PageDeliveryStatus instances are equal + /// + /// Instance of PageDeliveryStatus to be compared + /// Boolean + public bool Equals(PageDeliveryStatus input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageEmailPreview.cs b/src/mailslurp/Model/PageEmailPreview.cs new file mode 100644 index 00000000..bb03aac3 --- /dev/null +++ b/src/mailslurp/Model/PageEmailPreview.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated email preview results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. + /// + [DataContract(Name = "PageEmailPreview")] + public partial class PageEmailPreview : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageEmailPreview(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageEmailPreview {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageEmailPreview); + } + + /// + /// Returns true if PageEmailPreview instances are equal + /// + /// Instance of PageEmailPreview to be compared + /// Boolean + public bool Equals(PageEmailPreview input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageEmailProjection.cs b/src/mailslurp/Model/PageEmailProjection.cs new file mode 100644 index 00000000..f622f012 --- /dev/null +++ b/src/mailslurp/Model/PageEmailProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. + /// + [DataContract(Name = "PageEmailProjection")] + public partial class PageEmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageEmailProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageEmailProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageEmailProjection); + } + + /// + /// Returns true if PageEmailProjection instances are equal + /// + /// Instance of PageEmailProjection to be compared + /// Boolean + public bool Equals(PageEmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageEmailValidationRequest.cs b/src/mailslurp/Model/PageEmailValidationRequest.cs new file mode 100644 index 00000000..4d227ebf --- /dev/null +++ b/src/mailslurp/Model/PageEmailValidationRequest.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated email validation request records. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageEmailValidationRequest")] + public partial class PageEmailValidationRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageEmailValidationRequest(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageEmailValidationRequest {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageEmailValidationRequest); + } + + /// + /// Returns true if PageEmailValidationRequest instances are equal + /// + /// Instance of PageEmailValidationRequest to be compared + /// Boolean + public bool Equals(PageEmailValidationRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageExpiredInboxRecordProjection.cs b/src/mailslurp/Model/PageExpiredInboxRecordProjection.cs new file mode 100644 index 00000000..c0805642 --- /dev/null +++ b/src/mailslurp/Model/PageExpiredInboxRecordProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated expired inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageExpiredInboxRecordProjection")] + public partial class PageExpiredInboxRecordProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageExpiredInboxRecordProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageExpiredInboxRecordProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageExpiredInboxRecordProjection); + } + + /// + /// Returns true if PageExpiredInboxRecordProjection instances are equal + /// + /// Instance of PageExpiredInboxRecordProjection to be compared + /// Boolean + public bool Equals(PageExpiredInboxRecordProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageGroupProjection.cs b/src/mailslurp/Model/PageGroupProjection.cs new file mode 100644 index 00000000..82ceb23d --- /dev/null +++ b/src/mailslurp/Model/PageGroupProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated missed email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageGroupProjection")] + public partial class PageGroupProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageGroupProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageGroupProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageGroupProjection); + } + + /// + /// Returns true if PageGroupProjection instances are equal + /// + /// Instance of PageGroupProjection to be compared + /// Boolean + public bool Equals(PageGroupProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageInboxForwarderDto.cs b/src/mailslurp/Model/PageInboxForwarderDto.cs new file mode 100644 index 00000000..32fe6dc9 --- /dev/null +++ b/src/mailslurp/Model/PageInboxForwarderDto.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated inbox forwarder results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageInboxForwarderDto")] + public partial class PageInboxForwarderDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageInboxForwarderDto(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageInboxForwarderDto {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageInboxForwarderDto); + } + + /// + /// Returns true if PageInboxForwarderDto instances are equal + /// + /// Instance of PageInboxForwarderDto to be compared + /// Boolean + public bool Equals(PageInboxForwarderDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageInboxForwarderEvents.cs b/src/mailslurp/Model/PageInboxForwarderEvents.cs new file mode 100644 index 00000000..7821b5c0 --- /dev/null +++ b/src/mailslurp/Model/PageInboxForwarderEvents.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated inbox forwarder events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageInboxForwarderEvents")] + public partial class PageInboxForwarderEvents : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageInboxForwarderEvents(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageInboxForwarderEvents {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageInboxForwarderEvents); + } + + /// + /// Returns true if PageInboxForwarderEvents instances are equal + /// + /// Instance of PageInboxForwarderEvents to be compared + /// Boolean + public bool Equals(PageInboxForwarderEvents input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageInboxProjection.cs b/src/mailslurp/Model/PageInboxProjection.cs new file mode 100644 index 00000000..29537336 --- /dev/null +++ b/src/mailslurp/Model/PageInboxProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageInboxProjection")] + public partial class PageInboxProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageInboxProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageInboxProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageInboxProjection); + } + + /// + /// Returns true if PageInboxProjection instances are equal + /// + /// Instance of PageInboxProjection to be compared + /// Boolean + public bool Equals(PageInboxProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageInboxRulesetDto.cs b/src/mailslurp/Model/PageInboxRulesetDto.cs new file mode 100644 index 00000000..0b977521 --- /dev/null +++ b/src/mailslurp/Model/PageInboxRulesetDto.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated inbox ruleset results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageInboxRulesetDto")] + public partial class PageInboxRulesetDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageInboxRulesetDto(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageInboxRulesetDto {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageInboxRulesetDto); + } + + /// + /// Returns true if PageInboxRulesetDto instances are equal + /// + /// Instance of PageInboxRulesetDto to be compared + /// Boolean + public bool Equals(PageInboxRulesetDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageListUnsubscribeRecipients.cs b/src/mailslurp/Model/PageListUnsubscribeRecipients.cs new file mode 100644 index 00000000..6795d71e --- /dev/null +++ b/src/mailslurp/Model/PageListUnsubscribeRecipients.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated list unsubscribe recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageListUnsubscribeRecipients")] + public partial class PageListUnsubscribeRecipients : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageListUnsubscribeRecipients(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageListUnsubscribeRecipients {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageListUnsubscribeRecipients); + } + + /// + /// Returns true if PageListUnsubscribeRecipients instances are equal + /// + /// Instance of PageListUnsubscribeRecipients to be compared + /// Boolean + public bool Equals(PageListUnsubscribeRecipients input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageMissedEmailProjection.cs b/src/mailslurp/Model/PageMissedEmailProjection.cs new file mode 100644 index 00000000..666306ee --- /dev/null +++ b/src/mailslurp/Model/PageMissedEmailProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated MissedEmail results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageMissedEmailProjection")] + public partial class PageMissedEmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageMissedEmailProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageMissedEmailProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageMissedEmailProjection); + } + + /// + /// Returns true if PageMissedEmailProjection instances are equal + /// + /// Instance of PageMissedEmailProjection to be compared + /// Boolean + public bool Equals(PageMissedEmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageOrganizationInboxProjection.cs b/src/mailslurp/Model/PageOrganizationInboxProjection.cs new file mode 100644 index 00000000..069fdbe1 --- /dev/null +++ b/src/mailslurp/Model/PageOrganizationInboxProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated organization inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageOrganizationInboxProjection")] + public partial class PageOrganizationInboxProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageOrganizationInboxProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageOrganizationInboxProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageOrganizationInboxProjection); + } + + /// + /// Returns true if PageOrganizationInboxProjection instances are equal + /// + /// Instance of PageOrganizationInboxProjection to be compared + /// Boolean + public bool Equals(PageOrganizationInboxProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PagePhoneNumberProjection.cs b/src/mailslurp/Model/PagePhoneNumberProjection.cs new file mode 100644 index 00000000..f42dc3c9 --- /dev/null +++ b/src/mailslurp/Model/PagePhoneNumberProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated phone numbers. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PagePhoneNumberProjection")] + public partial class PagePhoneNumberProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PagePhoneNumberProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PagePhoneNumberProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PagePhoneNumberProjection); + } + + /// + /// Returns true if PagePhoneNumberProjection instances are equal + /// + /// Instance of PagePhoneNumberProjection to be compared + /// Boolean + public bool Equals(PagePhoneNumberProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageScheduledJobs.cs b/src/mailslurp/Model/PageScheduledJobs.cs new file mode 100644 index 00000000..1c58aa3f --- /dev/null +++ b/src/mailslurp/Model/PageScheduledJobs.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated scheduled jobs results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageScheduledJobs")] + public partial class PageScheduledJobs : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageScheduledJobs(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageScheduledJobs {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageScheduledJobs); + } + + /// + /// Returns true if PageScheduledJobs instances are equal + /// + /// Instance of PageScheduledJobs to be compared + /// Boolean + public bool Equals(PageScheduledJobs input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageSentEmailProjection.cs b/src/mailslurp/Model/PageSentEmailProjection.cs new file mode 100644 index 00000000..f70a95e7 --- /dev/null +++ b/src/mailslurp/Model/PageSentEmailProjection.cs @@ -0,0 +1,308 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated sent email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageSentEmailProjection")] + public partial class PageSentEmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PageSentEmailProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// Collection of items (required). + /// pageable. + /// total. + /// Size of page requested (required). + /// Page number starting at 0 (required). + /// Number of items returned (required). + /// Total number of items available for querying (required). + /// Total number of pages available (required). + /// last. + /// sort. + /// first. + /// empty. + public PageSentEmailProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), int size = default(int), int number = default(int), int numberOfElements = default(int), long totalElements = default(long), int totalPages = default(int), bool last = default(bool), Sort sort = default(Sort), bool first = default(bool), bool empty = default(bool)) + { + // to ensure "content" is required (not null) + if (content == null) + { + throw new ArgumentNullException("content is a required property for PageSentEmailProjection and cannot be null"); + } + this.Content = content; + this.Size = size; + this.Number = number; + this.NumberOfElements = numberOfElements; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.Sort = sort; + this.First = first; + this.Empty = empty; + } + + /// + /// Collection of items + /// + /// Collection of items + [DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Size of page requested + /// + /// Size of page requested + [DataMember(Name = "size", IsRequired = true, EmitDefaultValue = true)] + public int Size { get; set; } + + /// + /// Page number starting at 0 + /// + /// Page number starting at 0 + [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] + public int Number { get; set; } + + /// + /// Number of items returned + /// + /// Number of items returned + [DataMember(Name = "numberOfElements", IsRequired = true, EmitDefaultValue = true)] + public int NumberOfElements { get; set; } + + /// + /// Total number of items available for querying + /// + /// Total number of items available for querying + [DataMember(Name = "totalElements", IsRequired = true, EmitDefaultValue = true)] + public long TotalElements { get; set; } + + /// + /// Total number of pages available + /// + /// Total number of pages available + [DataMember(Name = "totalPages", IsRequired = true, EmitDefaultValue = true)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageSentEmailProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageSentEmailProjection); + } + + /// + /// Returns true if PageSentEmailProjection instances are equal + /// + /// Instance of PageSentEmailProjection to be compared + /// Boolean + public bool Equals(PageSentEmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageSentEmailWithQueueProjection.cs b/src/mailslurp/Model/PageSentEmailWithQueueProjection.cs new file mode 100644 index 00000000..c3054240 --- /dev/null +++ b/src/mailslurp/Model/PageSentEmailWithQueueProjection.cs @@ -0,0 +1,308 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated sent email results for emails sent with queue. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageSentEmailWithQueueProjection")] + public partial class PageSentEmailWithQueueProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PageSentEmailWithQueueProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// Collection of items (required). + /// pageable. + /// total. + /// Size of page requested (required). + /// Page number starting at 0 (required). + /// Number of items returned (required). + /// Total number of items available for querying (required). + /// Total number of pages available (required). + /// last. + /// sort. + /// first. + /// empty. + public PageSentEmailWithQueueProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), int size = default(int), int number = default(int), int numberOfElements = default(int), long totalElements = default(long), int totalPages = default(int), bool last = default(bool), Sort sort = default(Sort), bool first = default(bool), bool empty = default(bool)) + { + // to ensure "content" is required (not null) + if (content == null) + { + throw new ArgumentNullException("content is a required property for PageSentEmailWithQueueProjection and cannot be null"); + } + this.Content = content; + this.Size = size; + this.Number = number; + this.NumberOfElements = numberOfElements; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.Sort = sort; + this.First = first; + this.Empty = empty; + } + + /// + /// Collection of items + /// + /// Collection of items + [DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Size of page requested + /// + /// Size of page requested + [DataMember(Name = "size", IsRequired = true, EmitDefaultValue = true)] + public int Size { get; set; } + + /// + /// Page number starting at 0 + /// + /// Page number starting at 0 + [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] + public int Number { get; set; } + + /// + /// Number of items returned + /// + /// Number of items returned + [DataMember(Name = "numberOfElements", IsRequired = true, EmitDefaultValue = true)] + public int NumberOfElements { get; set; } + + /// + /// Total number of items available for querying + /// + /// Total number of items available for querying + [DataMember(Name = "totalElements", IsRequired = true, EmitDefaultValue = true)] + public long TotalElements { get; set; } + + /// + /// Total number of pages available + /// + /// Total number of pages available + [DataMember(Name = "totalPages", IsRequired = true, EmitDefaultValue = true)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageSentEmailWithQueueProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageSentEmailWithQueueProjection); + } + + /// + /// Returns true if PageSentEmailWithQueueProjection instances are equal + /// + /// Instance of PageSentEmailWithQueueProjection to be compared + /// Boolean + public bool Equals(PageSentEmailWithQueueProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageSmsProjection.cs b/src/mailslurp/Model/PageSmsProjection.cs new file mode 100644 index 00000000..fa73fdf2 --- /dev/null +++ b/src/mailslurp/Model/PageSmsProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated SMS messages. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageSmsProjection")] + public partial class PageSmsProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageSmsProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageSmsProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageSmsProjection); + } + + /// + /// Returns true if PageSmsProjection instances are equal + /// + /// Instance of PageSmsProjection to be compared + /// Boolean + public bool Equals(PageSmsProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageTemplateProjection.cs b/src/mailslurp/Model/PageTemplateProjection.cs new file mode 100644 index 00000000..f05ed4e7 --- /dev/null +++ b/src/mailslurp/Model/PageTemplateProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated email template results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageTemplateProjection")] + public partial class PageTemplateProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageTemplateProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageTemplateProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageTemplateProjection); + } + + /// + /// Returns true if PageTemplateProjection instances are equal + /// + /// Instance of PageTemplateProjection to be compared + /// Boolean + public bool Equals(PageTemplateProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageThreadProjection.cs b/src/mailslurp/Model/PageThreadProjection.cs new file mode 100644 index 00000000..b3feaa05 --- /dev/null +++ b/src/mailslurp/Model/PageThreadProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. + /// + [DataContract(Name = "PageThreadProjection")] + public partial class PageThreadProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageThreadProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageThreadProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageThreadProjection); + } + + /// + /// Returns true if PageThreadProjection instances are equal + /// + /// Instance of PageThreadProjection to be compared + /// Boolean + public bool Equals(PageThreadProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageTrackingPixelProjection.cs b/src/mailslurp/Model/PageTrackingPixelProjection.cs new file mode 100644 index 00000000..ace60d9f --- /dev/null +++ b/src/mailslurp/Model/PageTrackingPixelProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated TrackingPixel results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageTrackingPixelProjection")] + public partial class PageTrackingPixelProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageTrackingPixelProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageTrackingPixelProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageTrackingPixelProjection); + } + + /// + /// Returns true if PageTrackingPixelProjection instances are equal + /// + /// Instance of PageTrackingPixelProjection to be compared + /// Boolean + public bool Equals(PageTrackingPixelProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageUnknownMissedEmailProjection.cs b/src/mailslurp/Model/PageUnknownMissedEmailProjection.cs new file mode 100644 index 00000000..cd83ca7f --- /dev/null +++ b/src/mailslurp/Model/PageUnknownMissedEmailProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated unknown MissedEmail results. Unknown missed emails are emails that were sent to MailSlurp /Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageUnknownMissedEmailProjection")] + public partial class PageUnknownMissedEmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageUnknownMissedEmailProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageUnknownMissedEmailProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageUnknownMissedEmailProjection); + } + + /// + /// Returns true if PageUnknownMissedEmailProjection instances are equal + /// + /// Instance of PageUnknownMissedEmailProjection to be compared + /// Boolean + public bool Equals(PageUnknownMissedEmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageWebhookProjection.cs b/src/mailslurp/Model/PageWebhookProjection.cs new file mode 100644 index 00000000..fd33c59e --- /dev/null +++ b/src/mailslurp/Model/PageWebhookProjection.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated webhook entity. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageWebhookProjection")] + public partial class PageWebhookProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageWebhookProjection(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageWebhookProjection {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageWebhookProjection); + } + + /// + /// Returns true if PageWebhookProjection instances are equal + /// + /// Instance of PageWebhookProjection to be compared + /// Boolean + public bool Equals(PageWebhookProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageWebhookResult.cs b/src/mailslurp/Model/PageWebhookResult.cs new file mode 100644 index 00000000..78e6a8c7 --- /dev/null +++ b/src/mailslurp/Model/PageWebhookResult.cs @@ -0,0 +1,292 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Paginated webhook results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. + /// + [DataContract(Name = "PageWebhookResult")] + public partial class PageWebhookResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// content. + /// pageable. + /// total. + /// last. + /// totalElements. + /// totalPages. + /// size. + /// number. + /// sort. + /// first. + /// numberOfElements. + /// empty. + public PageWebhookResult(List content = default(List), PageableObject pageable = default(PageableObject), long total = default(long), bool last = default(bool), long totalElements = default(long), int totalPages = default(int), int size = default(int), int number = default(int), Sort sort = default(Sort), bool first = default(bool), int numberOfElements = default(int), bool empty = default(bool)) + { + this.Content = content; + this.Pageable = pageable; + this.Total = total; + this.Last = last; + this.TotalElements = totalElements; + this.TotalPages = totalPages; + this.Size = size; + this.Number = number; + this.Sort = sort; + this.First = first; + this.NumberOfElements = numberOfElements; + this.Empty = empty; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public List Content { get; set; } + + /// + /// Gets or Sets Pageable + /// + [DataMember(Name = "pageable", EmitDefaultValue = false)] + public PageableObject Pageable { get; set; } + + /// + /// Gets or Sets Total + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public long Total { get; set; } + + /// + /// Gets or Sets Last + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public bool Last { get; set; } + + /// + /// Gets or Sets TotalElements + /// + [DataMember(Name = "totalElements", EmitDefaultValue = false)] + public long TotalElements { get; set; } + + /// + /// Gets or Sets TotalPages + /// + [DataMember(Name = "totalPages", EmitDefaultValue = false)] + public int TotalPages { get; set; } + + /// + /// Gets or Sets Size + /// + [DataMember(Name = "size", EmitDefaultValue = false)] + public int Size { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", EmitDefaultValue = false)] + public int Number { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets First + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public bool First { get; set; } + + /// + /// Gets or Sets NumberOfElements + /// + [DataMember(Name = "numberOfElements", EmitDefaultValue = false)] + public int NumberOfElements { get; set; } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageWebhookResult {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Pageable: ").Append(Pageable).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" TotalElements: ").Append(TotalElements).Append("\n"); + sb.Append(" TotalPages: ").Append(TotalPages).Append("\n"); + sb.Append(" Size: ").Append(Size).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" NumberOfElements: ").Append(NumberOfElements).Append("\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageWebhookResult); + } + + /// + /// Returns true if PageWebhookResult instances are equal + /// + /// Instance of PageWebhookResult to be compared + /// Boolean + public bool Equals(PageWebhookResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + this.Content != null && + input.Content != null && + this.Content.SequenceEqual(input.Content) + ) && + ( + this.Pageable == input.Pageable || + (this.Pageable != null && + this.Pageable.Equals(input.Pageable)) + ) && + ( + this.Total == input.Total || + this.Total.Equals(input.Total) + ) && + ( + this.Last == input.Last || + this.Last.Equals(input.Last) + ) && + ( + this.TotalElements == input.TotalElements || + this.TotalElements.Equals(input.TotalElements) + ) && + ( + this.TotalPages == input.TotalPages || + this.TotalPages.Equals(input.TotalPages) + ) && + ( + this.Size == input.Size || + this.Size.Equals(input.Size) + ) && + ( + this.Number == input.Number || + this.Number.Equals(input.Number) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.First == input.First || + this.First.Equals(input.First) + ) && + ( + this.NumberOfElements == input.NumberOfElements || + this.NumberOfElements.Equals(input.NumberOfElements) + ) && + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.Pageable != null) + { + hashCode = (hashCode * 59) + this.Pageable.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Total.GetHashCode(); + hashCode = (hashCode * 59) + this.Last.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalElements.GetHashCode(); + hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); + hashCode = (hashCode * 59) + this.Size.GetHashCode(); + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.First.GetHashCode(); + hashCode = (hashCode * 59) + this.NumberOfElements.GetHashCode(); + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PageableObject.cs b/src/mailslurp/Model/PageableObject.cs new file mode 100644 index 00000000..2b7204fa --- /dev/null +++ b/src/mailslurp/Model/PageableObject.cs @@ -0,0 +1,199 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// PageableObject + /// + [DataContract(Name = "PageableObject")] + public partial class PageableObject : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// offset. + /// sort. + /// pageNumber. + /// pageSize. + /// paged. + /// unpaged. + public PageableObject(long offset = default(long), Sort sort = default(Sort), int pageNumber = default(int), int pageSize = default(int), bool paged = default(bool), bool unpaged = default(bool)) + { + this.Offset = offset; + this.Sort = sort; + this.PageNumber = pageNumber; + this.PageSize = pageSize; + this.Paged = paged; + this.Unpaged = unpaged; + } + + /// + /// Gets or Sets Offset + /// + [DataMember(Name = "offset", EmitDefaultValue = false)] + public long Offset { get; set; } + + /// + /// Gets or Sets Sort + /// + [DataMember(Name = "sort", EmitDefaultValue = false)] + public Sort Sort { get; set; } + + /// + /// Gets or Sets PageNumber + /// + [DataMember(Name = "pageNumber", EmitDefaultValue = false)] + public int PageNumber { get; set; } + + /// + /// Gets or Sets PageSize + /// + [DataMember(Name = "pageSize", EmitDefaultValue = false)] + public int PageSize { get; set; } + + /// + /// Gets or Sets Paged + /// + [DataMember(Name = "paged", EmitDefaultValue = true)] + public bool Paged { get; set; } + + /// + /// Gets or Sets Unpaged + /// + [DataMember(Name = "unpaged", EmitDefaultValue = true)] + public bool Unpaged { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PageableObject {\n"); + sb.Append(" Offset: ").Append(Offset).Append("\n"); + sb.Append(" Sort: ").Append(Sort).Append("\n"); + sb.Append(" PageNumber: ").Append(PageNumber).Append("\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" Paged: ").Append(Paged).Append("\n"); + sb.Append(" Unpaged: ").Append(Unpaged).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PageableObject); + } + + /// + /// Returns true if PageableObject instances are equal + /// + /// Instance of PageableObject to be compared + /// Boolean + public bool Equals(PageableObject input) + { + if (input == null) + { + return false; + } + return + ( + this.Offset == input.Offset || + this.Offset.Equals(input.Offset) + ) && + ( + this.Sort == input.Sort || + (this.Sort != null && + this.Sort.Equals(input.Sort)) + ) && + ( + this.PageNumber == input.PageNumber || + this.PageNumber.Equals(input.PageNumber) + ) && + ( + this.PageSize == input.PageSize || + this.PageSize.Equals(input.PageSize) + ) && + ( + this.Paged == input.Paged || + this.Paged.Equals(input.Paged) + ) && + ( + this.Unpaged == input.Unpaged || + this.Unpaged.Equals(input.Unpaged) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Offset.GetHashCode(); + if (this.Sort != null) + { + hashCode = (hashCode * 59) + this.Sort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PageNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); + hashCode = (hashCode * 59) + this.Paged.GetHashCode(); + hashCode = (hashCode * 59) + this.Unpaged.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PhoneNumberDto.cs b/src/mailslurp/Model/PhoneNumberDto.cs new file mode 100644 index 00000000..f3f8763c --- /dev/null +++ b/src/mailslurp/Model/PhoneNumberDto.cs @@ -0,0 +1,299 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// PhoneNumberDto + /// + [DataContract(Name = "PhoneNumberDto")] + public partial class PhoneNumberDto : IEquatable, IValidatableObject + { + /// + /// Defines PhoneCountry + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PhoneCountryEnum + { + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 1, + + /// + /// Enum GB for value: GB + /// + [EnumMember(Value = "GB")] + GB = 2 + + } + + + /// + /// Gets or Sets PhoneCountry + /// + [DataMember(Name = "phoneCountry", IsRequired = true, EmitDefaultValue = true)] + public PhoneCountryEnum PhoneCountry { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PhoneNumberDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// complianceAddress. + /// emergencyAddress. + /// phoneNumber (required). + /// phoneCountry (required). + /// phonePlan (required). + /// createdAt (required). + /// updatedAt (required). + public PhoneNumberDto(Guid id = default(Guid), Guid userId = default(Guid), Guid complianceAddress = default(Guid), Guid emergencyAddress = default(Guid), string phoneNumber = default(string), PhoneCountryEnum phoneCountry = default(PhoneCountryEnum), Guid phonePlan = default(Guid), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + // to ensure "phoneNumber" is required (not null) + if (phoneNumber == null) + { + throw new ArgumentNullException("phoneNumber is a required property for PhoneNumberDto and cannot be null"); + } + this.PhoneNumber = phoneNumber; + this.PhoneCountry = phoneCountry; + this.PhonePlan = phonePlan; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.ComplianceAddress = complianceAddress; + this.EmergencyAddress = emergencyAddress; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets ComplianceAddress + /// + [DataMember(Name = "complianceAddress", EmitDefaultValue = false)] + public Guid ComplianceAddress { get; set; } + + /// + /// Gets or Sets EmergencyAddress + /// + [DataMember(Name = "emergencyAddress", EmitDefaultValue = false)] + public Guid EmergencyAddress { get; set; } + + /// + /// Gets or Sets PhoneNumber + /// + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] + public string PhoneNumber { get; set; } + + /// + /// Gets or Sets PhonePlan + /// + [DataMember(Name = "phonePlan", IsRequired = true, EmitDefaultValue = true)] + public Guid PhonePlan { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PhoneNumberDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ComplianceAddress: ").Append(ComplianceAddress).Append("\n"); + sb.Append(" EmergencyAddress: ").Append(EmergencyAddress).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" PhoneCountry: ").Append(PhoneCountry).Append("\n"); + sb.Append(" PhonePlan: ").Append(PhonePlan).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PhoneNumberDto); + } + + /// + /// Returns true if PhoneNumberDto instances are equal + /// + /// Instance of PhoneNumberDto to be compared + /// Boolean + public bool Equals(PhoneNumberDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.ComplianceAddress == input.ComplianceAddress || + (this.ComplianceAddress != null && + this.ComplianceAddress.Equals(input.ComplianceAddress)) + ) && + ( + this.EmergencyAddress == input.EmergencyAddress || + (this.EmergencyAddress != null && + this.EmergencyAddress.Equals(input.EmergencyAddress)) + ) && + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ) && + ( + this.PhoneCountry == input.PhoneCountry || + this.PhoneCountry.Equals(input.PhoneCountry) + ) && + ( + this.PhonePlan == input.PhonePlan || + (this.PhonePlan != null && + this.PhonePlan.Equals(input.PhonePlan)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.ComplianceAddress != null) + { + hashCode = (hashCode * 59) + this.ComplianceAddress.GetHashCode(); + } + if (this.EmergencyAddress != null) + { + hashCode = (hashCode * 59) + this.EmergencyAddress.GetHashCode(); + } + if (this.PhoneNumber != null) + { + hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PhoneCountry.GetHashCode(); + if (this.PhonePlan != null) + { + hashCode = (hashCode * 59) + this.PhonePlan.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PhoneNumberProjection.cs b/src/mailslurp/Model/PhoneNumberProjection.cs new file mode 100644 index 00000000..49c86465 --- /dev/null +++ b/src/mailslurp/Model/PhoneNumberProjection.cs @@ -0,0 +1,227 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Phone number projection + /// + [DataContract(Name = "PhoneNumberProjection")] + public partial class PhoneNumberProjection : IEquatable, IValidatableObject + { + /// + /// Defines PhoneCountry + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PhoneCountryEnum + { + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 1, + + /// + /// Enum GB for value: GB + /// + [EnumMember(Value = "GB")] + GB = 2 + + } + + + /// + /// Gets or Sets PhoneCountry + /// + [DataMember(Name = "phoneCountry", IsRequired = true, EmitDefaultValue = true)] + public PhoneCountryEnum PhoneCountry { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PhoneNumberProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// phoneCountry (required). + /// createdAt (required). + /// phoneNumber (required). + public PhoneNumberProjection(Guid id = default(Guid), Guid userId = default(Guid), PhoneCountryEnum phoneCountry = default(PhoneCountryEnum), DateTime createdAt = default(DateTime), string phoneNumber = default(string)) + { + this.Id = id; + this.UserId = userId; + this.PhoneCountry = phoneCountry; + this.CreatedAt = createdAt; + // to ensure "phoneNumber" is required (not null) + if (phoneNumber == null) + { + throw new ArgumentNullException("phoneNumber is a required property for PhoneNumberProjection and cannot be null"); + } + this.PhoneNumber = phoneNumber; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets PhoneNumber + /// + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] + public string PhoneNumber { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PhoneNumberProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" PhoneCountry: ").Append(PhoneCountry).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PhoneNumberProjection); + } + + /// + /// Returns true if PhoneNumberProjection instances are equal + /// + /// Instance of PhoneNumberProjection to be compared + /// Boolean + public bool Equals(PhoneNumberProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.PhoneCountry == input.PhoneCountry || + this.PhoneCountry.Equals(input.PhoneCountry) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PhoneCountry.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.PhoneNumber != null) + { + hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/PhonePlanDto.cs b/src/mailslurp/Model/PhonePlanDto.cs new file mode 100644 index 00000000..7488ba61 --- /dev/null +++ b/src/mailslurp/Model/PhonePlanDto.cs @@ -0,0 +1,204 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// PhonePlanDto + /// + [DataContract(Name = "PhonePlanDto")] + public partial class PhonePlanDto : IEquatable, IValidatableObject + { + /// + /// Defines PhoneCountry + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PhoneCountryEnum + { + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 1, + + /// + /// Enum GB for value: GB + /// + [EnumMember(Value = "GB")] + GB = 2 + + } + + + /// + /// Gets or Sets PhoneCountry + /// + [DataMember(Name = "phoneCountry", IsRequired = true, EmitDefaultValue = true)] + public PhoneCountryEnum PhoneCountry { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PhonePlanDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// phoneCountry (required). + /// createdAt (required). + public PhonePlanDto(Guid id = default(Guid), Guid userId = default(Guid), PhoneCountryEnum phoneCountry = default(PhoneCountryEnum), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + this.PhoneCountry = phoneCountry; + this.CreatedAt = createdAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PhonePlanDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" PhoneCountry: ").Append(PhoneCountry).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PhonePlanDto); + } + + /// + /// Returns true if PhonePlanDto instances are equal + /// + /// Instance of PhonePlanDto to be compared + /// Boolean + public bool Equals(PhonePlanDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.PhoneCountry == input.PhoneCountry || + this.PhoneCountry.Equals(input.PhoneCountry) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PhoneCountry.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/RawEmailJson.cs b/src/mailslurp/Model/RawEmailJson.cs new file mode 100644 index 00000000..a01c8a0b --- /dev/null +++ b/src/mailslurp/Model/RawEmailJson.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Content in raw format + /// + [DataContract(Name = "RawEmailJson")] + public partial class RawEmailJson : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RawEmailJson() { } + /// + /// Initializes a new instance of the class. + /// + /// content (required). + public RawEmailJson(string content = default(string)) + { + // to ensure "content" is required (not null) + if (content == null) + { + throw new ArgumentNullException("content is a required property for RawEmailJson and cannot be null"); + } + this.Content = content; + } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)] + public string Content { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RawEmailJson {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RawEmailJson); + } + + /// + /// Returns true if RawEmailJson instances are equal + /// + /// Instance of RawEmailJson to be compared + /// Boolean + public bool Equals(RawEmailJson input) + { + if (input == null) + { + return false; + } + return + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/Recipient.cs b/src/mailslurp/Model/Recipient.cs new file mode 100644 index 00000000..c98b1ed4 --- /dev/null +++ b/src/mailslurp/Model/Recipient.cs @@ -0,0 +1,180 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email recipient + /// + [DataContract(Name = "Recipient")] + public partial class Recipient : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Recipient() { } + /// + /// Initializes a new instance of the class. + /// + /// rawValue (required). + /// emailAddress (required). + /// name. + public Recipient(string rawValue = default(string), string emailAddress = default(string), string name = default(string)) + { + // to ensure "rawValue" is required (not null) + if (rawValue == null) + { + throw new ArgumentNullException("rawValue is a required property for Recipient and cannot be null"); + } + this.RawValue = rawValue; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for Recipient and cannot be null"); + } + this.EmailAddress = emailAddress; + this.Name = name; + } + + /// + /// Gets or Sets RawValue + /// + [DataMember(Name = "rawValue", IsRequired = true, EmitDefaultValue = true)] + public string RawValue { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Recipient {\n"); + sb.Append(" RawValue: ").Append(RawValue).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Recipient); + } + + /// + /// Returns true if Recipient instances are equal + /// + /// Instance of Recipient to be compared + /// Boolean + public bool Equals(Recipient input) + { + if (input == null) + { + return false; + } + return + ( + this.RawValue == input.RawValue || + (this.RawValue != null && + this.RawValue.Equals(input.RawValue)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RawValue != null) + { + hashCode = (hashCode * 59) + this.RawValue.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ReplyToAliasEmailOptions.cs b/src/mailslurp/Model/ReplyToAliasEmailOptions.cs new file mode 100644 index 00000000..96257040 --- /dev/null +++ b/src/mailslurp/Model/ReplyToAliasEmailOptions.cs @@ -0,0 +1,296 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for replying to an alias email using the alias inbox + /// + [DataContract(Name = "ReplyToAliasEmailOptions")] + public partial class ReplyToAliasEmailOptions : IEquatable, IValidatableObject + { + /// + /// How an email should be sent based on its recipients + /// + /// How an email should be sent based on its recipients + [JsonConverter(typeof(StringEnumConverter))] + public enum SendStrategyEnum + { + /// + /// Enum SINGLEMESSAGE for value: SINGLE_MESSAGE + /// + [EnumMember(Value = "SINGLE_MESSAGE")] + SINGLEMESSAGE = 1 + + } + + + /// + /// How an email should be sent based on its recipients + /// + /// How an email should be sent based on its recipients + [DataMember(Name = "sendStrategy", EmitDefaultValue = true)] + public SendStrategyEnum? SendStrategy { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ReplyToAliasEmailOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Body of the reply email you want to send (required). + /// Is the reply HTML (required). + /// The charset that your message should be sent with. Optional. Default is UTF-8. + /// List of uploaded attachments to send with the reply. Optional.. + /// Template variables if using a template. + /// Template ID to use instead of body. Will use template variable map to fill defined variable slots.. + /// How an email should be sent based on its recipients. + /// Optionally use inbox name as display name for sender email address. + /// html. + public ReplyToAliasEmailOptions(string body = default(string), bool isHTML = default(bool), string charset = default(string), List attachments = default(List), Dictionary templateVariables = default(Dictionary), Guid? template = default(Guid?), SendStrategyEnum? sendStrategy = default(SendStrategyEnum?), bool? useInboxName = default(bool?), bool html = default(bool)) + { + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for ReplyToAliasEmailOptions and cannot be null"); + } + this.Body = body; + this.IsHTML = isHTML; + this.Charset = charset; + this.Attachments = attachments; + this.TemplateVariables = templateVariables; + this.Template = template; + this.SendStrategy = sendStrategy; + this.UseInboxName = useInboxName; + this.Html = html; + } + + /// + /// Body of the reply email you want to send + /// + /// Body of the reply email you want to send + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Is the reply HTML + /// + /// Is the reply HTML + [DataMember(Name = "isHTML", IsRequired = true, EmitDefaultValue = true)] + public bool IsHTML { get; set; } + + /// + /// The charset that your message should be sent with. Optional. Default is UTF-8 + /// + /// The charset that your message should be sent with. Optional. Default is UTF-8 + [DataMember(Name = "charset", EmitDefaultValue = true)] + public string Charset { get; set; } + + /// + /// List of uploaded attachments to send with the reply. Optional. + /// + /// List of uploaded attachments to send with the reply. Optional. + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// Template variables if using a template + /// + /// Template variables if using a template + [DataMember(Name = "templateVariables", EmitDefaultValue = true)] + public Dictionary TemplateVariables { get; set; } + + /// + /// Template ID to use instead of body. Will use template variable map to fill defined variable slots. + /// + /// Template ID to use instead of body. Will use template variable map to fill defined variable slots. + [DataMember(Name = "template", EmitDefaultValue = true)] + public Guid? Template { get; set; } + + /// + /// Optionally use inbox name as display name for sender email address + /// + /// Optionally use inbox name as display name for sender email address + [DataMember(Name = "useInboxName", EmitDefaultValue = true)] + public bool? UseInboxName { get; set; } + + /// + /// Gets or Sets Html + /// + [DataMember(Name = "html", EmitDefaultValue = true)] + public bool Html { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ReplyToAliasEmailOptions {\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" IsHTML: ").Append(IsHTML).Append("\n"); + sb.Append(" Charset: ").Append(Charset).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" TemplateVariables: ").Append(TemplateVariables).Append("\n"); + sb.Append(" Template: ").Append(Template).Append("\n"); + sb.Append(" SendStrategy: ").Append(SendStrategy).Append("\n"); + sb.Append(" UseInboxName: ").Append(UseInboxName).Append("\n"); + sb.Append(" Html: ").Append(Html).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ReplyToAliasEmailOptions); + } + + /// + /// Returns true if ReplyToAliasEmailOptions instances are equal + /// + /// Instance of ReplyToAliasEmailOptions to be compared + /// Boolean + public bool Equals(ReplyToAliasEmailOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.IsHTML == input.IsHTML || + this.IsHTML.Equals(input.IsHTML) + ) && + ( + this.Charset == input.Charset || + (this.Charset != null && + this.Charset.Equals(input.Charset)) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.TemplateVariables == input.TemplateVariables || + this.TemplateVariables != null && + input.TemplateVariables != null && + this.TemplateVariables.SequenceEqual(input.TemplateVariables) + ) && + ( + this.Template == input.Template || + (this.Template != null && + this.Template.Equals(input.Template)) + ) && + ( + this.SendStrategy == input.SendStrategy || + this.SendStrategy.Equals(input.SendStrategy) + ) && + ( + this.UseInboxName == input.UseInboxName || + (this.UseInboxName != null && + this.UseInboxName.Equals(input.UseInboxName)) + ) && + ( + this.Html == input.Html || + this.Html.Equals(input.Html) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsHTML.GetHashCode(); + if (this.Charset != null) + { + hashCode = (hashCode * 59) + this.Charset.GetHashCode(); + } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.TemplateVariables != null) + { + hashCode = (hashCode * 59) + this.TemplateVariables.GetHashCode(); + } + if (this.Template != null) + { + hashCode = (hashCode * 59) + this.Template.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SendStrategy.GetHashCode(); + if (this.UseInboxName != null) + { + hashCode = (hashCode * 59) + this.UseInboxName.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Html.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ReplyToEmailOptions.cs b/src/mailslurp/Model/ReplyToEmailOptions.cs new file mode 100644 index 00000000..53a98f00 --- /dev/null +++ b/src/mailslurp/Model/ReplyToEmailOptions.cs @@ -0,0 +1,334 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for replying to email with API + /// + [DataContract(Name = "ReplyToEmailOptions")] + public partial class ReplyToEmailOptions : IEquatable, IValidatableObject + { + /// + /// How an email should be sent based on its recipients + /// + /// How an email should be sent based on its recipients + [JsonConverter(typeof(StringEnumConverter))] + public enum SendStrategyEnum + { + /// + /// Enum SINGLEMESSAGE for value: SINGLE_MESSAGE + /// + [EnumMember(Value = "SINGLE_MESSAGE")] + SINGLEMESSAGE = 1 + + } + + + /// + /// How an email should be sent based on its recipients + /// + /// How an email should be sent based on its recipients + [DataMember(Name = "sendStrategy", EmitDefaultValue = true)] + public SendStrategyEnum? SendStrategy { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ReplyToEmailOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Body of the reply email you want to send (required). + /// Is the reply HTML (required). + /// The from header that should be used. Optional. + /// The replyTo header that should be used. Optional. + /// The charset that your message should be sent with. Optional. Default is UTF-8. + /// List of uploaded attachments to send with the reply. Optional.. + /// Template variables if using a template. + /// Template ID to use instead of body. Will use template variable map to fill defined variable slots.. + /// How an email should be sent based on its recipients. + /// Optionally use inbox name as display name for sender email address. + /// html. + public ReplyToEmailOptions(string body = default(string), bool isHTML = default(bool), string from = default(string), string replyTo = default(string), string charset = default(string), List attachments = default(List), Dictionary templateVariables = default(Dictionary), Guid? template = default(Guid?), SendStrategyEnum? sendStrategy = default(SendStrategyEnum?), bool? useInboxName = default(bool?), bool html = default(bool)) + { + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for ReplyToEmailOptions and cannot be null"); + } + this.Body = body; + this.IsHTML = isHTML; + this.From = from; + this.ReplyTo = replyTo; + this.Charset = charset; + this.Attachments = attachments; + this.TemplateVariables = templateVariables; + this.Template = template; + this.SendStrategy = sendStrategy; + this.UseInboxName = useInboxName; + this.Html = html; + } + + /// + /// Body of the reply email you want to send + /// + /// Body of the reply email you want to send + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Is the reply HTML + /// + /// Is the reply HTML + [DataMember(Name = "isHTML", IsRequired = true, EmitDefaultValue = true)] + public bool IsHTML { get; set; } + + /// + /// The from header that should be used. Optional + /// + /// The from header that should be used. Optional + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// The replyTo header that should be used. Optional + /// + /// The replyTo header that should be used. Optional + [DataMember(Name = "replyTo", EmitDefaultValue = true)] + public string ReplyTo { get; set; } + + /// + /// The charset that your message should be sent with. Optional. Default is UTF-8 + /// + /// The charset that your message should be sent with. Optional. Default is UTF-8 + [DataMember(Name = "charset", EmitDefaultValue = true)] + public string Charset { get; set; } + + /// + /// List of uploaded attachments to send with the reply. Optional. + /// + /// List of uploaded attachments to send with the reply. Optional. + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// Template variables if using a template + /// + /// Template variables if using a template + [DataMember(Name = "templateVariables", EmitDefaultValue = true)] + public Dictionary TemplateVariables { get; set; } + + /// + /// Template ID to use instead of body. Will use template variable map to fill defined variable slots. + /// + /// Template ID to use instead of body. Will use template variable map to fill defined variable slots. + [DataMember(Name = "template", EmitDefaultValue = true)] + public Guid? Template { get; set; } + + /// + /// Optionally use inbox name as display name for sender email address + /// + /// Optionally use inbox name as display name for sender email address + [DataMember(Name = "useInboxName", EmitDefaultValue = true)] + public bool? UseInboxName { get; set; } + + /// + /// Gets or Sets Html + /// + [DataMember(Name = "html", EmitDefaultValue = true)] + public bool Html { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ReplyToEmailOptions {\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" IsHTML: ").Append(IsHTML).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" Charset: ").Append(Charset).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" TemplateVariables: ").Append(TemplateVariables).Append("\n"); + sb.Append(" Template: ").Append(Template).Append("\n"); + sb.Append(" SendStrategy: ").Append(SendStrategy).Append("\n"); + sb.Append(" UseInboxName: ").Append(UseInboxName).Append("\n"); + sb.Append(" Html: ").Append(Html).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ReplyToEmailOptions); + } + + /// + /// Returns true if ReplyToEmailOptions instances are equal + /// + /// Instance of ReplyToEmailOptions to be compared + /// Boolean + public bool Equals(ReplyToEmailOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.IsHTML == input.IsHTML || + this.IsHTML.Equals(input.IsHTML) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.Charset == input.Charset || + (this.Charset != null && + this.Charset.Equals(input.Charset)) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.TemplateVariables == input.TemplateVariables || + this.TemplateVariables != null && + input.TemplateVariables != null && + this.TemplateVariables.SequenceEqual(input.TemplateVariables) + ) && + ( + this.Template == input.Template || + (this.Template != null && + this.Template.Equals(input.Template)) + ) && + ( + this.SendStrategy == input.SendStrategy || + this.SendStrategy.Equals(input.SendStrategy) + ) && + ( + this.UseInboxName == input.UseInboxName || + (this.UseInboxName != null && + this.UseInboxName.Equals(input.UseInboxName)) + ) && + ( + this.Html == input.Html || + this.Html.Equals(input.Html) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsHTML.GetHashCode(); + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.ReplyTo != null) + { + hashCode = (hashCode * 59) + this.ReplyTo.GetHashCode(); + } + if (this.Charset != null) + { + hashCode = (hashCode * 59) + this.Charset.GetHashCode(); + } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.TemplateVariables != null) + { + hashCode = (hashCode * 59) + this.TemplateVariables.GetHashCode(); + } + if (this.Template != null) + { + hashCode = (hashCode * 59) + this.Template.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SendStrategy.GetHashCode(); + if (this.UseInboxName != null) + { + hashCode = (hashCode * 59) + this.UseInboxName.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Html.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ScheduledJob.cs b/src/mailslurp/Model/ScheduledJob.cs new file mode 100644 index 00000000..0236f651 --- /dev/null +++ b/src/mailslurp/Model/ScheduledJob.cs @@ -0,0 +1,339 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// ScheduledJob + /// + [DataContract(Name = "ScheduledJob")] + public partial class ScheduledJob : IEquatable, IValidatableObject + { + /// + /// Defines Status + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + /// + /// Enum SUBMITTED for value: SUBMITTED + /// + [EnumMember(Value = "SUBMITTED")] + SUBMITTED = 1, + + /// + /// Enum COMPLETED for value: COMPLETED + /// + [EnumMember(Value = "COMPLETED")] + COMPLETED = 2, + + /// + /// Enum FAILED for value: FAILED + /// + [EnumMember(Value = "FAILED")] + FAILED = 3, + + /// + /// Enum CANCELLED for value: CANCELLED + /// + [EnumMember(Value = "CANCELLED")] + CANCELLED = 4 + + } + + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ScheduledJob() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// inboxId (required). + /// jobId (required). + /// groupId (required). + /// triggerId (required). + /// status (required). + /// sendAtTimestamp (required). + /// createdAt (required). + /// updatedAt (required). + public ScheduledJob(Guid id = default(Guid), Guid userId = default(Guid), Guid inboxId = default(Guid), string jobId = default(string), string groupId = default(string), string triggerId = default(string), StatusEnum status = default(StatusEnum), DateTime sendAtTimestamp = default(DateTime), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + this.InboxId = inboxId; + // to ensure "jobId" is required (not null) + if (jobId == null) + { + throw new ArgumentNullException("jobId is a required property for ScheduledJob and cannot be null"); + } + this.JobId = jobId; + // to ensure "groupId" is required (not null) + if (groupId == null) + { + throw new ArgumentNullException("groupId is a required property for ScheduledJob and cannot be null"); + } + this.GroupId = groupId; + // to ensure "triggerId" is required (not null) + if (triggerId == null) + { + throw new ArgumentNullException("triggerId is a required property for ScheduledJob and cannot be null"); + } + this.TriggerId = triggerId; + this.Status = status; + this.SendAtTimestamp = sendAtTimestamp; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets JobId + /// + [DataMember(Name = "jobId", IsRequired = true, EmitDefaultValue = true)] + public string JobId { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", IsRequired = true, EmitDefaultValue = true)] + public string GroupId { get; set; } + + /// + /// Gets or Sets TriggerId + /// + [DataMember(Name = "triggerId", IsRequired = true, EmitDefaultValue = true)] + public string TriggerId { get; set; } + + /// + /// Gets or Sets SendAtTimestamp + /// + [DataMember(Name = "sendAtTimestamp", IsRequired = true, EmitDefaultValue = true)] + public DateTime SendAtTimestamp { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ScheduledJob {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" JobId: ").Append(JobId).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" TriggerId: ").Append(TriggerId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" SendAtTimestamp: ").Append(SendAtTimestamp).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ScheduledJob); + } + + /// + /// Returns true if ScheduledJob instances are equal + /// + /// Instance of ScheduledJob to be compared + /// Boolean + public bool Equals(ScheduledJob input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.JobId == input.JobId || + (this.JobId != null && + this.JobId.Equals(input.JobId)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.TriggerId == input.TriggerId || + (this.TriggerId != null && + this.TriggerId.Equals(input.TriggerId)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.SendAtTimestamp == input.SendAtTimestamp || + (this.SendAtTimestamp != null && + this.SendAtTimestamp.Equals(input.SendAtTimestamp)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.JobId != null) + { + hashCode = (hashCode * 59) + this.JobId.GetHashCode(); + } + if (this.GroupId != null) + { + hashCode = (hashCode * 59) + this.GroupId.GetHashCode(); + } + if (this.TriggerId != null) + { + hashCode = (hashCode * 59) + this.TriggerId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.SendAtTimestamp != null) + { + hashCode = (hashCode * 59) + this.SendAtTimestamp.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ScheduledJobDto.cs b/src/mailslurp/Model/ScheduledJobDto.cs new file mode 100644 index 00000000..657e0df6 --- /dev/null +++ b/src/mailslurp/Model/ScheduledJobDto.cs @@ -0,0 +1,339 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// ScheduledJobDto + /// + [DataContract(Name = "ScheduledJobDto")] + public partial class ScheduledJobDto : IEquatable, IValidatableObject + { + /// + /// Defines Status + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + /// + /// Enum SUBMITTED for value: SUBMITTED + /// + [EnumMember(Value = "SUBMITTED")] + SUBMITTED = 1, + + /// + /// Enum COMPLETED for value: COMPLETED + /// + [EnumMember(Value = "COMPLETED")] + COMPLETED = 2, + + /// + /// Enum FAILED for value: FAILED + /// + [EnumMember(Value = "FAILED")] + FAILED = 3, + + /// + /// Enum CANCELLED for value: CANCELLED + /// + [EnumMember(Value = "CANCELLED")] + CANCELLED = 4 + + } + + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ScheduledJobDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// inboxId (required). + /// jobId (required). + /// groupId (required). + /// triggerId (required). + /// status (required). + /// sendAtTimestamp (required). + /// createdAt (required). + /// updatedAt (required). + public ScheduledJobDto(Guid id = default(Guid), Guid userId = default(Guid), Guid inboxId = default(Guid), string jobId = default(string), string groupId = default(string), string triggerId = default(string), StatusEnum status = default(StatusEnum), DateTime sendAtTimestamp = default(DateTime), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + this.InboxId = inboxId; + // to ensure "jobId" is required (not null) + if (jobId == null) + { + throw new ArgumentNullException("jobId is a required property for ScheduledJobDto and cannot be null"); + } + this.JobId = jobId; + // to ensure "groupId" is required (not null) + if (groupId == null) + { + throw new ArgumentNullException("groupId is a required property for ScheduledJobDto and cannot be null"); + } + this.GroupId = groupId; + // to ensure "triggerId" is required (not null) + if (triggerId == null) + { + throw new ArgumentNullException("triggerId is a required property for ScheduledJobDto and cannot be null"); + } + this.TriggerId = triggerId; + this.Status = status; + this.SendAtTimestamp = sendAtTimestamp; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets JobId + /// + [DataMember(Name = "jobId", IsRequired = true, EmitDefaultValue = true)] + public string JobId { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", IsRequired = true, EmitDefaultValue = true)] + public string GroupId { get; set; } + + /// + /// Gets or Sets TriggerId + /// + [DataMember(Name = "triggerId", IsRequired = true, EmitDefaultValue = true)] + public string TriggerId { get; set; } + + /// + /// Gets or Sets SendAtTimestamp + /// + [DataMember(Name = "sendAtTimestamp", IsRequired = true, EmitDefaultValue = true)] + public DateTime SendAtTimestamp { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ScheduledJobDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" JobId: ").Append(JobId).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" TriggerId: ").Append(TriggerId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" SendAtTimestamp: ").Append(SendAtTimestamp).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ScheduledJobDto); + } + + /// + /// Returns true if ScheduledJobDto instances are equal + /// + /// Instance of ScheduledJobDto to be compared + /// Boolean + public bool Equals(ScheduledJobDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.JobId == input.JobId || + (this.JobId != null && + this.JobId.Equals(input.JobId)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.TriggerId == input.TriggerId || + (this.TriggerId != null && + this.TriggerId.Equals(input.TriggerId)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.SendAtTimestamp == input.SendAtTimestamp || + (this.SendAtTimestamp != null && + this.SendAtTimestamp.Equals(input.SendAtTimestamp)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.JobId != null) + { + hashCode = (hashCode * 59) + this.JobId.GetHashCode(); + } + if (this.GroupId != null) + { + hashCode = (hashCode * 59) + this.GroupId.GetHashCode(); + } + if (this.TriggerId != null) + { + hashCode = (hashCode * 59) + this.TriggerId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.SendAtTimestamp != null) + { + hashCode = (hashCode * 59) + this.SendAtTimestamp.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SendEmailOptions.cs b/src/mailslurp/Model/SendEmailOptions.cs new file mode 100644 index 00000000..87d513ae --- /dev/null +++ b/src/mailslurp/Model/SendEmailOptions.cs @@ -0,0 +1,531 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for the email to be sent + /// + [DataContract(Name = "SendEmailOptions")] + public partial class SendEmailOptions : IEquatable, IValidatableObject + { + /// + /// How an email should be sent based on its recipients + /// + /// How an email should be sent based on its recipients + [JsonConverter(typeof(StringEnumConverter))] + public enum SendStrategyEnum + { + /// + /// Enum SINGLEMESSAGE for value: SINGLE_MESSAGE + /// + [EnumMember(Value = "SINGLE_MESSAGE")] + SINGLEMESSAGE = 1 + + } + + + /// + /// How an email should be sent based on its recipients + /// + /// How an email should be sent based on its recipients + [DataMember(Name = "sendStrategy", EmitDefaultValue = true)] + public SendStrategyEnum? SendStrategy { get; set; } + /// + /// Validate recipient email addresses before sending + /// + /// Validate recipient email addresses before sending + [JsonConverter(typeof(StringEnumConverter))] + public enum ValidateEmailAddressesEnum + { + /// + /// Enum VALIDATEFILTERREMOVEINVALID for value: VALIDATE_FILTER_REMOVE_INVALID + /// + [EnumMember(Value = "VALIDATE_FILTER_REMOVE_INVALID")] + VALIDATEFILTERREMOVEINVALID = 1, + + /// + /// Enum VALIDATEERRORIFINVALID for value: VALIDATE_ERROR_IF_INVALID + /// + [EnumMember(Value = "VALIDATE_ERROR_IF_INVALID")] + VALIDATEERRORIFINVALID = 2, + + /// + /// Enum NOVALIDATION for value: NO_VALIDATION + /// + [EnumMember(Value = "NO_VALIDATION")] + NOVALIDATION = 3 + + } + + + /// + /// Validate recipient email addresses before sending + /// + /// Validate recipient email addresses before sending + [DataMember(Name = "validateEmailAddresses", EmitDefaultValue = true)] + public ValidateEmailAddressesEnum? ValidateEmailAddresses { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients.. + /// Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients. + /// List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing.. + /// Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox <my@address.com>`). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name <inbox@address.com>`. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used.. + /// Optional list of cc destination email addresses. + /// Optional list of bcc destination email addresses. + /// Optional email subject line. + /// Optional replyTo header. + /// Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body.. + /// Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.). + /// Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients. + /// Optional charset. + /// Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. . + /// Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found.. + /// Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard.. + /// How an email should be sent based on its recipients. + /// Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name <inbox@address.com>` if the inbox has a name.. + /// Add tracking pixel to email. + /// Filter recipients to remove any bounced recipients from to, bcc, and cc before sending. + /// Validate recipient email addresses before sending. + public SendEmailOptions(List toContacts = default(List), Guid? toGroup = default(Guid?), List to = default(List), string from = default(string), List cc = default(List), List bcc = default(List), string subject = default(string), string replyTo = default(string), string body = default(string), bool? html = default(bool?), bool? isHTML = default(bool?), string charset = default(string), List attachments = default(List), Dictionary templateVariables = default(Dictionary), Guid? template = default(Guid?), SendStrategyEnum? sendStrategy = default(SendStrategyEnum?), bool? useInboxName = default(bool?), bool? addTrackingPixel = default(bool?), bool? filterBouncedRecipients = default(bool?), ValidateEmailAddressesEnum? validateEmailAddresses = default(ValidateEmailAddressesEnum?)) + { + this.ToContacts = toContacts; + this.ToGroup = toGroup; + this.To = to; + this.From = from; + this.Cc = cc; + this.Bcc = bcc; + this.Subject = subject; + this.ReplyTo = replyTo; + this.Body = body; + this.Html = html; + this.IsHTML = isHTML; + this.Charset = charset; + this.Attachments = attachments; + this.TemplateVariables = templateVariables; + this.Template = template; + this.SendStrategy = sendStrategy; + this.UseInboxName = useInboxName; + this.AddTrackingPixel = addTrackingPixel; + this.FilterBouncedRecipients = filterBouncedRecipients; + this.ValidateEmailAddresses = validateEmailAddresses; + } + + /// + /// Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. + /// + /// Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. + [DataMember(Name = "toContacts", EmitDefaultValue = true)] + public List ToContacts { get; set; } + + /// + /// Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients + /// + /// Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients + [DataMember(Name = "toGroup", EmitDefaultValue = true)] + public Guid? ToGroup { get; set; } + + /// + /// List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing. + /// + /// List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing. + [DataMember(Name = "to", EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox <my@address.com>`). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name <inbox@address.com>`. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used. + /// + /// Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox <my@address.com>`). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name <inbox@address.com>`. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used. + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Optional list of cc destination email addresses + /// + /// Optional list of cc destination email addresses + [DataMember(Name = "cc", EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// Optional list of bcc destination email addresses + /// + /// Optional list of bcc destination email addresses + [DataMember(Name = "bcc", EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// Optional email subject line + /// + /// Optional email subject line + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Optional replyTo header + /// + /// Optional replyTo header + [DataMember(Name = "replyTo", EmitDefaultValue = true)] + public string ReplyTo { get; set; } + + /// + /// Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body. + /// + /// Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body. + [DataMember(Name = "body", EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.) + /// + /// Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.) + [DataMember(Name = "html", EmitDefaultValue = true)] + public bool? Html { get; set; } + + /// + /// Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients + /// + /// Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients + [DataMember(Name = "isHTML", EmitDefaultValue = true)] + public bool? IsHTML { get; set; } + + /// + /// Optional charset + /// + /// Optional charset + [DataMember(Name = "charset", EmitDefaultValue = true)] + public string Charset { get; set; } + + /// + /// Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. + /// + /// Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. + /// + /// Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. + [DataMember(Name = "templateVariables", EmitDefaultValue = true)] + public Dictionary TemplateVariables { get; set; } + + /// + /// Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. + /// + /// Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. + [DataMember(Name = "template", EmitDefaultValue = true)] + public Guid? Template { get; set; } + + /// + /// Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name <inbox@address.com>` if the inbox has a name. + /// + /// Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name <inbox@address.com>` if the inbox has a name. + [DataMember(Name = "useInboxName", EmitDefaultValue = true)] + public bool? UseInboxName { get; set; } + + /// + /// Add tracking pixel to email + /// + /// Add tracking pixel to email + [DataMember(Name = "addTrackingPixel", EmitDefaultValue = true)] + public bool? AddTrackingPixel { get; set; } + + /// + /// Filter recipients to remove any bounced recipients from to, bcc, and cc before sending + /// + /// Filter recipients to remove any bounced recipients from to, bcc, and cc before sending + [DataMember(Name = "filterBouncedRecipients", EmitDefaultValue = true)] + public bool? FilterBouncedRecipients { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SendEmailOptions {\n"); + sb.Append(" ToContacts: ").Append(ToContacts).Append("\n"); + sb.Append(" ToGroup: ").Append(ToGroup).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" Html: ").Append(Html).Append("\n"); + sb.Append(" IsHTML: ").Append(IsHTML).Append("\n"); + sb.Append(" Charset: ").Append(Charset).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" TemplateVariables: ").Append(TemplateVariables).Append("\n"); + sb.Append(" Template: ").Append(Template).Append("\n"); + sb.Append(" SendStrategy: ").Append(SendStrategy).Append("\n"); + sb.Append(" UseInboxName: ").Append(UseInboxName).Append("\n"); + sb.Append(" AddTrackingPixel: ").Append(AddTrackingPixel).Append("\n"); + sb.Append(" FilterBouncedRecipients: ").Append(FilterBouncedRecipients).Append("\n"); + sb.Append(" ValidateEmailAddresses: ").Append(ValidateEmailAddresses).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendEmailOptions); + } + + /// + /// Returns true if SendEmailOptions instances are equal + /// + /// Instance of SendEmailOptions to be compared + /// Boolean + public bool Equals(SendEmailOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.ToContacts == input.ToContacts || + this.ToContacts != null && + input.ToContacts != null && + this.ToContacts.SequenceEqual(input.ToContacts) + ) && + ( + this.ToGroup == input.ToGroup || + (this.ToGroup != null && + this.ToGroup.Equals(input.ToGroup)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.Html == input.Html || + (this.Html != null && + this.Html.Equals(input.Html)) + ) && + ( + this.IsHTML == input.IsHTML || + (this.IsHTML != null && + this.IsHTML.Equals(input.IsHTML)) + ) && + ( + this.Charset == input.Charset || + (this.Charset != null && + this.Charset.Equals(input.Charset)) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.TemplateVariables == input.TemplateVariables || + this.TemplateVariables != null && + input.TemplateVariables != null && + this.TemplateVariables.SequenceEqual(input.TemplateVariables) + ) && + ( + this.Template == input.Template || + (this.Template != null && + this.Template.Equals(input.Template)) + ) && + ( + this.SendStrategy == input.SendStrategy || + this.SendStrategy.Equals(input.SendStrategy) + ) && + ( + this.UseInboxName == input.UseInboxName || + (this.UseInboxName != null && + this.UseInboxName.Equals(input.UseInboxName)) + ) && + ( + this.AddTrackingPixel == input.AddTrackingPixel || + (this.AddTrackingPixel != null && + this.AddTrackingPixel.Equals(input.AddTrackingPixel)) + ) && + ( + this.FilterBouncedRecipients == input.FilterBouncedRecipients || + (this.FilterBouncedRecipients != null && + this.FilterBouncedRecipients.Equals(input.FilterBouncedRecipients)) + ) && + ( + this.ValidateEmailAddresses == input.ValidateEmailAddresses || + this.ValidateEmailAddresses.Equals(input.ValidateEmailAddresses) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ToContacts != null) + { + hashCode = (hashCode * 59) + this.ToContacts.GetHashCode(); + } + if (this.ToGroup != null) + { + hashCode = (hashCode * 59) + this.ToGroup.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.ReplyTo != null) + { + hashCode = (hashCode * 59) + this.ReplyTo.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + if (this.Html != null) + { + hashCode = (hashCode * 59) + this.Html.GetHashCode(); + } + if (this.IsHTML != null) + { + hashCode = (hashCode * 59) + this.IsHTML.GetHashCode(); + } + if (this.Charset != null) + { + hashCode = (hashCode * 59) + this.Charset.GetHashCode(); + } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.TemplateVariables != null) + { + hashCode = (hashCode * 59) + this.TemplateVariables.GetHashCode(); + } + if (this.Template != null) + { + hashCode = (hashCode * 59) + this.Template.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SendStrategy.GetHashCode(); + if (this.UseInboxName != null) + { + hashCode = (hashCode * 59) + this.UseInboxName.GetHashCode(); + } + if (this.AddTrackingPixel != null) + { + hashCode = (hashCode * 59) + this.AddTrackingPixel.GetHashCode(); + } + if (this.FilterBouncedRecipients != null) + { + hashCode = (hashCode * 59) + this.FilterBouncedRecipients.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ValidateEmailAddresses.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SendSMTPEnvelopeOptions.cs b/src/mailslurp/Model/SendSMTPEnvelopeOptions.cs new file mode 100644 index 00000000..65a7d08c --- /dev/null +++ b/src/mailslurp/Model/SendSMTPEnvelopeOptions.cs @@ -0,0 +1,186 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for the email envelope + /// + [DataContract(Name = "SendSMTPEnvelopeOptions")] + public partial class SendSMTPEnvelopeOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSMTPEnvelopeOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// rcptTo (required). + /// mailFrom (required). + /// data (required). + public SendSMTPEnvelopeOptions(List rcptTo = default(List), string mailFrom = default(string), string data = default(string)) + { + // to ensure "rcptTo" is required (not null) + if (rcptTo == null) + { + throw new ArgumentNullException("rcptTo is a required property for SendSMTPEnvelopeOptions and cannot be null"); + } + this.RcptTo = rcptTo; + // to ensure "mailFrom" is required (not null) + if (mailFrom == null) + { + throw new ArgumentNullException("mailFrom is a required property for SendSMTPEnvelopeOptions and cannot be null"); + } + this.MailFrom = mailFrom; + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for SendSMTPEnvelopeOptions and cannot be null"); + } + this.Data = data; + } + + /// + /// Gets or Sets RcptTo + /// + [DataMember(Name = "rcptTo", IsRequired = true, EmitDefaultValue = true)] + public List RcptTo { get; set; } + + /// + /// Gets or Sets MailFrom + /// + [DataMember(Name = "mailFrom", IsRequired = true, EmitDefaultValue = true)] + public string MailFrom { get; set; } + + /// + /// Gets or Sets Data + /// + [DataMember(Name = "data", IsRequired = true, EmitDefaultValue = true)] + public string Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SendSMTPEnvelopeOptions {\n"); + sb.Append(" RcptTo: ").Append(RcptTo).Append("\n"); + sb.Append(" MailFrom: ").Append(MailFrom).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSMTPEnvelopeOptions); + } + + /// + /// Returns true if SendSMTPEnvelopeOptions instances are equal + /// + /// Instance of SendSMTPEnvelopeOptions to be compared + /// Boolean + public bool Equals(SendSMTPEnvelopeOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.RcptTo == input.RcptTo || + this.RcptTo != null && + input.RcptTo != null && + this.RcptTo.SequenceEqual(input.RcptTo) + ) && + ( + this.MailFrom == input.MailFrom || + (this.MailFrom != null && + this.MailFrom.Equals(input.MailFrom)) + ) && + ( + this.Data == input.Data || + (this.Data != null && + this.Data.Equals(input.Data)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RcptTo != null) + { + hashCode = (hashCode * 59) + this.RcptTo.GetHashCode(); + } + if (this.MailFrom != null) + { + hashCode = (hashCode * 59) + this.MailFrom.GetHashCode(); + } + if (this.Data != null) + { + hashCode = (hashCode * 59) + this.Data.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SendWithQueueResult.cs b/src/mailslurp/Model/SendWithQueueResult.cs new file mode 100644 index 00000000..bd3d9c2e --- /dev/null +++ b/src/mailslurp/Model/SendWithQueueResult.cs @@ -0,0 +1,297 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Collection of items + /// + [DataContract(Name = "SendWithQueueResult")] + public partial class SendWithQueueResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendWithQueueResult() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// subject. + /// inboxId. + /// headerId (required). + /// delivered (required). + /// exceptionName. + /// message. + /// createdAt (required). + /// updatedAt (required). + public SendWithQueueResult(Guid id = default(Guid), Guid userId = default(Guid), string subject = default(string), Guid inboxId = default(Guid), string headerId = default(string), bool delivered = default(bool), string exceptionName = default(string), string message = default(string), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + // to ensure "headerId" is required (not null) + if (headerId == null) + { + throw new ArgumentNullException("headerId is a required property for SendWithQueueResult and cannot be null"); + } + this.HeaderId = headerId; + this.Delivered = delivered; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Subject = subject; + this.InboxId = inboxId; + this.ExceptionName = exceptionName; + this.Message = message; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = false)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets HeaderId + /// + [DataMember(Name = "headerId", IsRequired = true, EmitDefaultValue = true)] + public string HeaderId { get; set; } + + /// + /// Gets or Sets Delivered + /// + [DataMember(Name = "delivered", IsRequired = true, EmitDefaultValue = true)] + public bool Delivered { get; set; } + + /// + /// Gets or Sets ExceptionName + /// + [DataMember(Name = "exceptionName", EmitDefaultValue = false)] + public string ExceptionName { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SendWithQueueResult {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" HeaderId: ").Append(HeaderId).Append("\n"); + sb.Append(" Delivered: ").Append(Delivered).Append("\n"); + sb.Append(" ExceptionName: ").Append(ExceptionName).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendWithQueueResult); + } + + /// + /// Returns true if SendWithQueueResult instances are equal + /// + /// Instance of SendWithQueueResult to be compared + /// Boolean + public bool Equals(SendWithQueueResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.HeaderId == input.HeaderId || + (this.HeaderId != null && + this.HeaderId.Equals(input.HeaderId)) + ) && + ( + this.Delivered == input.Delivered || + this.Delivered.Equals(input.Delivered) + ) && + ( + this.ExceptionName == input.ExceptionName || + (this.ExceptionName != null && + this.ExceptionName.Equals(input.ExceptionName)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.HeaderId != null) + { + hashCode = (hashCode * 59) + this.HeaderId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Delivered.GetHashCode(); + if (this.ExceptionName != null) + { + hashCode = (hashCode * 59) + this.ExceptionName.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/Sender.cs b/src/mailslurp/Model/Sender.cs new file mode 100644 index 00000000..673ba5e8 --- /dev/null +++ b/src/mailslurp/Model/Sender.cs @@ -0,0 +1,180 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Sender object containing from email address and from personal name if provided in address + /// + [DataContract(Name = "Sender")] + public partial class Sender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Sender() { } + /// + /// Initializes a new instance of the class. + /// + /// rawValue (required). + /// emailAddress (required). + /// name. + public Sender(string rawValue = default(string), string emailAddress = default(string), string name = default(string)) + { + // to ensure "rawValue" is required (not null) + if (rawValue == null) + { + throw new ArgumentNullException("rawValue is a required property for Sender and cannot be null"); + } + this.RawValue = rawValue; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for Sender and cannot be null"); + } + this.EmailAddress = emailAddress; + this.Name = name; + } + + /// + /// Gets or Sets RawValue + /// + [DataMember(Name = "rawValue", IsRequired = true, EmitDefaultValue = true)] + public string RawValue { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Sender {\n"); + sb.Append(" RawValue: ").Append(RawValue).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Sender); + } + + /// + /// Returns true if Sender instances are equal + /// + /// Instance of Sender to be compared + /// Boolean + public bool Equals(Sender input) + { + if (input == null) + { + return false; + } + return + ( + this.RawValue == input.RawValue || + (this.RawValue != null && + this.RawValue.Equals(input.RawValue)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RawValue != null) + { + hashCode = (hashCode * 59) + this.RawValue.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SentEmailDto.cs b/src/mailslurp/Model/SentEmailDto.cs new file mode 100644 index 00000000..54ea3c97 --- /dev/null +++ b/src/mailslurp/Model/SentEmailDto.cs @@ -0,0 +1,579 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Sent email details + /// + [DataContract(Name = "SentEmailDto")] + public partial class SentEmailDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SentEmailDto() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of sent email (required). + /// User ID (required). + /// Inbox ID email was sent from (required). + /// Domain ID. + /// Recipients email was sent to. + /// Sent from address. + /// replyTo. + /// cc. + /// bcc. + /// Array of IDs of attachments that were sent with this email. + /// subject. + /// MD5 Hash. + /// Sent email body. + /// toContacts. + /// toGroup. + /// charset. + /// isHTML. + /// sentAt (required). + /// pixelIds. + /// messageId. + /// messageIds. + /// virtualSend. + /// templateId. + /// templateVariables. + /// html. + public SentEmailDto(Guid id = default(Guid), Guid userId = default(Guid), Guid inboxId = default(Guid), Guid? domainId = default(Guid?), List to = default(List), string from = default(string), string replyTo = default(string), List cc = default(List), List bcc = default(List), List attachments = default(List), string subject = default(string), string bodyMD5Hash = default(string), string body = default(string), List toContacts = default(List), Guid? toGroup = default(Guid?), string charset = default(string), bool? isHTML = default(bool?), DateTime sentAt = default(DateTime), List pixelIds = default(List), string messageId = default(string), List messageIds = default(List), bool? virtualSend = default(bool?), Guid? templateId = default(Guid?), Dictionary templateVariables = default(Dictionary), bool html = default(bool)) + { + this.Id = id; + this.UserId = userId; + this.InboxId = inboxId; + this.SentAt = sentAt; + this.DomainId = domainId; + this.To = to; + this.From = from; + this.ReplyTo = replyTo; + this.Cc = cc; + this.Bcc = bcc; + this.Attachments = attachments; + this.Subject = subject; + this.BodyMD5Hash = bodyMD5Hash; + this.Body = body; + this.ToContacts = toContacts; + this.ToGroup = toGroup; + this.Charset = charset; + this.IsHTML = isHTML; + this.PixelIds = pixelIds; + this.MessageId = messageId; + this.MessageIds = messageIds; + this.VirtualSend = virtualSend; + this.TemplateId = templateId; + this.TemplateVariables = templateVariables; + this.Html = html; + } + + /// + /// ID of sent email + /// + /// ID of sent email + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// User ID + /// + /// User ID + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Inbox ID email was sent from + /// + /// Inbox ID email was sent from + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Domain ID + /// + /// Domain ID + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// Recipients email was sent to + /// + /// Recipients email was sent to + [DataMember(Name = "to", EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Sent from address + /// + /// Sent from address + [DataMember(Name = "from", EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Gets or Sets ReplyTo + /// + [DataMember(Name = "replyTo", EmitDefaultValue = true)] + public string ReplyTo { get; set; } + + /// + /// Gets or Sets Cc + /// + [DataMember(Name = "cc", EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// Gets or Sets Bcc + /// + [DataMember(Name = "bcc", EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// Array of IDs of attachments that were sent with this email + /// + /// Array of IDs of attachments that were sent with this email + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// MD5 Hash + /// + /// MD5 Hash + [DataMember(Name = "bodyMD5Hash", EmitDefaultValue = true)] + public string BodyMD5Hash { get; set; } + + /// + /// Sent email body + /// + /// Sent email body + [DataMember(Name = "body", EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Gets or Sets ToContacts + /// + [DataMember(Name = "toContacts", EmitDefaultValue = true)] + public List ToContacts { get; set; } + + /// + /// Gets or Sets ToGroup + /// + [DataMember(Name = "toGroup", EmitDefaultValue = true)] + public Guid? ToGroup { get; set; } + + /// + /// Gets or Sets Charset + /// + [DataMember(Name = "charset", EmitDefaultValue = true)] + public string Charset { get; set; } + + /// + /// Gets or Sets IsHTML + /// + [DataMember(Name = "isHTML", EmitDefaultValue = true)] + public bool? IsHTML { get; set; } + + /// + /// Gets or Sets SentAt + /// + [DataMember(Name = "sentAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime SentAt { get; set; } + + /// + /// Gets or Sets PixelIds + /// + [DataMember(Name = "pixelIds", EmitDefaultValue = true)] + public List PixelIds { get; set; } + + /// + /// Gets or Sets MessageId + /// + [DataMember(Name = "messageId", EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// Gets or Sets MessageIds + /// + [DataMember(Name = "messageIds", EmitDefaultValue = true)] + public List MessageIds { get; set; } + + /// + /// Gets or Sets VirtualSend + /// + [DataMember(Name = "virtualSend", EmitDefaultValue = true)] + public bool? VirtualSend { get; set; } + + /// + /// Gets or Sets TemplateId + /// + [DataMember(Name = "templateId", EmitDefaultValue = true)] + public Guid? TemplateId { get; set; } + + /// + /// Gets or Sets TemplateVariables + /// + [DataMember(Name = "templateVariables", EmitDefaultValue = true)] + public Dictionary TemplateVariables { get; set; } + + /// + /// Gets or Sets Html + /// + [DataMember(Name = "html", EmitDefaultValue = true)] + public bool Html { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SentEmailDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" BodyMD5Hash: ").Append(BodyMD5Hash).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" ToContacts: ").Append(ToContacts).Append("\n"); + sb.Append(" ToGroup: ").Append(ToGroup).Append("\n"); + sb.Append(" Charset: ").Append(Charset).Append("\n"); + sb.Append(" IsHTML: ").Append(IsHTML).Append("\n"); + sb.Append(" SentAt: ").Append(SentAt).Append("\n"); + sb.Append(" PixelIds: ").Append(PixelIds).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" MessageIds: ").Append(MessageIds).Append("\n"); + sb.Append(" VirtualSend: ").Append(VirtualSend).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append(" TemplateVariables: ").Append(TemplateVariables).Append("\n"); + sb.Append(" Html: ").Append(Html).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SentEmailDto); + } + + /// + /// Returns true if SentEmailDto instances are equal + /// + /// Instance of SentEmailDto to be compared + /// Boolean + public bool Equals(SentEmailDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.BodyMD5Hash == input.BodyMD5Hash || + (this.BodyMD5Hash != null && + this.BodyMD5Hash.Equals(input.BodyMD5Hash)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.ToContacts == input.ToContacts || + this.ToContacts != null && + input.ToContacts != null && + this.ToContacts.SequenceEqual(input.ToContacts) + ) && + ( + this.ToGroup == input.ToGroup || + (this.ToGroup != null && + this.ToGroup.Equals(input.ToGroup)) + ) && + ( + this.Charset == input.Charset || + (this.Charset != null && + this.Charset.Equals(input.Charset)) + ) && + ( + this.IsHTML == input.IsHTML || + (this.IsHTML != null && + this.IsHTML.Equals(input.IsHTML)) + ) && + ( + this.SentAt == input.SentAt || + (this.SentAt != null && + this.SentAt.Equals(input.SentAt)) + ) && + ( + this.PixelIds == input.PixelIds || + this.PixelIds != null && + input.PixelIds != null && + this.PixelIds.SequenceEqual(input.PixelIds) + ) && + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.MessageIds == input.MessageIds || + this.MessageIds != null && + input.MessageIds != null && + this.MessageIds.SequenceEqual(input.MessageIds) + ) && + ( + this.VirtualSend == input.VirtualSend || + (this.VirtualSend != null && + this.VirtualSend.Equals(input.VirtualSend)) + ) && + ( + this.TemplateId == input.TemplateId || + (this.TemplateId != null && + this.TemplateId.Equals(input.TemplateId)) + ) && + ( + this.TemplateVariables == input.TemplateVariables || + this.TemplateVariables != null && + input.TemplateVariables != null && + this.TemplateVariables.SequenceEqual(input.TemplateVariables) + ) && + ( + this.Html == input.Html || + this.Html.Equals(input.Html) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.ReplyTo != null) + { + hashCode = (hashCode * 59) + this.ReplyTo.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.BodyMD5Hash != null) + { + hashCode = (hashCode * 59) + this.BodyMD5Hash.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + if (this.ToContacts != null) + { + hashCode = (hashCode * 59) + this.ToContacts.GetHashCode(); + } + if (this.ToGroup != null) + { + hashCode = (hashCode * 59) + this.ToGroup.GetHashCode(); + } + if (this.Charset != null) + { + hashCode = (hashCode * 59) + this.Charset.GetHashCode(); + } + if (this.IsHTML != null) + { + hashCode = (hashCode * 59) + this.IsHTML.GetHashCode(); + } + if (this.SentAt != null) + { + hashCode = (hashCode * 59) + this.SentAt.GetHashCode(); + } + if (this.PixelIds != null) + { + hashCode = (hashCode * 59) + this.PixelIds.GetHashCode(); + } + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.MessageIds != null) + { + hashCode = (hashCode * 59) + this.MessageIds.GetHashCode(); + } + if (this.VirtualSend != null) + { + hashCode = (hashCode * 59) + this.VirtualSend.GetHashCode(); + } + if (this.TemplateId != null) + { + hashCode = (hashCode * 59) + this.TemplateId.GetHashCode(); + } + if (this.TemplateVariables != null) + { + hashCode = (hashCode * 59) + this.TemplateVariables.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Html.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SentEmailProjection.cs b/src/mailslurp/Model/SentEmailProjection.cs new file mode 100644 index 00000000..03352fa9 --- /dev/null +++ b/src/mailslurp/Model/SentEmailProjection.cs @@ -0,0 +1,352 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Collection of items + /// + [DataContract(Name = "SentEmailProjection")] + public partial class SentEmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SentEmailProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// from. + /// userId (required). + /// subject. + /// inboxId (required). + /// attachments (required). + /// createdAt (required). + /// to (required). + /// bcc (required). + /// cc (required). + /// bodyMD5Hash. + /// virtualSend (required). + public SentEmailProjection(Guid id = default(Guid), string from = default(string), Guid userId = default(Guid), string subject = default(string), Guid inboxId = default(Guid), List attachments = default(List), DateTime createdAt = default(DateTime), List to = default(List), List bcc = default(List), List cc = default(List), string bodyMD5Hash = default(string), bool virtualSend = default(bool)) + { + this.Id = id; + this.UserId = userId; + this.InboxId = inboxId; + // to ensure "attachments" is required (not null) + if (attachments == null) + { + throw new ArgumentNullException("attachments is a required property for SentEmailProjection and cannot be null"); + } + this.Attachments = attachments; + this.CreatedAt = createdAt; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for SentEmailProjection and cannot be null"); + } + this.To = to; + // to ensure "bcc" is required (not null) + if (bcc == null) + { + throw new ArgumentNullException("bcc is a required property for SentEmailProjection and cannot be null"); + } + this.Bcc = bcc; + // to ensure "cc" is required (not null) + if (cc == null) + { + throw new ArgumentNullException("cc is a required property for SentEmailProjection and cannot be null"); + } + this.Cc = cc; + this.VirtualSend = virtualSend; + this.From = from; + this.Subject = subject; + this.BodyMD5Hash = bodyMD5Hash; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets From + /// + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets Attachments + /// + [DataMember(Name = "attachments", IsRequired = true, EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets To + /// + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Gets or Sets Bcc + /// + [DataMember(Name = "bcc", IsRequired = true, EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// Gets or Sets Cc + /// + [DataMember(Name = "cc", IsRequired = true, EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// Gets or Sets BodyMD5Hash + /// + [DataMember(Name = "bodyMD5Hash", EmitDefaultValue = false)] + public string BodyMD5Hash { get; set; } + + /// + /// Gets or Sets VirtualSend + /// + [DataMember(Name = "virtualSend", IsRequired = true, EmitDefaultValue = true)] + public bool VirtualSend { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SentEmailProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" BodyMD5Hash: ").Append(BodyMD5Hash).Append("\n"); + sb.Append(" VirtualSend: ").Append(VirtualSend).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SentEmailProjection); + } + + /// + /// Returns true if SentEmailProjection instances are equal + /// + /// Instance of SentEmailProjection to be compared + /// Boolean + public bool Equals(SentEmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.BodyMD5Hash == input.BodyMD5Hash || + (this.BodyMD5Hash != null && + this.BodyMD5Hash.Equals(input.BodyMD5Hash)) + ) && + ( + this.VirtualSend == input.VirtualSend || + this.VirtualSend.Equals(input.VirtualSend) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.BodyMD5Hash != null) + { + hashCode = (hashCode * 59) + this.BodyMD5Hash.GetHashCode(); + } + hashCode = (hashCode * 59) + this.VirtualSend.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SetInboxFavouritedOptions.cs b/src/mailslurp/Model/SetInboxFavouritedOptions.cs new file mode 100644 index 00000000..eec6473a --- /dev/null +++ b/src/mailslurp/Model/SetInboxFavouritedOptions.cs @@ -0,0 +1,131 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for setting inbox favourite state + /// + [DataContract(Name = "SetInboxFavouritedOptions")] + public partial class SetInboxFavouritedOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SetInboxFavouritedOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (required). + public SetInboxFavouritedOptions(bool state = default(bool)) + { + this.State = state; + } + + /// + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + /// + /// Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = true)] + public bool State { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SetInboxFavouritedOptions {\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SetInboxFavouritedOptions); + } + + /// + /// Returns true if SetInboxFavouritedOptions instances are equal + /// + /// Instance of SetInboxFavouritedOptions to be compared + /// Boolean + public bool Equals(SetInboxFavouritedOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.State == input.State || + this.State.Equals(input.State) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.State.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SimpleSendEmailOptions.cs b/src/mailslurp/Model/SimpleSendEmailOptions.cs new file mode 100644 index 00000000..08d34c9d --- /dev/null +++ b/src/mailslurp/Model/SimpleSendEmailOptions.cs @@ -0,0 +1,197 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Simplified send email options + /// + [DataContract(Name = "SimpleSendEmailOptions")] + public partial class SimpleSendEmailOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SimpleSendEmailOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of inbox to send from. If null an inbox will be created for sending. + /// Email address to send to (required). + /// Body of the email message. Supports HTML. + /// Subject line of the email. + public SimpleSendEmailOptions(Guid? senderId = default(Guid?), string to = default(string), string body = default(string), string subject = default(string)) + { + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for SimpleSendEmailOptions and cannot be null"); + } + this.To = to; + this.SenderId = senderId; + this.Body = body; + this.Subject = subject; + } + + /// + /// ID of inbox to send from. If null an inbox will be created for sending + /// + /// ID of inbox to send from. If null an inbox will be created for sending + [DataMember(Name = "senderId", EmitDefaultValue = true)] + public Guid? SenderId { get; set; } + + /// + /// Email address to send to + /// + /// Email address to send to + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public string To { get; set; } + + /// + /// Body of the email message. Supports HTML + /// + /// Body of the email message. Supports HTML + [DataMember(Name = "body", EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Subject line of the email + /// + /// Subject line of the email + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SimpleSendEmailOptions {\n"); + sb.Append(" SenderId: ").Append(SenderId).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SimpleSendEmailOptions); + } + + /// + /// Returns true if SimpleSendEmailOptions instances are equal + /// + /// Instance of SimpleSendEmailOptions to be compared + /// Boolean + public bool Equals(SimpleSendEmailOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.SenderId == input.SenderId || + (this.SenderId != null && + this.SenderId.Equals(input.SenderId)) + ) && + ( + this.To == input.To || + (this.To != null && + this.To.Equals(input.To)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SenderId != null) + { + hashCode = (hashCode * 59) + this.SenderId.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SmsDto.cs b/src/mailslurp/Model/SmsDto.cs new file mode 100644 index 00000000..38c76bb3 --- /dev/null +++ b/src/mailslurp/Model/SmsDto.cs @@ -0,0 +1,266 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// SmsDto + /// + [DataContract(Name = "SmsDto")] + public partial class SmsDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SmsDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// phoneNumber (required). + /// fromNumber (required). + /// body (required). + /// read (required). + /// createdAt (required). + /// updatedAt (required). + public SmsDto(Guid id = default(Guid), Guid userId = default(Guid), Guid phoneNumber = default(Guid), string fromNumber = default(string), string body = default(string), bool read = default(bool), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + this.PhoneNumber = phoneNumber; + // to ensure "fromNumber" is required (not null) + if (fromNumber == null) + { + throw new ArgumentNullException("fromNumber is a required property for SmsDto and cannot be null"); + } + this.FromNumber = fromNumber; + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for SmsDto and cannot be null"); + } + this.Body = body; + this.Read = read; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets PhoneNumber + /// + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] + public Guid PhoneNumber { get; set; } + + /// + /// Gets or Sets FromNumber + /// + [DataMember(Name = "fromNumber", IsRequired = true, EmitDefaultValue = true)] + public string FromNumber { get; set; } + + /// + /// Gets or Sets Body + /// + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Gets or Sets Read + /// + [DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)] + public bool Read { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SmsDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" FromNumber: ").Append(FromNumber).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SmsDto); + } + + /// + /// Returns true if SmsDto instances are equal + /// + /// Instance of SmsDto to be compared + /// Boolean + public bool Equals(SmsDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ) && + ( + this.FromNumber == input.FromNumber || + (this.FromNumber != null && + this.FromNumber.Equals(input.FromNumber)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.Read == input.Read || + this.Read.Equals(input.Read) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.PhoneNumber != null) + { + hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); + } + if (this.FromNumber != null) + { + hashCode = (hashCode * 59) + this.FromNumber.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Read.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SmsMatchOption.cs b/src/mailslurp/Model/SmsMatchOption.cs new file mode 100644 index 00000000..3f6227a1 --- /dev/null +++ b/src/mailslurp/Model/SmsMatchOption.cs @@ -0,0 +1,212 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for matching SMS messages in a phone number. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `BODY` should `CONTAIN` value. + /// + [DataContract(Name = "SmsMatchOption")] + public partial class SmsMatchOption : IEquatable, IValidatableObject + { + /// + /// Fields of an SMS object that can be used to filter results + /// + /// Fields of an SMS object that can be used to filter results + [JsonConverter(typeof(StringEnumConverter))] + public enum FieldEnum + { + /// + /// Enum BODY for value: BODY + /// + [EnumMember(Value = "BODY")] + BODY = 1, + + /// + /// Enum FROM for value: FROM + /// + [EnumMember(Value = "FROM")] + FROM = 2 + + } + + + /// + /// Fields of an SMS object that can be used to filter results + /// + /// Fields of an SMS object that can be used to filter results + [DataMember(Name = "field", IsRequired = true, EmitDefaultValue = true)] + public FieldEnum Field { get; set; } + /// + /// How the value of the email field specified should be compared to the value given in the match options. + /// + /// How the value of the email field specified should be compared to the value given in the match options. + [JsonConverter(typeof(StringEnumConverter))] + public enum ShouldEnum + { + /// + /// Enum CONTAIN for value: CONTAIN + /// + [EnumMember(Value = "CONTAIN")] + CONTAIN = 1, + + /// + /// Enum EQUAL for value: EQUAL + /// + [EnumMember(Value = "EQUAL")] + EQUAL = 2 + + } + + + /// + /// How the value of the email field specified should be compared to the value given in the match options. + /// + /// How the value of the email field specified should be compared to the value given in the match options. + [DataMember(Name = "should", IsRequired = true, EmitDefaultValue = true)] + public ShouldEnum Should { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SmsMatchOption() { } + /// + /// Initializes a new instance of the class. + /// + /// Fields of an SMS object that can be used to filter results (required). + /// How the value of the email field specified should be compared to the value given in the match options. (required). + /// The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. (required). + public SmsMatchOption(FieldEnum field = default(FieldEnum), ShouldEnum should = default(ShouldEnum), string value = default(string)) + { + this.Field = field; + this.Should = should; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for SmsMatchOption and cannot be null"); + } + this.Value = value; + } + + /// + /// The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. + /// + /// The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SmsMatchOption {\n"); + sb.Append(" Field: ").Append(Field).Append("\n"); + sb.Append(" Should: ").Append(Should).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SmsMatchOption); + } + + /// + /// Returns true if SmsMatchOption instances are equal + /// + /// Instance of SmsMatchOption to be compared + /// Boolean + public bool Equals(SmsMatchOption input) + { + if (input == null) + { + return false; + } + return + ( + this.Field == input.Field || + this.Field.Equals(input.Field) + ) && + ( + this.Should == input.Should || + this.Should.Equals(input.Should) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Field.GetHashCode(); + hashCode = (hashCode * 59) + this.Should.GetHashCode(); + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SmsPreview.cs b/src/mailslurp/Model/SmsPreview.cs new file mode 100644 index 00000000..03f85218 --- /dev/null +++ b/src/mailslurp/Model/SmsPreview.cs @@ -0,0 +1,234 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// SmsPreview + /// + [DataContract(Name = "SmsPreview")] + public partial class SmsPreview : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SmsPreview() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// userId (required). + /// body (required). + /// phoneNumber (required). + /// fromNumber (required). + /// createdAt (required). + public SmsPreview(Guid id = default(Guid), Guid userId = default(Guid), string body = default(string), Guid phoneNumber = default(Guid), string fromNumber = default(string), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for SmsPreview and cannot be null"); + } + this.Body = body; + this.PhoneNumber = phoneNumber; + // to ensure "fromNumber" is required (not null) + if (fromNumber == null) + { + throw new ArgumentNullException("fromNumber is a required property for SmsPreview and cannot be null"); + } + this.FromNumber = fromNumber; + this.CreatedAt = createdAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets Body + /// + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Gets or Sets PhoneNumber + /// + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] + public Guid PhoneNumber { get; set; } + + /// + /// Gets or Sets FromNumber + /// + [DataMember(Name = "fromNumber", IsRequired = true, EmitDefaultValue = true)] + public string FromNumber { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SmsPreview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" FromNumber: ").Append(FromNumber).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SmsPreview); + } + + /// + /// Returns true if SmsPreview instances are equal + /// + /// Instance of SmsPreview to be compared + /// Boolean + public bool Equals(SmsPreview input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ) && + ( + this.FromNumber == input.FromNumber || + (this.FromNumber != null && + this.FromNumber.Equals(input.FromNumber)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + if (this.PhoneNumber != null) + { + hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); + } + if (this.FromNumber != null) + { + hashCode = (hashCode * 59) + this.FromNumber.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/SmsProjection.cs b/src/mailslurp/Model/SmsProjection.cs new file mode 100644 index 00000000..50072175 --- /dev/null +++ b/src/mailslurp/Model/SmsProjection.cs @@ -0,0 +1,248 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// SMS projection + /// + [DataContract(Name = "SmsProjection")] + public partial class SmsProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SmsProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// body (required). + /// userId (required). + /// createdAt (required). + /// phoneNumber (required). + /// fromNumber (required). + /// read (required). + public SmsProjection(Guid id = default(Guid), string body = default(string), Guid userId = default(Guid), DateTime createdAt = default(DateTime), Guid phoneNumber = default(Guid), string fromNumber = default(string), bool read = default(bool)) + { + this.Id = id; + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for SmsProjection and cannot be null"); + } + this.Body = body; + this.UserId = userId; + this.CreatedAt = createdAt; + this.PhoneNumber = phoneNumber; + // to ensure "fromNumber" is required (not null) + if (fromNumber == null) + { + throw new ArgumentNullException("fromNumber is a required property for SmsProjection and cannot be null"); + } + this.FromNumber = fromNumber; + this.Read = read; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Body + /// + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets PhoneNumber + /// + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] + public Guid PhoneNumber { get; set; } + + /// + /// Gets or Sets FromNumber + /// + [DataMember(Name = "fromNumber", IsRequired = true, EmitDefaultValue = true)] + public string FromNumber { get; set; } + + /// + /// Gets or Sets Read + /// + [DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)] + public bool Read { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SmsProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" FromNumber: ").Append(FromNumber).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SmsProjection); + } + + /// + /// Returns true if SmsProjection instances are equal + /// + /// Instance of SmsProjection to be compared + /// Boolean + public bool Equals(SmsProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ) && + ( + this.FromNumber == input.FromNumber || + (this.FromNumber != null && + this.FromNumber.Equals(input.FromNumber)) + ) && + ( + this.Read == input.Read || + this.Read.Equals(input.Read) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.PhoneNumber != null) + { + hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); + } + if (this.FromNumber != null) + { + hashCode = (hashCode * 59) + this.FromNumber.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Read.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/Sort.cs b/src/mailslurp/Model/Sort.cs new file mode 100644 index 00000000..b1e408d6 --- /dev/null +++ b/src/mailslurp/Model/Sort.cs @@ -0,0 +1,153 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Sort + /// + [DataContract(Name = "Sort")] + public partial class Sort : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// empty. + /// sorted. + /// unsorted. + public Sort(bool empty = default(bool), bool sorted = default(bool), bool unsorted = default(bool)) + { + this.Empty = empty; + this.Sorted = sorted; + this.Unsorted = unsorted; + } + + /// + /// Gets or Sets Empty + /// + [DataMember(Name = "empty", EmitDefaultValue = true)] + public bool Empty { get; set; } + + /// + /// Gets or Sets Sorted + /// + [DataMember(Name = "sorted", EmitDefaultValue = true)] + public bool Sorted { get; set; } + + /// + /// Gets or Sets Unsorted + /// + [DataMember(Name = "unsorted", EmitDefaultValue = true)] + public bool Unsorted { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Sort {\n"); + sb.Append(" Empty: ").Append(Empty).Append("\n"); + sb.Append(" Sorted: ").Append(Sorted).Append("\n"); + sb.Append(" Unsorted: ").Append(Unsorted).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Sort); + } + + /// + /// Returns true if Sort instances are equal + /// + /// Instance of Sort to be compared + /// Boolean + public bool Equals(Sort input) + { + if (input == null) + { + return false; + } + return + ( + this.Empty == input.Empty || + this.Empty.Equals(input.Empty) + ) && + ( + this.Sorted == input.Sorted || + this.Sorted.Equals(input.Sorted) + ) && + ( + this.Unsorted == input.Unsorted || + this.Unsorted.Equals(input.Unsorted) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Empty.GetHashCode(); + hashCode = (hashCode * 59) + this.Sorted.GetHashCode(); + hashCode = (hashCode * 59) + this.Unsorted.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TemplateDto.cs b/src/mailslurp/Model/TemplateDto.cs new file mode 100644 index 00000000..3eac3b37 --- /dev/null +++ b/src/mailslurp/Model/TemplateDto.cs @@ -0,0 +1,227 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email template + /// + [DataContract(Name = "TemplateDto")] + public partial class TemplateDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateDto() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of template (required). + /// Template name (required). + /// Variables available in template that can be replaced with values (required). + /// Content of the template (required). + /// Created at time (required). + public TemplateDto(Guid id = default(Guid), string name = default(string), List variables = default(List), string content = default(string), DateTime createdAt = default(DateTime)) + { + this.Id = id; + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for TemplateDto and cannot be null"); + } + this.Name = name; + // to ensure "variables" is required (not null) + if (variables == null) + { + throw new ArgumentNullException("variables is a required property for TemplateDto and cannot be null"); + } + this.Variables = variables; + // to ensure "content" is required (not null) + if (content == null) + { + throw new ArgumentNullException("content is a required property for TemplateDto and cannot be null"); + } + this.Content = content; + this.CreatedAt = createdAt; + } + + /// + /// ID of template + /// + /// ID of template + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Template name + /// + /// Template name + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Variables available in template that can be replaced with values + /// + /// Variables available in template that can be replaced with values + [DataMember(Name = "variables", IsRequired = true, EmitDefaultValue = true)] + public List Variables { get; set; } + + /// + /// Content of the template + /// + /// Content of the template + [DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)] + public string Content { get; set; } + + /// + /// Created at time + /// + /// Created at time + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TemplateDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Variables: ").Append(Variables).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TemplateDto); + } + + /// + /// Returns true if TemplateDto instances are equal + /// + /// Instance of TemplateDto to be compared + /// Boolean + public bool Equals(TemplateDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Variables == input.Variables || + this.Variables != null && + input.Variables != null && + this.Variables.SequenceEqual(input.Variables) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Variables != null) + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } + if (this.Content != null) + { + hashCode = (hashCode * 59) + this.Content.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TemplatePreview.cs b/src/mailslurp/Model/TemplatePreview.cs new file mode 100644 index 00000000..ca1a998e --- /dev/null +++ b/src/mailslurp/Model/TemplatePreview.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// TemplatePreview + /// + [DataContract(Name = "TemplatePreview")] + public partial class TemplatePreview : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplatePreview() { } + /// + /// Initializes a new instance of the class. + /// + /// preview (required). + public TemplatePreview(string preview = default(string)) + { + // to ensure "preview" is required (not null) + if (preview == null) + { + throw new ArgumentNullException("preview is a required property for TemplatePreview and cannot be null"); + } + this.Preview = preview; + } + + /// + /// Gets or Sets Preview + /// + [DataMember(Name = "preview", IsRequired = true, EmitDefaultValue = true)] + public string Preview { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TemplatePreview {\n"); + sb.Append(" Preview: ").Append(Preview).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TemplatePreview); + } + + /// + /// Returns true if TemplatePreview instances are equal + /// + /// Instance of TemplatePreview to be compared + /// Boolean + public bool Equals(TemplatePreview input) + { + if (input == null) + { + return false; + } + return + ( + this.Preview == input.Preview || + (this.Preview != null && + this.Preview.Equals(input.Preview)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Preview != null) + { + hashCode = (hashCode * 59) + this.Preview.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TemplateProjection.cs b/src/mailslurp/Model/TemplateProjection.cs new file mode 100644 index 00000000..df27afda --- /dev/null +++ b/src/mailslurp/Model/TemplateProjection.cs @@ -0,0 +1,217 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Email template data + /// + [DataContract(Name = "TemplateProjection")] + public partial class TemplateProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// id (required). + /// createdAt (required). + /// updatedAt (required). + /// variables (required). + public TemplateProjection(string name = default(string), Guid id = default(Guid), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), List variables = default(List)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for TemplateProjection and cannot be null"); + } + this.Name = name; + this.Id = id; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + // to ensure "variables" is required (not null) + if (variables == null) + { + throw new ArgumentNullException("variables is a required property for TemplateProjection and cannot be null"); + } + this.Variables = variables; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Gets or Sets Variables + /// + [DataMember(Name = "variables", IsRequired = true, EmitDefaultValue = true)] + public List Variables { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TemplateProjection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Variables: ").Append(Variables).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TemplateProjection); + } + + /// + /// Returns true if TemplateProjection instances are equal + /// + /// Instance of TemplateProjection to be compared + /// Boolean + public bool Equals(TemplateProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.Variables == input.Variables || + this.Variables != null && + input.Variables != null && + this.Variables.SequenceEqual(input.Variables) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + if (this.Variables != null) + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TemplateVariable.cs b/src/mailslurp/Model/TemplateVariable.cs new file mode 100644 index 00000000..628c44eb --- /dev/null +++ b/src/mailslurp/Model/TemplateVariable.cs @@ -0,0 +1,170 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Variable for use with email template + /// + [DataContract(Name = "TemplateVariable")] + public partial class TemplateVariable : IEquatable, IValidatableObject + { + /// + /// The type of variable + /// + /// The type of variable + [JsonConverter(typeof(StringEnumConverter))] + public enum VariableTypeEnum + { + /// + /// Enum STRING for value: STRING + /// + [EnumMember(Value = "STRING")] + STRING = 1 + + } + + + /// + /// The type of variable + /// + /// The type of variable + [DataMember(Name = "variableType", IsRequired = true, EmitDefaultValue = true)] + public VariableTypeEnum VariableType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateVariable() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of variable. This can be used in a template as {{name}} (required). + /// The type of variable (required). + public TemplateVariable(string name = default(string), VariableTypeEnum variableType = default(VariableTypeEnum)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for TemplateVariable and cannot be null"); + } + this.Name = name; + this.VariableType = variableType; + } + + /// + /// Name of variable. This can be used in a template as {{name}} + /// + /// Name of variable. This can be used in a template as {{name}} + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TemplateVariable {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" VariableType: ").Append(VariableType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TemplateVariable); + } + + /// + /// Returns true if TemplateVariable instances are equal + /// + /// Instance of TemplateVariable to be compared + /// Boolean + public bool Equals(TemplateVariable input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.VariableType == input.VariableType || + this.VariableType.Equals(input.VariableType) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + hashCode = (hashCode * 59) + this.VariableType.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TestNewInboxForwarderOptions.cs b/src/mailslurp/Model/TestNewInboxForwarderOptions.cs new file mode 100644 index 00000000..d17c379c --- /dev/null +++ b/src/mailslurp/Model/TestNewInboxForwarderOptions.cs @@ -0,0 +1,162 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for testing new inbox forwarder rules + /// + [DataContract(Name = "TestNewInboxForwarderOptions")] + public partial class TestNewInboxForwarderOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TestNewInboxForwarderOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// inboxForwarderTestOptions (required). + /// createInboxForwarderOptions (required). + public TestNewInboxForwarderOptions(InboxForwarderTestOptions inboxForwarderTestOptions = default(InboxForwarderTestOptions), CreateInboxForwarderOptions createInboxForwarderOptions = default(CreateInboxForwarderOptions)) + { + // to ensure "inboxForwarderTestOptions" is required (not null) + if (inboxForwarderTestOptions == null) + { + throw new ArgumentNullException("inboxForwarderTestOptions is a required property for TestNewInboxForwarderOptions and cannot be null"); + } + this.InboxForwarderTestOptions = inboxForwarderTestOptions; + // to ensure "createInboxForwarderOptions" is required (not null) + if (createInboxForwarderOptions == null) + { + throw new ArgumentNullException("createInboxForwarderOptions is a required property for TestNewInboxForwarderOptions and cannot be null"); + } + this.CreateInboxForwarderOptions = createInboxForwarderOptions; + } + + /// + /// Gets or Sets InboxForwarderTestOptions + /// + [DataMember(Name = "inboxForwarderTestOptions", IsRequired = true, EmitDefaultValue = true)] + public InboxForwarderTestOptions InboxForwarderTestOptions { get; set; } + + /// + /// Gets or Sets CreateInboxForwarderOptions + /// + [DataMember(Name = "createInboxForwarderOptions", IsRequired = true, EmitDefaultValue = true)] + public CreateInboxForwarderOptions CreateInboxForwarderOptions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TestNewInboxForwarderOptions {\n"); + sb.Append(" InboxForwarderTestOptions: ").Append(InboxForwarderTestOptions).Append("\n"); + sb.Append(" CreateInboxForwarderOptions: ").Append(CreateInboxForwarderOptions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TestNewInboxForwarderOptions); + } + + /// + /// Returns true if TestNewInboxForwarderOptions instances are equal + /// + /// Instance of TestNewInboxForwarderOptions to be compared + /// Boolean + public bool Equals(TestNewInboxForwarderOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxForwarderTestOptions == input.InboxForwarderTestOptions || + (this.InboxForwarderTestOptions != null && + this.InboxForwarderTestOptions.Equals(input.InboxForwarderTestOptions)) + ) && + ( + this.CreateInboxForwarderOptions == input.CreateInboxForwarderOptions || + (this.CreateInboxForwarderOptions != null && + this.CreateInboxForwarderOptions.Equals(input.CreateInboxForwarderOptions)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxForwarderTestOptions != null) + { + hashCode = (hashCode * 59) + this.InboxForwarderTestOptions.GetHashCode(); + } + if (this.CreateInboxForwarderOptions != null) + { + hashCode = (hashCode * 59) + this.CreateInboxForwarderOptions.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TestNewInboxRulesetOptions.cs b/src/mailslurp/Model/TestNewInboxRulesetOptions.cs new file mode 100644 index 00000000..cba9a379 --- /dev/null +++ b/src/mailslurp/Model/TestNewInboxRulesetOptions.cs @@ -0,0 +1,162 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Test inbox ruleset options + /// + [DataContract(Name = "TestNewInboxRulesetOptions")] + public partial class TestNewInboxRulesetOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TestNewInboxRulesetOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// inboxRulesetTestOptions (required). + /// createInboxRulesetOptions (required). + public TestNewInboxRulesetOptions(InboxRulesetTestOptions inboxRulesetTestOptions = default(InboxRulesetTestOptions), CreateInboxRulesetOptions createInboxRulesetOptions = default(CreateInboxRulesetOptions)) + { + // to ensure "inboxRulesetTestOptions" is required (not null) + if (inboxRulesetTestOptions == null) + { + throw new ArgumentNullException("inboxRulesetTestOptions is a required property for TestNewInboxRulesetOptions and cannot be null"); + } + this.InboxRulesetTestOptions = inboxRulesetTestOptions; + // to ensure "createInboxRulesetOptions" is required (not null) + if (createInboxRulesetOptions == null) + { + throw new ArgumentNullException("createInboxRulesetOptions is a required property for TestNewInboxRulesetOptions and cannot be null"); + } + this.CreateInboxRulesetOptions = createInboxRulesetOptions; + } + + /// + /// Gets or Sets InboxRulesetTestOptions + /// + [DataMember(Name = "inboxRulesetTestOptions", IsRequired = true, EmitDefaultValue = true)] + public InboxRulesetTestOptions InboxRulesetTestOptions { get; set; } + + /// + /// Gets or Sets CreateInboxRulesetOptions + /// + [DataMember(Name = "createInboxRulesetOptions", IsRequired = true, EmitDefaultValue = true)] + public CreateInboxRulesetOptions CreateInboxRulesetOptions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TestNewInboxRulesetOptions {\n"); + sb.Append(" InboxRulesetTestOptions: ").Append(InboxRulesetTestOptions).Append("\n"); + sb.Append(" CreateInboxRulesetOptions: ").Append(CreateInboxRulesetOptions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TestNewInboxRulesetOptions); + } + + /// + /// Returns true if TestNewInboxRulesetOptions instances are equal + /// + /// Instance of TestNewInboxRulesetOptions to be compared + /// Boolean + public bool Equals(TestNewInboxRulesetOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxRulesetTestOptions == input.InboxRulesetTestOptions || + (this.InboxRulesetTestOptions != null && + this.InboxRulesetTestOptions.Equals(input.InboxRulesetTestOptions)) + ) && + ( + this.CreateInboxRulesetOptions == input.CreateInboxRulesetOptions || + (this.CreateInboxRulesetOptions != null && + this.CreateInboxRulesetOptions.Equals(input.CreateInboxRulesetOptions)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxRulesetTestOptions != null) + { + hashCode = (hashCode * 59) + this.InboxRulesetTestOptions.GetHashCode(); + } + if (this.CreateInboxRulesetOptions != null) + { + hashCode = (hashCode * 59) + this.CreateInboxRulesetOptions.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TestPhoneNumberOptions.cs b/src/mailslurp/Model/TestPhoneNumberOptions.cs new file mode 100644 index 00000000..5817a56d --- /dev/null +++ b/src/mailslurp/Model/TestPhoneNumberOptions.cs @@ -0,0 +1,139 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// TestPhoneNumberOptions + /// + [DataContract(Name = "TestPhoneNumberOptions")] + public partial class TestPhoneNumberOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TestPhoneNumberOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// message (required). + public TestPhoneNumberOptions(string message = default(string)) + { + // to ensure "message" is required (not null) + if (message == null) + { + throw new ArgumentNullException("message is a required property for TestPhoneNumberOptions and cannot be null"); + } + this.Message = message; + } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TestPhoneNumberOptions {\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TestPhoneNumberOptions); + } + + /// + /// Returns true if TestPhoneNumberOptions instances are equal + /// + /// Instance of TestPhoneNumberOptions to be compared + /// Boolean + public bool Equals(TestPhoneNumberOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ThreadProjection.cs b/src/mailslurp/Model/ThreadProjection.cs new file mode 100644 index 00000000..6d2a081a --- /dev/null +++ b/src/mailslurp/Model/ThreadProjection.cs @@ -0,0 +1,333 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// A thread is a message thread created for a message received by an alias + /// + [DataContract(Name = "ThreadProjection")] + public partial class ThreadProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ThreadProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of thread. + /// ID of email thread (required). + /// Thread subject. + /// User ID (required). + /// Inbox ID (required). + /// Created at DateTime (required). + /// Updated at DateTime (required). + /// To recipients (required). + /// BCC recipients. + /// CC recipients. + /// Alias ID (required). + public ThreadProjection(string name = default(string), Guid id = default(Guid), string subject = default(string), Guid userId = default(Guid), Guid inboxId = default(Guid), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), List to = default(List), List bcc = default(List), List cc = default(List), Guid aliasId = default(Guid)) + { + this.Id = id; + this.UserId = userId; + this.InboxId = inboxId; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for ThreadProjection and cannot be null"); + } + this.To = to; + this.AliasId = aliasId; + this.Name = name; + this.Subject = subject; + this.Bcc = bcc; + this.Cc = cc; + } + + /// + /// Name of thread + /// + /// Name of thread + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// ID of email thread + /// + /// ID of email thread + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Thread subject + /// + /// Thread subject + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// User ID + /// + /// User ID + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Inbox ID + /// + /// Inbox ID + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Created at DateTime + /// + /// Created at DateTime + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Updated at DateTime + /// + /// Updated at DateTime + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// To recipients + /// + /// To recipients + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// BCC recipients + /// + /// BCC recipients + [DataMember(Name = "bcc", EmitDefaultValue = false)] + public List Bcc { get; set; } + + /// + /// CC recipients + /// + /// CC recipients + [DataMember(Name = "cc", EmitDefaultValue = false)] + public List Cc { get; set; } + + /// + /// Alias ID + /// + /// Alias ID + [DataMember(Name = "aliasId", IsRequired = true, EmitDefaultValue = true)] + public Guid AliasId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ThreadProjection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" AliasId: ").Append(AliasId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ThreadProjection); + } + + /// + /// Returns true if ThreadProjection instances are equal + /// + /// Instance of ThreadProjection to be compared + /// Boolean + public bool Equals(ThreadProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.AliasId == input.AliasId || + (this.AliasId != null && + this.AliasId.Equals(input.AliasId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.AliasId != null) + { + hashCode = (hashCode * 59) + this.AliasId.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TrackingPixelDto.cs b/src/mailslurp/Model/TrackingPixelDto.cs new file mode 100644 index 00000000..d864cbd7 --- /dev/null +++ b/src/mailslurp/Model/TrackingPixelDto.cs @@ -0,0 +1,284 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Tracking pixel + /// + [DataContract(Name = "TrackingPixelDto")] + public partial class TrackingPixelDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TrackingPixelDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// seen (required). + /// recipient. + /// html (required). + /// url (required). + /// inboxId. + /// sentEmailId. + /// seenAt. + /// createdAt (required). + public TrackingPixelDto(Guid id = default(Guid), bool seen = default(bool), string recipient = default(string), string html = default(string), string url = default(string), Guid? inboxId = default(Guid?), Guid? sentEmailId = default(Guid?), DateTime? seenAt = default(DateTime?), DateTime createdAt = default(DateTime)) + { + this.Id = id; + this.Seen = seen; + // to ensure "html" is required (not null) + if (html == null) + { + throw new ArgumentNullException("html is a required property for TrackingPixelDto and cannot be null"); + } + this.Html = html; + // to ensure "url" is required (not null) + if (url == null) + { + throw new ArgumentNullException("url is a required property for TrackingPixelDto and cannot be null"); + } + this.Url = url; + this.CreatedAt = createdAt; + this.Recipient = recipient; + this.InboxId = inboxId; + this.SentEmailId = sentEmailId; + this.SeenAt = seenAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Seen + /// + [DataMember(Name = "seen", IsRequired = true, EmitDefaultValue = true)] + public bool Seen { get; set; } + + /// + /// Gets or Sets Recipient + /// + [DataMember(Name = "recipient", EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Gets or Sets Html + /// + [DataMember(Name = "html", IsRequired = true, EmitDefaultValue = true)] + public string Html { get; set; } + + /// + /// Gets or Sets Url + /// + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + public string Url { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Gets or Sets SentEmailId + /// + [DataMember(Name = "sentEmailId", EmitDefaultValue = true)] + public Guid? SentEmailId { get; set; } + + /// + /// Gets or Sets SeenAt + /// + [DataMember(Name = "seenAt", EmitDefaultValue = true)] + public DateTime? SeenAt { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TrackingPixelDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Seen: ").Append(Seen).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Html: ").Append(Html).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" SentEmailId: ").Append(SentEmailId).Append("\n"); + sb.Append(" SeenAt: ").Append(SeenAt).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TrackingPixelDto); + } + + /// + /// Returns true if TrackingPixelDto instances are equal + /// + /// Instance of TrackingPixelDto to be compared + /// Boolean + public bool Equals(TrackingPixelDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Seen == input.Seen || + this.Seen.Equals(input.Seen) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Html == input.Html || + (this.Html != null && + this.Html.Equals(input.Html)) + ) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.SentEmailId == input.SentEmailId || + (this.SentEmailId != null && + this.SentEmailId.Equals(input.SentEmailId)) + ) && + ( + this.SeenAt == input.SeenAt || + (this.SeenAt != null && + this.SeenAt.Equals(input.SeenAt)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Seen.GetHashCode(); + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.Html != null) + { + hashCode = (hashCode * 59) + this.Html.GetHashCode(); + } + if (this.Url != null) + { + hashCode = (hashCode * 59) + this.Url.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.SentEmailId != null) + { + hashCode = (hashCode * 59) + this.SentEmailId.GetHashCode(); + } + if (this.SeenAt != null) + { + hashCode = (hashCode * 59) + this.SeenAt.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/TrackingPixelProjection.cs b/src/mailslurp/Model/TrackingPixelProjection.cs new file mode 100644 index 00000000..76c7b9ca --- /dev/null +++ b/src/mailslurp/Model/TrackingPixelProjection.cs @@ -0,0 +1,274 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Tracking pixel data + /// + [DataContract(Name = "TrackingPixelProjection")] + public partial class TrackingPixelProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TrackingPixelProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// name. + /// id (required). + /// userId (required). + /// inboxId. + /// sentEmailId. + /// createdAt (required). + /// recipient. + /// seen (required). + /// seenAt. + public TrackingPixelProjection(string name = default(string), Guid id = default(Guid), Guid userId = default(Guid), Guid inboxId = default(Guid), Guid sentEmailId = default(Guid), DateTime createdAt = default(DateTime), string recipient = default(string), bool seen = default(bool), DateTime seenAt = default(DateTime)) + { + this.Id = id; + this.UserId = userId; + this.CreatedAt = createdAt; + this.Seen = seen; + this.Name = name; + this.InboxId = inboxId; + this.SentEmailId = sentEmailId; + this.Recipient = recipient; + this.SeenAt = seenAt; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = false)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets SentEmailId + /// + [DataMember(Name = "sentEmailId", EmitDefaultValue = false)] + public Guid SentEmailId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets Recipient + /// + [DataMember(Name = "recipient", EmitDefaultValue = false)] + public string Recipient { get; set; } + + /// + /// Gets or Sets Seen + /// + [DataMember(Name = "seen", IsRequired = true, EmitDefaultValue = true)] + public bool Seen { get; set; } + + /// + /// Gets or Sets SeenAt + /// + [DataMember(Name = "seenAt", EmitDefaultValue = false)] + public DateTime SeenAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TrackingPixelProjection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" SentEmailId: ").Append(SentEmailId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Seen: ").Append(Seen).Append("\n"); + sb.Append(" SeenAt: ").Append(SeenAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TrackingPixelProjection); + } + + /// + /// Returns true if TrackingPixelProjection instances are equal + /// + /// Instance of TrackingPixelProjection to be compared + /// Boolean + public bool Equals(TrackingPixelProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.SentEmailId == input.SentEmailId || + (this.SentEmailId != null && + this.SentEmailId.Equals(input.SentEmailId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Seen == input.Seen || + this.Seen.Equals(input.Seen) + ) && + ( + this.SeenAt == input.SeenAt || + (this.SeenAt != null && + this.SeenAt.Equals(input.SeenAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.SentEmailId != null) + { + hashCode = (hashCode * 59) + this.SentEmailId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Seen.GetHashCode(); + if (this.SeenAt != null) + { + hashCode = (hashCode * 59) + this.SeenAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UnknownMissedEmailProjection.cs b/src/mailslurp/Model/UnknownMissedEmailProjection.cs new file mode 100644 index 00000000..dbf64ef0 --- /dev/null +++ b/src/mailslurp/Model/UnknownMissedEmailProjection.cs @@ -0,0 +1,207 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Unknown missed email projection + /// + [DataContract(Name = "UnknownMissedEmailProjection")] + public partial class UnknownMissedEmailProjection : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UnknownMissedEmailProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// from. + /// subject. + /// createdAt (required). + /// to. + public UnknownMissedEmailProjection(Guid id = default(Guid), string from = default(string), string subject = default(string), DateTime createdAt = default(DateTime), List to = default(List)) + { + this.Id = id; + this.CreatedAt = createdAt; + this.From = from; + this.Subject = subject; + this.To = to; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets From + /// + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Gets or Sets Subject + /// + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets To + /// + [DataMember(Name = "to", EmitDefaultValue = false)] + public List To { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UnknownMissedEmailProjection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UnknownMissedEmailProjection); + } + + /// + /// Returns true if UnknownMissedEmailProjection instances are equal + /// + /// Instance of UnknownMissedEmailProjection to be compared + /// Boolean + public bool Equals(UnknownMissedEmailProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UnreadCount.cs b/src/mailslurp/Model/UnreadCount.cs new file mode 100644 index 00000000..a032d271 --- /dev/null +++ b/src/mailslurp/Model/UnreadCount.cs @@ -0,0 +1,130 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Number of unread emails + /// + [DataContract(Name = "UnreadCount")] + public partial class UnreadCount : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UnreadCount() { } + /// + /// Initializes a new instance of the class. + /// + /// count (required). + public UnreadCount(long count = default(long)) + { + this.Count = count; + } + + /// + /// Gets or Sets Count + /// + [DataMember(Name = "count", IsRequired = true, EmitDefaultValue = true)] + public long Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UnreadCount {\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UnreadCount); + } + + /// + /// Returns true if UnreadCount instances are equal + /// + /// Instance of UnreadCount to be compared + /// Boolean + public bool Equals(UnreadCount input) + { + if (input == null) + { + return false; + } + return + ( + this.Count == input.Count || + this.Count.Equals(input.Count) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UnseenErrorCountDto.cs b/src/mailslurp/Model/UnseenErrorCountDto.cs new file mode 100644 index 00000000..5481c6dd --- /dev/null +++ b/src/mailslurp/Model/UnseenErrorCountDto.cs @@ -0,0 +1,130 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Number of unseen errors + /// + [DataContract(Name = "UnseenErrorCountDto")] + public partial class UnseenErrorCountDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UnseenErrorCountDto() { } + /// + /// Initializes a new instance of the class. + /// + /// count (required). + public UnseenErrorCountDto(long count = default(long)) + { + this.Count = count; + } + + /// + /// Gets or Sets Count + /// + [DataMember(Name = "count", IsRequired = true, EmitDefaultValue = true)] + public long Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UnseenErrorCountDto {\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UnseenErrorCountDto); + } + + /// + /// Returns true if UnseenErrorCountDto instances are equal + /// + /// Instance of UnseenErrorCountDto to be compared + /// Boolean + public bool Equals(UnseenErrorCountDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Count == input.Count || + this.Count.Equals(input.Count) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UpdateAliasOptions.cs b/src/mailslurp/Model/UpdateAliasOptions.cs new file mode 100644 index 00000000..d6c14798 --- /dev/null +++ b/src/mailslurp/Model/UpdateAliasOptions.cs @@ -0,0 +1,130 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Update an email alias + /// + [DataContract(Name = "UpdateAliasOptions")] + public partial class UpdateAliasOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Optional name for alias. + public UpdateAliasOptions(string name = default(string)) + { + this.Name = name; + } + + /// + /// Optional name for alias + /// + /// Optional name for alias + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateAliasOptions {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateAliasOptions); + } + + /// + /// Returns true if UpdateAliasOptions instances are equal + /// + /// Instance of UpdateAliasOptions to be compared + /// Boolean + public bool Equals(UpdateAliasOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UpdateDomainOptions.cs b/src/mailslurp/Model/UpdateDomainOptions.cs new file mode 100644 index 00000000..04779565 --- /dev/null +++ b/src/mailslurp/Model/UpdateDomainOptions.cs @@ -0,0 +1,129 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not functionally currently until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. + /// + [DataContract(Name = "UpdateDomainOptions")] + public partial class UpdateDomainOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// catchAllInboxId. + public UpdateDomainOptions(Guid? catchAllInboxId = default(Guid?)) + { + this.CatchAllInboxId = catchAllInboxId; + } + + /// + /// Gets or Sets CatchAllInboxId + /// + [DataMember(Name = "catchAllInboxId", EmitDefaultValue = true)] + public Guid? CatchAllInboxId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateDomainOptions {\n"); + sb.Append(" CatchAllInboxId: ").Append(CatchAllInboxId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateDomainOptions); + } + + /// + /// Returns true if UpdateDomainOptions instances are equal + /// + /// Instance of UpdateDomainOptions to be compared + /// Boolean + public bool Equals(UpdateDomainOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.CatchAllInboxId == input.CatchAllInboxId || + (this.CatchAllInboxId != null && + this.CatchAllInboxId.Equals(input.CatchAllInboxId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CatchAllInboxId != null) + { + hashCode = (hashCode * 59) + this.CatchAllInboxId.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UpdateGroupContacts.cs b/src/mailslurp/Model/UpdateGroupContacts.cs new file mode 100644 index 00000000..a4a049d7 --- /dev/null +++ b/src/mailslurp/Model/UpdateGroupContacts.cs @@ -0,0 +1,140 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Update group contacts options. Pass a list of contact ids to replace existing group contacts. + /// + [DataContract(Name = "UpdateGroupContacts")] + public partial class UpdateGroupContacts : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UpdateGroupContacts() { } + /// + /// Initializes a new instance of the class. + /// + /// contactIds (required). + public UpdateGroupContacts(List contactIds = default(List)) + { + // to ensure "contactIds" is required (not null) + if (contactIds == null) + { + throw new ArgumentNullException("contactIds is a required property for UpdateGroupContacts and cannot be null"); + } + this.ContactIds = contactIds; + } + + /// + /// Gets or Sets ContactIds + /// + [DataMember(Name = "contactIds", IsRequired = true, EmitDefaultValue = true)] + public List ContactIds { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateGroupContacts {\n"); + sb.Append(" ContactIds: ").Append(ContactIds).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateGroupContacts); + } + + /// + /// Returns true if UpdateGroupContacts instances are equal + /// + /// Instance of UpdateGroupContacts to be compared + /// Boolean + public bool Equals(UpdateGroupContacts input) + { + if (input == null) + { + return false; + } + return + ( + this.ContactIds == input.ContactIds || + this.ContactIds != null && + input.ContactIds != null && + this.ContactIds.SequenceEqual(input.ContactIds) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ContactIds != null) + { + hashCode = (hashCode * 59) + this.ContactIds.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UpdateInboxOptions.cs b/src/mailslurp/Model/UpdateInboxOptions.cs new file mode 100644 index 00000000..bf301cd4 --- /dev/null +++ b/src/mailslurp/Model/UpdateInboxOptions.cs @@ -0,0 +1,207 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for updating inbox properties + /// + [DataContract(Name = "UpdateInboxOptions")] + public partial class UpdateInboxOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search. + /// Description of an inbox for labelling and searching purposes. + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.. + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.. + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering. + public UpdateInboxOptions(string name = default(string), string description = default(string), List tags = default(List), DateTime? expiresAt = default(DateTime?), bool? favourite = default(bool?)) + { + this.Name = name; + this.Description = description; + this.Tags = tags; + this.ExpiresAt = expiresAt; + this.Favourite = favourite; + } + + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + /// + /// Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Description of an inbox for labelling and searching purposes + /// + /// Description of an inbox for labelling and searching purposes + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + /// + /// Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + [DataMember(Name = "tags", EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + /// + /// Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + [DataMember(Name = "expiresAt", EmitDefaultValue = true)] + public DateTime? ExpiresAt { get; set; } + + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + /// + /// Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + [DataMember(Name = "favourite", EmitDefaultValue = true)] + public bool? Favourite { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateInboxOptions {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" Favourite: ").Append(Favourite).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateInboxOptions); + } + + /// + /// Returns true if UpdateInboxOptions instances are equal + /// + /// Instance of UpdateInboxOptions to be compared + /// Boolean + public bool Equals(UpdateInboxOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.ExpiresAt == input.ExpiresAt || + (this.ExpiresAt != null && + this.ExpiresAt.Equals(input.ExpiresAt)) + ) && + ( + this.Favourite == input.Favourite || + (this.Favourite != null && + this.Favourite.Equals(input.Favourite)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + if (this.ExpiresAt != null) + { + hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); + } + if (this.Favourite != null) + { + hashCode = (hashCode * 59) + this.Favourite.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UploadAttachmentBytesRequest.cs b/src/mailslurp/Model/UploadAttachmentBytesRequest.cs new file mode 100644 index 00000000..cf67ab4a --- /dev/null +++ b/src/mailslurp/Model/UploadAttachmentBytesRequest.cs @@ -0,0 +1,227 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Byte array request body + /// + [DataContract(Name = "uploadAttachmentBytes_request")] + public partial class UploadAttachmentBytesRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// _short. + /// _char. + /// _int. + /// _long. + /// _float. + /// _double. + /// direct. + /// readOnly. + public UploadAttachmentBytesRequest(int _short = default(int), string _char = default(string), int _int = default(int), long _long = default(long), float _float = default(float), double _double = default(double), bool direct = default(bool), bool readOnly = default(bool)) + { + this.Short = _short; + this.Char = _char; + this.Int = _int; + this.Long = _long; + this.Float = _float; + this.Double = _double; + this.Direct = direct; + this.ReadOnly = readOnly; + } + + /// + /// Gets or Sets Short + /// + [DataMember(Name = "short", EmitDefaultValue = false)] + public int Short { get; set; } + + /// + /// Gets or Sets Char + /// + [DataMember(Name = "char", EmitDefaultValue = false)] + public string Char { get; set; } + + /// + /// Gets or Sets Int + /// + [DataMember(Name = "int", EmitDefaultValue = false)] + public int Int { get; set; } + + /// + /// Gets or Sets Long + /// + [DataMember(Name = "long", EmitDefaultValue = false)] + public long Long { get; set; } + + /// + /// Gets or Sets Float + /// + [DataMember(Name = "float", EmitDefaultValue = false)] + public float Float { get; set; } + + /// + /// Gets or Sets Double + /// + [DataMember(Name = "double", EmitDefaultValue = false)] + public double Double { get; set; } + + /// + /// Gets or Sets Direct + /// + [DataMember(Name = "direct", EmitDefaultValue = true)] + public bool Direct { get; set; } + + /// + /// Gets or Sets ReadOnly + /// + [DataMember(Name = "readOnly", EmitDefaultValue = true)] + public bool ReadOnly { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UploadAttachmentBytesRequest {\n"); + sb.Append(" Short: ").Append(Short).Append("\n"); + sb.Append(" Char: ").Append(Char).Append("\n"); + sb.Append(" Int: ").Append(Int).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" Float: ").Append(Float).Append("\n"); + sb.Append(" Double: ").Append(Double).Append("\n"); + sb.Append(" Direct: ").Append(Direct).Append("\n"); + sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UploadAttachmentBytesRequest); + } + + /// + /// Returns true if UploadAttachmentBytesRequest instances are equal + /// + /// Instance of UploadAttachmentBytesRequest to be compared + /// Boolean + public bool Equals(UploadAttachmentBytesRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Short == input.Short || + this.Short.Equals(input.Short) + ) && + ( + this.Char == input.Char || + (this.Char != null && + this.Char.Equals(input.Char)) + ) && + ( + this.Int == input.Int || + this.Int.Equals(input.Int) + ) && + ( + this.Long == input.Long || + this.Long.Equals(input.Long) + ) && + ( + this.Float == input.Float || + this.Float.Equals(input.Float) + ) && + ( + this.Double == input.Double || + this.Double.Equals(input.Double) + ) && + ( + this.Direct == input.Direct || + this.Direct.Equals(input.Direct) + ) && + ( + this.ReadOnly == input.ReadOnly || + this.ReadOnly.Equals(input.ReadOnly) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Short.GetHashCode(); + if (this.Char != null) + { + hashCode = (hashCode * 59) + this.Char.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Int.GetHashCode(); + hashCode = (hashCode * 59) + this.Long.GetHashCode(); + hashCode = (hashCode * 59) + this.Float.GetHashCode(); + hashCode = (hashCode * 59) + this.Double.GetHashCode(); + hashCode = (hashCode * 59) + this.Direct.GetHashCode(); + hashCode = (hashCode * 59) + this.ReadOnly.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UploadAttachmentOptions.cs b/src/mailslurp/Model/UploadAttachmentOptions.cs new file mode 100644 index 00000000..b72ca9ea --- /dev/null +++ b/src/mailslurp/Model/UploadAttachmentOptions.cs @@ -0,0 +1,178 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your `SendEmailOptions` when sending an email. This way you can use attachments multiple times once they have been uploaded. + /// + [DataContract(Name = "UploadAttachmentOptions")] + public partial class UploadAttachmentOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UploadAttachmentOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Optional contentType for file. For instance `application/pdf`. + /// Optional filename to save upload with. Will be the name that is shown in email clients. + /// Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ (required). + public UploadAttachmentOptions(string contentType = default(string), string filename = default(string), string base64Contents = default(string)) + { + // to ensure "base64Contents" is required (not null) + if (base64Contents == null) + { + throw new ArgumentNullException("base64Contents is a required property for UploadAttachmentOptions and cannot be null"); + } + this.Base64Contents = base64Contents; + this.ContentType = contentType; + this.Filename = filename; + } + + /// + /// Optional contentType for file. For instance `application/pdf` + /// + /// Optional contentType for file. For instance `application/pdf` + [DataMember(Name = "contentType", EmitDefaultValue = true)] + public string ContentType { get; set; } + + /// + /// Optional filename to save upload with. Will be the name that is shown in email clients + /// + /// Optional filename to save upload with. Will be the name that is shown in email clients + [DataMember(Name = "filename", EmitDefaultValue = true)] + public string Filename { get; set; } + + /// + /// Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ + /// + /// Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ + [DataMember(Name = "base64Contents", IsRequired = true, EmitDefaultValue = true)] + public string Base64Contents { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UploadAttachmentOptions {\n"); + sb.Append(" ContentType: ").Append(ContentType).Append("\n"); + sb.Append(" Filename: ").Append(Filename).Append("\n"); + sb.Append(" Base64Contents: ").Append(Base64Contents).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UploadAttachmentOptions); + } + + /// + /// Returns true if UploadAttachmentOptions instances are equal + /// + /// Instance of UploadAttachmentOptions to be compared + /// Boolean + public bool Equals(UploadAttachmentOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.ContentType == input.ContentType || + (this.ContentType != null && + this.ContentType.Equals(input.ContentType)) + ) && + ( + this.Filename == input.Filename || + (this.Filename != null && + this.Filename.Equals(input.Filename)) + ) && + ( + this.Base64Contents == input.Base64Contents || + (this.Base64Contents != null && + this.Base64Contents.Equals(input.Base64Contents)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ContentType != null) + { + hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); + } + if (this.Filename != null) + { + hashCode = (hashCode * 59) + this.Filename.GetHashCode(); + } + if (this.Base64Contents != null) + { + hashCode = (hashCode * 59) + this.Base64Contents.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UploadMultipartFormRequest.cs b/src/mailslurp/Model/UploadMultipartFormRequest.cs new file mode 100644 index 00000000..69d5f409 --- /dev/null +++ b/src/mailslurp/Model/UploadMultipartFormRequest.cs @@ -0,0 +1,158 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// UploadMultipartFormRequest + /// + [DataContract(Name = "uploadMultipartForm_request")] + public partial class UploadMultipartFormRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UploadMultipartFormRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Optional content type header of attachment. + /// file (required). + public UploadMultipartFormRequest(string contentTypeHeader = default(string), System.IO.Stream file = default(System.IO.Stream)) + { + // to ensure "file" is required (not null) + if (file == null) + { + throw new ArgumentNullException("file is a required property for UploadMultipartFormRequest and cannot be null"); + } + this.File = file; + this.ContentTypeHeader = contentTypeHeader; + } + + /// + /// Optional content type header of attachment + /// + /// Optional content type header of attachment + [DataMember(Name = "contentTypeHeader", EmitDefaultValue = false)] + public string ContentTypeHeader { get; set; } + + /// + /// Gets or Sets File + /// + [DataMember(Name = "file", IsRequired = true, EmitDefaultValue = true)] + public System.IO.Stream File { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UploadMultipartFormRequest {\n"); + sb.Append(" ContentTypeHeader: ").Append(ContentTypeHeader).Append("\n"); + sb.Append(" File: ").Append(File).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UploadMultipartFormRequest); + } + + /// + /// Returns true if UploadMultipartFormRequest instances are equal + /// + /// Instance of UploadMultipartFormRequest to be compared + /// Boolean + public bool Equals(UploadMultipartFormRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.ContentTypeHeader == input.ContentTypeHeader || + (this.ContentTypeHeader != null && + this.ContentTypeHeader.Equals(input.ContentTypeHeader)) + ) && + ( + this.File == input.File || + (this.File != null && + this.File.Equals(input.File)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ContentTypeHeader != null) + { + hashCode = (hashCode * 59) + this.ContentTypeHeader.GetHashCode(); + } + if (this.File != null) + { + hashCode = (hashCode * 59) + this.File.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/UserInfoDto.cs b/src/mailslurp/Model/UserInfoDto.cs new file mode 100644 index 00000000..e80c364e --- /dev/null +++ b/src/mailslurp/Model/UserInfoDto.cs @@ -0,0 +1,301 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// UserInfoDto + /// + [DataContract(Name = "UserInfoDto")] + public partial class UserInfoDto : IEquatable, IValidatableObject + { + /// + /// Defines AccountState + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AccountStateEnum + { + /// + /// Enum FROZEN for value: FROZEN + /// + [EnumMember(Value = "FROZEN")] + FROZEN = 1, + + /// + /// Enum ACTIVE for value: ACTIVE + /// + [EnumMember(Value = "ACTIVE")] + ACTIVE = 2 + + } + + + /// + /// Gets or Sets AccountState + /// + [DataMember(Name = "accountState", IsRequired = true, EmitDefaultValue = true)] + public AccountStateEnum AccountState { get; set; } + /// + /// Defines SubscriptionType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SubscriptionTypeEnum + { + /// + /// Enum PROMONTHLY for value: PRO_MONTHLY + /// + [EnumMember(Value = "PRO_MONTHLY")] + PROMONTHLY = 1, + + /// + /// Enum STARTER for value: STARTER + /// + [EnumMember(Value = "STARTER")] + STARTER = 2, + + /// + /// Enum TEAM for value: TEAM + /// + [EnumMember(Value = "TEAM")] + TEAM = 3, + + /// + /// Enum ENTERPRISE for value: ENTERPRISE + /// + [EnumMember(Value = "ENTERPRISE")] + ENTERPRISE = 4 + + } + + + /// + /// Gets or Sets SubscriptionType + /// + [DataMember(Name = "subscriptionType", EmitDefaultValue = false)] + public SubscriptionTypeEnum? SubscriptionType { get; set; } + /// + /// Defines AccountType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AccountTypeEnum + { + /// + /// Enum SOLO for value: SOLO + /// + [EnumMember(Value = "SOLO")] + SOLO = 1, + + /// + /// Enum CHILDSOLO for value: CHILD_SOLO + /// + [EnumMember(Value = "CHILD_SOLO")] + CHILDSOLO = 2, + + /// + /// Enum CHILDTEAM for value: CHILD_TEAM + /// + [EnumMember(Value = "CHILD_TEAM")] + CHILDTEAM = 3, + + /// + /// Enum CHILDADMIN for value: CHILD_ADMIN + /// + [EnumMember(Value = "CHILD_ADMIN")] + CHILDADMIN = 4 + + } + + + /// + /// Gets or Sets AccountType + /// + [DataMember(Name = "accountType", IsRequired = true, EmitDefaultValue = true)] + public AccountTypeEnum AccountType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UserInfoDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// emailAddress (required). + /// accountState (required). + /// subscriptionType. + /// accountType (required). + /// createdAt (required). + public UserInfoDto(Guid id = default(Guid), string emailAddress = default(string), AccountStateEnum accountState = default(AccountStateEnum), SubscriptionTypeEnum? subscriptionType = default(SubscriptionTypeEnum?), AccountTypeEnum accountType = default(AccountTypeEnum), DateTime createdAt = default(DateTime)) + { + this.Id = id; + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for UserInfoDto and cannot be null"); + } + this.EmailAddress = emailAddress; + this.AccountState = accountState; + this.AccountType = accountType; + this.CreatedAt = createdAt; + this.SubscriptionType = subscriptionType; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UserInfoDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" AccountState: ").Append(AccountState).Append("\n"); + sb.Append(" SubscriptionType: ").Append(SubscriptionType).Append("\n"); + sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UserInfoDto); + } + + /// + /// Returns true if UserInfoDto instances are equal + /// + /// Instance of UserInfoDto to be compared + /// Boolean + public bool Equals(UserInfoDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.AccountState == input.AccountState || + this.AccountState.Equals(input.AccountState) + ) && + ( + this.SubscriptionType == input.SubscriptionType || + this.SubscriptionType.Equals(input.SubscriptionType) + ) && + ( + this.AccountType == input.AccountType || + this.AccountType.Equals(input.AccountType) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AccountState.GetHashCode(); + hashCode = (hashCode * 59) + this.SubscriptionType.GetHashCode(); + hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ValidateEmailAddressListOptions.cs b/src/mailslurp/Model/ValidateEmailAddressListOptions.cs new file mode 100644 index 00000000..42d34f18 --- /dev/null +++ b/src/mailslurp/Model/ValidateEmailAddressListOptions.cs @@ -0,0 +1,140 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for validating a list of email addresses + /// + [DataContract(Name = "ValidateEmailAddressListOptions")] + public partial class ValidateEmailAddressListOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValidateEmailAddressListOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// emailAddressList (required). + public ValidateEmailAddressListOptions(List emailAddressList = default(List)) + { + // to ensure "emailAddressList" is required (not null) + if (emailAddressList == null) + { + throw new ArgumentNullException("emailAddressList is a required property for ValidateEmailAddressListOptions and cannot be null"); + } + this.EmailAddressList = emailAddressList; + } + + /// + /// Gets or Sets EmailAddressList + /// + [DataMember(Name = "emailAddressList", IsRequired = true, EmitDefaultValue = true)] + public List EmailAddressList { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ValidateEmailAddressListOptions {\n"); + sb.Append(" EmailAddressList: ").Append(EmailAddressList).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ValidateEmailAddressListOptions); + } + + /// + /// Returns true if ValidateEmailAddressListOptions instances are equal + /// + /// Instance of ValidateEmailAddressListOptions to be compared + /// Boolean + public bool Equals(ValidateEmailAddressListOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.EmailAddressList == input.EmailAddressList || + this.EmailAddressList != null && + input.EmailAddressList != null && + this.EmailAddressList.SequenceEqual(input.EmailAddressList) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailAddressList != null) + { + hashCode = (hashCode * 59) + this.EmailAddressList.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ValidateEmailAddressListResult.cs b/src/mailslurp/Model/ValidateEmailAddressListResult.cs new file mode 100644 index 00000000..12090f3d --- /dev/null +++ b/src/mailslurp/Model/ValidateEmailAddressListResult.cs @@ -0,0 +1,188 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of validating a list of email addresses + /// + [DataContract(Name = "ValidateEmailAddressListResult")] + public partial class ValidateEmailAddressListResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValidateEmailAddressListResult() { } + /// + /// Initializes a new instance of the class. + /// + /// validEmailAddresses (required). + /// invalidEmailAddresses (required). + /// resultMapEmailAddressIsValid (required). + public ValidateEmailAddressListResult(List validEmailAddresses = default(List), List invalidEmailAddresses = default(List), Dictionary resultMapEmailAddressIsValid = default(Dictionary)) + { + // to ensure "validEmailAddresses" is required (not null) + if (validEmailAddresses == null) + { + throw new ArgumentNullException("validEmailAddresses is a required property for ValidateEmailAddressListResult and cannot be null"); + } + this.ValidEmailAddresses = validEmailAddresses; + // to ensure "invalidEmailAddresses" is required (not null) + if (invalidEmailAddresses == null) + { + throw new ArgumentNullException("invalidEmailAddresses is a required property for ValidateEmailAddressListResult and cannot be null"); + } + this.InvalidEmailAddresses = invalidEmailAddresses; + // to ensure "resultMapEmailAddressIsValid" is required (not null) + if (resultMapEmailAddressIsValid == null) + { + throw new ArgumentNullException("resultMapEmailAddressIsValid is a required property for ValidateEmailAddressListResult and cannot be null"); + } + this.ResultMapEmailAddressIsValid = resultMapEmailAddressIsValid; + } + + /// + /// Gets or Sets ValidEmailAddresses + /// + [DataMember(Name = "validEmailAddresses", IsRequired = true, EmitDefaultValue = true)] + public List ValidEmailAddresses { get; set; } + + /// + /// Gets or Sets InvalidEmailAddresses + /// + [DataMember(Name = "invalidEmailAddresses", IsRequired = true, EmitDefaultValue = true)] + public List InvalidEmailAddresses { get; set; } + + /// + /// Gets or Sets ResultMapEmailAddressIsValid + /// + [DataMember(Name = "resultMapEmailAddressIsValid", IsRequired = true, EmitDefaultValue = true)] + public Dictionary ResultMapEmailAddressIsValid { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ValidateEmailAddressListResult {\n"); + sb.Append(" ValidEmailAddresses: ").Append(ValidEmailAddresses).Append("\n"); + sb.Append(" InvalidEmailAddresses: ").Append(InvalidEmailAddresses).Append("\n"); + sb.Append(" ResultMapEmailAddressIsValid: ").Append(ResultMapEmailAddressIsValid).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ValidateEmailAddressListResult); + } + + /// + /// Returns true if ValidateEmailAddressListResult instances are equal + /// + /// Instance of ValidateEmailAddressListResult to be compared + /// Boolean + public bool Equals(ValidateEmailAddressListResult input) + { + if (input == null) + { + return false; + } + return + ( + this.ValidEmailAddresses == input.ValidEmailAddresses || + this.ValidEmailAddresses != null && + input.ValidEmailAddresses != null && + this.ValidEmailAddresses.SequenceEqual(input.ValidEmailAddresses) + ) && + ( + this.InvalidEmailAddresses == input.InvalidEmailAddresses || + this.InvalidEmailAddresses != null && + input.InvalidEmailAddresses != null && + this.InvalidEmailAddresses.SequenceEqual(input.InvalidEmailAddresses) + ) && + ( + this.ResultMapEmailAddressIsValid == input.ResultMapEmailAddressIsValid || + this.ResultMapEmailAddressIsValid != null && + input.ResultMapEmailAddressIsValid != null && + this.ResultMapEmailAddressIsValid.SequenceEqual(input.ResultMapEmailAddressIsValid) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ValidEmailAddresses != null) + { + hashCode = (hashCode * 59) + this.ValidEmailAddresses.GetHashCode(); + } + if (this.InvalidEmailAddresses != null) + { + hashCode = (hashCode * 59) + this.InvalidEmailAddresses.GetHashCode(); + } + if (this.ResultMapEmailAddressIsValid != null) + { + hashCode = (hashCode * 59) + this.ResultMapEmailAddressIsValid.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ValidationDto.cs b/src/mailslurp/Model/ValidationDto.cs new file mode 100644 index 00000000..617498cb --- /dev/null +++ b/src/mailslurp/Model/ValidationDto.cs @@ -0,0 +1,158 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Response object for email validation operation + /// + [DataContract(Name = "ValidationDto")] + public partial class ValidationDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValidationDto() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the email validated (required). + /// html (required). + public ValidationDto(Guid emailId = default(Guid), HTMLValidationResult html = default(HTMLValidationResult)) + { + this.EmailId = emailId; + // to ensure "html" is required (not null) + if (html == null) + { + throw new ArgumentNullException("html is a required property for ValidationDto and cannot be null"); + } + this.Html = html; + } + + /// + /// ID of the email validated + /// + /// ID of the email validated + [DataMember(Name = "emailId", IsRequired = true, EmitDefaultValue = true)] + public Guid EmailId { get; set; } + + /// + /// Gets or Sets Html + /// + [DataMember(Name = "html", IsRequired = true, EmitDefaultValue = true)] + public HTMLValidationResult Html { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ValidationDto {\n"); + sb.Append(" EmailId: ").Append(EmailId).Append("\n"); + sb.Append(" Html: ").Append(Html).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ValidationDto); + } + + /// + /// Returns true if ValidationDto instances are equal + /// + /// Instance of ValidationDto to be compared + /// Boolean + public bool Equals(ValidationDto input) + { + if (input == null) + { + return false; + } + return + ( + this.EmailId == input.EmailId || + (this.EmailId != null && + this.EmailId.Equals(input.EmailId)) + ) && + ( + this.Html == input.Html || + (this.Html != null && + this.Html.Equals(input.Html)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailId != null) + { + hashCode = (hashCode * 59) + this.EmailId.GetHashCode(); + } + if (this.Html != null) + { + hashCode = (hashCode * 59) + this.Html.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/ValidationMessage.cs b/src/mailslurp/Model/ValidationMessage.cs new file mode 100644 index 00000000..2de051c6 --- /dev/null +++ b/src/mailslurp/Model/ValidationMessage.cs @@ -0,0 +1,148 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Optional warnings resulting from HTML validation + /// + [DataContract(Name = "ValidationMessage")] + public partial class ValidationMessage : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ValidationMessage() { } + /// + /// Initializes a new instance of the class. + /// + /// lineNumber (required). + /// message. + public ValidationMessage(int lineNumber = default(int), string message = default(string)) + { + this.LineNumber = lineNumber; + this.Message = message; + } + + /// + /// Gets or Sets LineNumber + /// + [DataMember(Name = "lineNumber", IsRequired = true, EmitDefaultValue = true)] + public int LineNumber { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ValidationMessage {\n"); + sb.Append(" LineNumber: ").Append(LineNumber).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ValidationMessage); + } + + /// + /// Returns true if ValidationMessage instances are equal + /// + /// Instance of ValidationMessage to be compared + /// Boolean + public bool Equals(ValidationMessage input) + { + if (input == null) + { + return false; + } + return + ( + this.LineNumber == input.LineNumber || + this.LineNumber.Equals(input.LineNumber) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.LineNumber.GetHashCode(); + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/VerifyEmailAddressOptions.cs b/src/mailslurp/Model/VerifyEmailAddressOptions.cs new file mode 100644 index 00000000..52398590 --- /dev/null +++ b/src/mailslurp/Model/VerifyEmailAddressOptions.cs @@ -0,0 +1,193 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Options for verifying that an email address exists at a remote mail server. + /// + [DataContract(Name = "VerifyEmailAddressOptions")] + public partial class VerifyEmailAddressOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected VerifyEmailAddressOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// mailServerDomain. + /// emailAddress (required). + /// senderEmailAddress. + /// port. + public VerifyEmailAddressOptions(string mailServerDomain = default(string), string emailAddress = default(string), string senderEmailAddress = default(string), int? port = default(int?)) + { + // to ensure "emailAddress" is required (not null) + if (emailAddress == null) + { + throw new ArgumentNullException("emailAddress is a required property for VerifyEmailAddressOptions and cannot be null"); + } + this.EmailAddress = emailAddress; + this.MailServerDomain = mailServerDomain; + this.SenderEmailAddress = senderEmailAddress; + this.Port = port; + } + + /// + /// Gets or Sets MailServerDomain + /// + [DataMember(Name = "mailServerDomain", EmitDefaultValue = true)] + public string MailServerDomain { get; set; } + + /// + /// Gets or Sets EmailAddress + /// + [DataMember(Name = "emailAddress", IsRequired = true, EmitDefaultValue = true)] + public string EmailAddress { get; set; } + + /// + /// Gets or Sets SenderEmailAddress + /// + [DataMember(Name = "senderEmailAddress", EmitDefaultValue = true)] + public string SenderEmailAddress { get; set; } + + /// + /// Gets or Sets Port + /// + [DataMember(Name = "port", EmitDefaultValue = true)] + public int? Port { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class VerifyEmailAddressOptions {\n"); + sb.Append(" MailServerDomain: ").Append(MailServerDomain).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" SenderEmailAddress: ").Append(SenderEmailAddress).Append("\n"); + sb.Append(" Port: ").Append(Port).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as VerifyEmailAddressOptions); + } + + /// + /// Returns true if VerifyEmailAddressOptions instances are equal + /// + /// Instance of VerifyEmailAddressOptions to be compared + /// Boolean + public bool Equals(VerifyEmailAddressOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.MailServerDomain == input.MailServerDomain || + (this.MailServerDomain != null && + this.MailServerDomain.Equals(input.MailServerDomain)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ) && + ( + this.SenderEmailAddress == input.SenderEmailAddress || + (this.SenderEmailAddress != null && + this.SenderEmailAddress.Equals(input.SenderEmailAddress)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MailServerDomain != null) + { + hashCode = (hashCode * 59) + this.MailServerDomain.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + if (this.SenderEmailAddress != null) + { + hashCode = (hashCode * 59) + this.SenderEmailAddress.GetHashCode(); + } + if (this.Port != null) + { + hashCode = (hashCode * 59) + this.Port.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/VerifyWebhookSignatureOptions.cs b/src/mailslurp/Model/VerifyWebhookSignatureOptions.cs new file mode 100644 index 00000000..7ed14046 --- /dev/null +++ b/src/mailslurp/Model/VerifyWebhookSignatureOptions.cs @@ -0,0 +1,162 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// VerifyWebhookSignatureOptions + /// + [DataContract(Name = "VerifyWebhookSignatureOptions")] + public partial class VerifyWebhookSignatureOptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected VerifyWebhookSignatureOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// messageId (required). + /// signature (required). + public VerifyWebhookSignatureOptions(string messageId = default(string), string signature = default(string)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for VerifyWebhookSignatureOptions and cannot be null"); + } + this.MessageId = messageId; + // to ensure "signature" is required (not null) + if (signature == null) + { + throw new ArgumentNullException("signature is a required property for VerifyWebhookSignatureOptions and cannot be null"); + } + this.Signature = signature; + } + + /// + /// Gets or Sets MessageId + /// + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// Gets or Sets Signature + /// + [DataMember(Name = "signature", IsRequired = true, EmitDefaultValue = true)] + public string Signature { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class VerifyWebhookSignatureOptions {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" Signature: ").Append(Signature).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as VerifyWebhookSignatureOptions); + } + + /// + /// Returns true if VerifyWebhookSignatureOptions instances are equal + /// + /// Instance of VerifyWebhookSignatureOptions to be compared + /// Boolean + public bool Equals(VerifyWebhookSignatureOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.Signature == input.Signature || + (this.Signature != null && + this.Signature.Equals(input.Signature)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.Signature != null) + { + hashCode = (hashCode * 59) + this.Signature.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/VerifyWebhookSignatureResults.cs b/src/mailslurp/Model/VerifyWebhookSignatureResults.cs new file mode 100644 index 00000000..14c7d61c --- /dev/null +++ b/src/mailslurp/Model/VerifyWebhookSignatureResults.cs @@ -0,0 +1,130 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// VerifyWebhookSignatureResults + /// + [DataContract(Name = "VerifyWebhookSignatureResults")] + public partial class VerifyWebhookSignatureResults : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected VerifyWebhookSignatureResults() { } + /// + /// Initializes a new instance of the class. + /// + /// isValid (required). + public VerifyWebhookSignatureResults(bool isValid = default(bool)) + { + this.IsValid = isValid; + } + + /// + /// Gets or Sets IsValid + /// + [DataMember(Name = "isValid", IsRequired = true, EmitDefaultValue = true)] + public bool IsValid { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class VerifyWebhookSignatureResults {\n"); + sb.Append(" IsValid: ").Append(IsValid).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as VerifyWebhookSignatureResults); + } + + /// + /// Returns true if VerifyWebhookSignatureResults instances are equal + /// + /// Instance of VerifyWebhookSignatureResults to be compared + /// Boolean + public bool Equals(VerifyWebhookSignatureResults input) + { + if (input == null) + { + return false; + } + return + ( + this.IsValid == input.IsValid || + this.IsValid.Equals(input.IsValid) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.IsValid.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WaitForConditions.cs b/src/mailslurp/Model/WaitForConditions.cs new file mode 100644 index 00000000..21fad09b --- /dev/null +++ b/src/mailslurp/Model/WaitForConditions.cs @@ -0,0 +1,337 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Conditions to apply to emails that you are waiting for + /// + [DataContract(Name = "WaitForConditions")] + public partial class WaitForConditions : IEquatable, IValidatableObject + { + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + [JsonConverter(typeof(StringEnumConverter))] + public enum CountTypeEnum + { + /// + /// Enum EXACTLY for value: EXACTLY + /// + [EnumMember(Value = "EXACTLY")] + EXACTLY = 1, + + /// + /// Enum ATLEAST for value: ATLEAST + /// + [EnumMember(Value = "ATLEAST")] + ATLEAST = 2 + + } + + + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + [DataMember(Name = "countType", EmitDefaultValue = true)] + public CountTypeEnum? CountType { get; set; } + /// + /// Direction to sort matching emails by created time + /// + /// Direction to sort matching emails by created time + [JsonConverter(typeof(StringEnumConverter))] + public enum SortDirectionEnum + { + /// + /// Enum ASC for value: ASC + /// + [EnumMember(Value = "ASC")] + ASC = 1, + + /// + /// Enum DESC for value: DESC + /// + [EnumMember(Value = "DESC")] + DESC = 2 + + } + + + /// + /// Direction to sort matching emails by created time + /// + /// Direction to sort matching emails by created time + [DataMember(Name = "sortDirection", EmitDefaultValue = true)] + public SortDirectionEnum? SortDirection { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WaitForConditions() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. (required). + /// Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation.. + /// Max time in milliseconds to wait between retries if a `timeout` is specified.. + /// Max time in milliseconds to retry the `waitFor` operation until conditions are met. (required). + /// Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard.. + /// How result size should be compared with the expected size. Exactly or at-least matching result?. + /// Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for.. + /// Direction to sort matching emails by created time. + /// ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date. + /// ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date. + public WaitForConditions(Guid inboxId = default(Guid), int? count = default(int?), long? delayTimeout = default(long?), long timeout = default(long), bool? unreadOnly = default(bool?), CountTypeEnum? countType = default(CountTypeEnum?), List matches = default(List), SortDirectionEnum? sortDirection = default(SortDirectionEnum?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?)) + { + this.InboxId = inboxId; + this.Timeout = timeout; + this.Count = count; + this.DelayTimeout = delayTimeout; + this.UnreadOnly = unreadOnly; + this.CountType = countType; + this.Matches = matches; + this.SortDirection = sortDirection; + this.Since = since; + this.Before = before; + } + + /// + /// ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. + /// + /// ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. + /// + /// Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. + [DataMember(Name = "count", EmitDefaultValue = true)] + public int? Count { get; set; } + + /// + /// Max time in milliseconds to wait between retries if a `timeout` is specified. + /// + /// Max time in milliseconds to wait between retries if a `timeout` is specified. + [DataMember(Name = "delayTimeout", EmitDefaultValue = true)] + public long? DelayTimeout { get; set; } + + /// + /// Max time in milliseconds to retry the `waitFor` operation until conditions are met. + /// + /// Max time in milliseconds to retry the `waitFor` operation until conditions are met. + [DataMember(Name = "timeout", IsRequired = true, EmitDefaultValue = true)] + public long Timeout { get; set; } + + /// + /// Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard. + /// + /// Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard. + [DataMember(Name = "unreadOnly", EmitDefaultValue = true)] + public bool? UnreadOnly { get; set; } + + /// + /// Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. + /// + /// Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. + [DataMember(Name = "matches", EmitDefaultValue = true)] + public List Matches { get; set; } + + /// + /// ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date + /// + /// ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date + [DataMember(Name = "since", EmitDefaultValue = true)] + public DateTime? Since { get; set; } + + /// + /// ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date + /// + /// ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date + [DataMember(Name = "before", EmitDefaultValue = true)] + public DateTime? Before { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WaitForConditions {\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" DelayTimeout: ").Append(DelayTimeout).Append("\n"); + sb.Append(" Timeout: ").Append(Timeout).Append("\n"); + sb.Append(" UnreadOnly: ").Append(UnreadOnly).Append("\n"); + sb.Append(" CountType: ").Append(CountType).Append("\n"); + sb.Append(" Matches: ").Append(Matches).Append("\n"); + sb.Append(" SortDirection: ").Append(SortDirection).Append("\n"); + sb.Append(" Since: ").Append(Since).Append("\n"); + sb.Append(" Before: ").Append(Before).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WaitForConditions); + } + + /// + /// Returns true if WaitForConditions instances are equal + /// + /// Instance of WaitForConditions to be compared + /// Boolean + public bool Equals(WaitForConditions input) + { + if (input == null) + { + return false; + } + return + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ) && + ( + this.DelayTimeout == input.DelayTimeout || + (this.DelayTimeout != null && + this.DelayTimeout.Equals(input.DelayTimeout)) + ) && + ( + this.Timeout == input.Timeout || + this.Timeout.Equals(input.Timeout) + ) && + ( + this.UnreadOnly == input.UnreadOnly || + (this.UnreadOnly != null && + this.UnreadOnly.Equals(input.UnreadOnly)) + ) && + ( + this.CountType == input.CountType || + this.CountType.Equals(input.CountType) + ) && + ( + this.Matches == input.Matches || + this.Matches != null && + input.Matches != null && + this.Matches.SequenceEqual(input.Matches) + ) && + ( + this.SortDirection == input.SortDirection || + this.SortDirection.Equals(input.SortDirection) + ) && + ( + this.Since == input.Since || + (this.Since != null && + this.Since.Equals(input.Since)) + ) && + ( + this.Before == input.Before || + (this.Before != null && + this.Before.Equals(input.Before)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.Count != null) + { + hashCode = (hashCode * 59) + this.Count.GetHashCode(); + } + if (this.DelayTimeout != null) + { + hashCode = (hashCode * 59) + this.DelayTimeout.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Timeout.GetHashCode(); + if (this.UnreadOnly != null) + { + hashCode = (hashCode * 59) + this.UnreadOnly.GetHashCode(); + } + hashCode = (hashCode * 59) + this.CountType.GetHashCode(); + if (this.Matches != null) + { + hashCode = (hashCode * 59) + this.Matches.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SortDirection.GetHashCode(); + if (this.Since != null) + { + hashCode = (hashCode * 59) + this.Since.GetHashCode(); + } + if (this.Before != null) + { + hashCode = (hashCode * 59) + this.Before.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WaitForSingleSmsOptions.cs b/src/mailslurp/Model/WaitForSingleSmsOptions.cs new file mode 100644 index 00000000..14a90d2c --- /dev/null +++ b/src/mailslurp/Model/WaitForSingleSmsOptions.cs @@ -0,0 +1,246 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// WaitForSingleSmsOptions + /// + [DataContract(Name = "WaitForSingleSmsOptions")] + public partial class WaitForSingleSmsOptions : IEquatable, IValidatableObject + { + /// + /// Defines SortDirection + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SortDirectionEnum + { + /// + /// Enum ASC for value: ASC + /// + [EnumMember(Value = "ASC")] + ASC = 1, + + /// + /// Enum DESC for value: DESC + /// + [EnumMember(Value = "DESC")] + DESC = 2 + + } + + + /// + /// Gets or Sets SortDirection + /// + [DataMember(Name = "sortDirection", EmitDefaultValue = false)] + public SortDirectionEnum? SortDirection { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WaitForSingleSmsOptions() { } + /// + /// Initializes a new instance of the class. + /// + /// phoneNumberId (required). + /// timeout (required). + /// unreadOnly. + /// before. + /// since. + /// sortDirection. + /// delay. + public WaitForSingleSmsOptions(Guid phoneNumberId = default(Guid), long timeout = default(long), bool unreadOnly = default(bool), DateTime before = default(DateTime), DateTime since = default(DateTime), SortDirectionEnum? sortDirection = default(SortDirectionEnum?), long delay = default(long)) + { + this.PhoneNumberId = phoneNumberId; + this.Timeout = timeout; + this.UnreadOnly = unreadOnly; + this.Before = before; + this.Since = since; + this.SortDirection = sortDirection; + this.Delay = delay; + } + + /// + /// Gets or Sets PhoneNumberId + /// + [DataMember(Name = "phoneNumberId", IsRequired = true, EmitDefaultValue = true)] + public Guid PhoneNumberId { get; set; } + + /// + /// Gets or Sets Timeout + /// + [DataMember(Name = "timeout", IsRequired = true, EmitDefaultValue = true)] + public long Timeout { get; set; } + + /// + /// Gets or Sets UnreadOnly + /// + [DataMember(Name = "unreadOnly", EmitDefaultValue = true)] + public bool UnreadOnly { get; set; } + + /// + /// Gets or Sets Before + /// + [DataMember(Name = "before", EmitDefaultValue = false)] + public DateTime Before { get; set; } + + /// + /// Gets or Sets Since + /// + [DataMember(Name = "since", EmitDefaultValue = false)] + public DateTime Since { get; set; } + + /// + /// Gets or Sets Delay + /// + [DataMember(Name = "delay", EmitDefaultValue = false)] + public long Delay { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WaitForSingleSmsOptions {\n"); + sb.Append(" PhoneNumberId: ").Append(PhoneNumberId).Append("\n"); + sb.Append(" Timeout: ").Append(Timeout).Append("\n"); + sb.Append(" UnreadOnly: ").Append(UnreadOnly).Append("\n"); + sb.Append(" Before: ").Append(Before).Append("\n"); + sb.Append(" Since: ").Append(Since).Append("\n"); + sb.Append(" SortDirection: ").Append(SortDirection).Append("\n"); + sb.Append(" Delay: ").Append(Delay).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WaitForSingleSmsOptions); + } + + /// + /// Returns true if WaitForSingleSmsOptions instances are equal + /// + /// Instance of WaitForSingleSmsOptions to be compared + /// Boolean + public bool Equals(WaitForSingleSmsOptions input) + { + if (input == null) + { + return false; + } + return + ( + this.PhoneNumberId == input.PhoneNumberId || + (this.PhoneNumberId != null && + this.PhoneNumberId.Equals(input.PhoneNumberId)) + ) && + ( + this.Timeout == input.Timeout || + this.Timeout.Equals(input.Timeout) + ) && + ( + this.UnreadOnly == input.UnreadOnly || + this.UnreadOnly.Equals(input.UnreadOnly) + ) && + ( + this.Before == input.Before || + (this.Before != null && + this.Before.Equals(input.Before)) + ) && + ( + this.Since == input.Since || + (this.Since != null && + this.Since.Equals(input.Since)) + ) && + ( + this.SortDirection == input.SortDirection || + this.SortDirection.Equals(input.SortDirection) + ) && + ( + this.Delay == input.Delay || + this.Delay.Equals(input.Delay) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PhoneNumberId != null) + { + hashCode = (hashCode * 59) + this.PhoneNumberId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Timeout.GetHashCode(); + hashCode = (hashCode * 59) + this.UnreadOnly.GetHashCode(); + if (this.Before != null) + { + hashCode = (hashCode * 59) + this.Before.GetHashCode(); + } + if (this.Since != null) + { + hashCode = (hashCode * 59) + this.Since.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SortDirection.GetHashCode(); + hashCode = (hashCode * 59) + this.Delay.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WaitForSmsConditions.cs b/src/mailslurp/Model/WaitForSmsConditions.cs new file mode 100644 index 00000000..61a8fa18 --- /dev/null +++ b/src/mailslurp/Model/WaitForSmsConditions.cs @@ -0,0 +1,352 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Conditions to apply to emails that you are waiting for + /// + [DataContract(Name = "WaitForSmsConditions")] + public partial class WaitForSmsConditions : IEquatable, IValidatableObject + { + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + [JsonConverter(typeof(StringEnumConverter))] + public enum CountTypeEnum + { + /// + /// Enum EXACTLY for value: EXACTLY + /// + [EnumMember(Value = "EXACTLY")] + EXACTLY = 1, + + /// + /// Enum ATLEAST for value: ATLEAST + /// + [EnumMember(Value = "ATLEAST")] + ATLEAST = 2 + + } + + + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + /// + /// How result size should be compared with the expected size. Exactly or at-least matching result? + [DataMember(Name = "countType", EmitDefaultValue = true)] + public CountTypeEnum? CountType { get; set; } + /// + /// Direction to sort matching SMSs by created time + /// + /// Direction to sort matching SMSs by created time + [JsonConverter(typeof(StringEnumConverter))] + public enum SortDirectionEnum + { + /// + /// Enum ASC for value: ASC + /// + [EnumMember(Value = "ASC")] + ASC = 1, + + /// + /// Enum DESC for value: DESC + /// + [EnumMember(Value = "DESC")] + DESC = 2 + + } + + + /// + /// Direction to sort matching SMSs by created time + /// + /// Direction to sort matching SMSs by created time + [DataMember(Name = "sortDirection", EmitDefaultValue = true)] + public SortDirectionEnum? SortDirection { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WaitForSmsConditions() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. (required). + /// Limit results. + /// Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. (required). + /// Max time in milliseconds to wait between retries if a `timeout` is specified.. + /// Max time in milliseconds to retry the `waitFor` operation until conditions are met. (required). + /// Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard.. + /// How result size should be compared with the expected size. Exactly or at-least matching result?. + /// Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for.. + /// Direction to sort matching SMSs by created time. + /// ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date. + /// ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date. + public WaitForSmsConditions(Guid phoneNumberId = default(Guid), int? limit = default(int?), long count = default(long), long? delayTimeout = default(long?), long timeout = default(long), bool? unreadOnly = default(bool?), CountTypeEnum? countType = default(CountTypeEnum?), List matches = default(List), SortDirectionEnum? sortDirection = default(SortDirectionEnum?), DateTime? since = default(DateTime?), DateTime? before = default(DateTime?)) + { + this.PhoneNumberId = phoneNumberId; + this.Count = count; + this.Timeout = timeout; + this.Limit = limit; + this.DelayTimeout = delayTimeout; + this.UnreadOnly = unreadOnly; + this.CountType = countType; + this.Matches = matches; + this.SortDirection = sortDirection; + this.Since = since; + this.Before = before; + } + + /// + /// ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. + /// + /// ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. + [DataMember(Name = "phoneNumberId", IsRequired = true, EmitDefaultValue = true)] + public Guid PhoneNumberId { get; set; } + + /// + /// Limit results + /// + /// Limit results + [DataMember(Name = "limit", EmitDefaultValue = true)] + public int? Limit { get; set; } + + /// + /// Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. + /// + /// Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. + [DataMember(Name = "count", IsRequired = true, EmitDefaultValue = true)] + public long Count { get; set; } + + /// + /// Max time in milliseconds to wait between retries if a `timeout` is specified. + /// + /// Max time in milliseconds to wait between retries if a `timeout` is specified. + [DataMember(Name = "delayTimeout", EmitDefaultValue = true)] + public long? DelayTimeout { get; set; } + + /// + /// Max time in milliseconds to retry the `waitFor` operation until conditions are met. + /// + /// Max time in milliseconds to retry the `waitFor` operation until conditions are met. + [DataMember(Name = "timeout", IsRequired = true, EmitDefaultValue = true)] + public long Timeout { get; set; } + + /// + /// Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard. + /// + /// Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard. + [DataMember(Name = "unreadOnly", EmitDefaultValue = true)] + public bool? UnreadOnly { get; set; } + + /// + /// Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for. + /// + /// Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for. + [DataMember(Name = "matches", EmitDefaultValue = true)] + public List Matches { get; set; } + + /// + /// ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date + /// + /// ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date + [DataMember(Name = "since", EmitDefaultValue = true)] + public DateTime? Since { get; set; } + + /// + /// ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date + /// + /// ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date + [DataMember(Name = "before", EmitDefaultValue = true)] + public DateTime? Before { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WaitForSmsConditions {\n"); + sb.Append(" PhoneNumberId: ").Append(PhoneNumberId).Append("\n"); + sb.Append(" Limit: ").Append(Limit).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" DelayTimeout: ").Append(DelayTimeout).Append("\n"); + sb.Append(" Timeout: ").Append(Timeout).Append("\n"); + sb.Append(" UnreadOnly: ").Append(UnreadOnly).Append("\n"); + sb.Append(" CountType: ").Append(CountType).Append("\n"); + sb.Append(" Matches: ").Append(Matches).Append("\n"); + sb.Append(" SortDirection: ").Append(SortDirection).Append("\n"); + sb.Append(" Since: ").Append(Since).Append("\n"); + sb.Append(" Before: ").Append(Before).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WaitForSmsConditions); + } + + /// + /// Returns true if WaitForSmsConditions instances are equal + /// + /// Instance of WaitForSmsConditions to be compared + /// Boolean + public bool Equals(WaitForSmsConditions input) + { + if (input == null) + { + return false; + } + return + ( + this.PhoneNumberId == input.PhoneNumberId || + (this.PhoneNumberId != null && + this.PhoneNumberId.Equals(input.PhoneNumberId)) + ) && + ( + this.Limit == input.Limit || + (this.Limit != null && + this.Limit.Equals(input.Limit)) + ) && + ( + this.Count == input.Count || + this.Count.Equals(input.Count) + ) && + ( + this.DelayTimeout == input.DelayTimeout || + (this.DelayTimeout != null && + this.DelayTimeout.Equals(input.DelayTimeout)) + ) && + ( + this.Timeout == input.Timeout || + this.Timeout.Equals(input.Timeout) + ) && + ( + this.UnreadOnly == input.UnreadOnly || + (this.UnreadOnly != null && + this.UnreadOnly.Equals(input.UnreadOnly)) + ) && + ( + this.CountType == input.CountType || + this.CountType.Equals(input.CountType) + ) && + ( + this.Matches == input.Matches || + this.Matches != null && + input.Matches != null && + this.Matches.SequenceEqual(input.Matches) + ) && + ( + this.SortDirection == input.SortDirection || + this.SortDirection.Equals(input.SortDirection) + ) && + ( + this.Since == input.Since || + (this.Since != null && + this.Since.Equals(input.Since)) + ) && + ( + this.Before == input.Before || + (this.Before != null && + this.Before.Equals(input.Before)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PhoneNumberId != null) + { + hashCode = (hashCode * 59) + this.PhoneNumberId.GetHashCode(); + } + if (this.Limit != null) + { + hashCode = (hashCode * 59) + this.Limit.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Count.GetHashCode(); + if (this.DelayTimeout != null) + { + hashCode = (hashCode * 59) + this.DelayTimeout.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Timeout.GetHashCode(); + if (this.UnreadOnly != null) + { + hashCode = (hashCode * 59) + this.UnreadOnly.GetHashCode(); + } + hashCode = (hashCode * 59) + this.CountType.GetHashCode(); + if (this.Matches != null) + { + hashCode = (hashCode * 59) + this.Matches.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SortDirection.GetHashCode(); + if (this.Since != null) + { + hashCode = (hashCode * 59) + this.Since.GetHashCode(); + } + if (this.Before != null) + { + hashCode = (hashCode * 59) + this.Before.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookBouncePayload.cs b/src/mailslurp/Model/WebhookBouncePayload.cs new file mode 100644 index 00000000..461d629b --- /dev/null +++ b/src/mailslurp/Model/WebhookBouncePayload.cs @@ -0,0 +1,345 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// BOUNCE webhook payload. Sent to your webhook url endpoint via HTTP POST when an email bounced or was rejected by a recipient. Save the recipients to a ban list on your server and avoid emailing them again. It is recommended you also listen to the BOUNCE_RECIPIENT payload. + /// + [DataContract(Name = "WebhookBouncePayload")] + public partial class WebhookBouncePayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookBouncePayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the event type webhook is being triggered for. (required). + /// Name of the webhook being triggered. + /// ID of the bounce email record. Use the ID with the bounce controller to view more information (required). + /// Email sent to recipients. + /// Sender causing bounce (required). + /// Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation.. + public WebhookBouncePayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid bounceId = default(Guid), List sentToRecipients = default(List), string sender = default(string), List bounceRecipients = default(List)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookBouncePayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + this.BounceId = bounceId; + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new ArgumentNullException("sender is a required property for WebhookBouncePayload and cannot be null"); + } + this.Sender = sender; + this.WebhookName = webhookName; + this.SentToRecipients = sentToRecipients; + this.BounceRecipients = bounceRecipients; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// ID of the bounce email record. Use the ID with the bounce controller to view more information + /// + /// ID of the bounce email record. Use the ID with the bounce controller to view more information + [DataMember(Name = "bounceId", IsRequired = true, EmitDefaultValue = true)] + public Guid BounceId { get; set; } + + /// + /// Email sent to recipients + /// + /// Email sent to recipients + [DataMember(Name = "sentToRecipients", EmitDefaultValue = true)] + public List SentToRecipients { get; set; } + + /// + /// Sender causing bounce + /// + /// Sender causing bounce + [DataMember(Name = "sender", IsRequired = true, EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation. + /// + /// Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation. + [DataMember(Name = "bounceRecipients", EmitDefaultValue = true)] + public List BounceRecipients { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookBouncePayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" BounceId: ").Append(BounceId).Append("\n"); + sb.Append(" SentToRecipients: ").Append(SentToRecipients).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" BounceRecipients: ").Append(BounceRecipients).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookBouncePayload); + } + + /// + /// Returns true if WebhookBouncePayload instances are equal + /// + /// Instance of WebhookBouncePayload to be compared + /// Boolean + public bool Equals(WebhookBouncePayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.BounceId == input.BounceId || + (this.BounceId != null && + this.BounceId.Equals(input.BounceId)) + ) && + ( + this.SentToRecipients == input.SentToRecipients || + this.SentToRecipients != null && + input.SentToRecipients != null && + this.SentToRecipients.SequenceEqual(input.SentToRecipients) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.BounceRecipients == input.BounceRecipients || + this.BounceRecipients != null && + input.BounceRecipients != null && + this.BounceRecipients.SequenceEqual(input.BounceRecipients) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + if (this.BounceId != null) + { + hashCode = (hashCode * 59) + this.BounceId.GetHashCode(); + } + if (this.SentToRecipients != null) + { + hashCode = (hashCode * 59) + this.SentToRecipients.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + if (this.BounceRecipients != null) + { + hashCode = (hashCode * 59) + this.BounceRecipients.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookBounceRecipientPayload.cs b/src/mailslurp/Model/WebhookBounceRecipientPayload.cs new file mode 100644 index 00000000..b77ba0d6 --- /dev/null +++ b/src/mailslurp/Model/WebhookBounceRecipientPayload.cs @@ -0,0 +1,286 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// BOUNCE_RECIPIENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email caused a bounce to occur for a recipient. Save the recipient to a ban list of your server and avoid email them again. + /// + [DataContract(Name = "WebhookBounceRecipientPayload")] + public partial class WebhookBounceRecipientPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookBounceRecipientPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the event type webhook is being triggered for. (required). + /// Name of the webhook being triggered. + /// Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. (required). + public WebhookBounceRecipientPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), string recipient = default(string)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookBounceRecipientPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for WebhookBounceRecipientPayload and cannot be null"); + } + this.Recipient = recipient; + this.WebhookName = webhookName; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. + /// + /// Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookBounceRecipientPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookBounceRecipientPayload); + } + + /// + /// Returns true if WebhookBounceRecipientPayload instances are equal + /// + /// Instance of WebhookBounceRecipientPayload to be compared + /// Boolean + public bool Equals(WebhookBounceRecipientPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookDeliveryStatusPayload.cs b/src/mailslurp/Model/WebhookDeliveryStatusPayload.cs new file mode 100644 index 00000000..b8bc85b6 --- /dev/null +++ b/src/mailslurp/Model/WebhookDeliveryStatusPayload.cs @@ -0,0 +1,491 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// DELIVERY_STATUS webhook payload. Sent to your webhook url endpoint via HTTP POST when an email delivery status is created. This could be a successful delivery or a delivery failure. + /// + [DataContract(Name = "WebhookDeliveryStatusPayload")] + public partial class WebhookDeliveryStatusPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookDeliveryStatusPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the event type webhook is being triggered for. (required). + /// Name of the webhook being triggered. + /// ID of delivery status (required). + /// User ID of event (required). + /// ID of sent email. + /// IP address of the remote Mail Transfer Agent. + /// Id of the inbox. + /// Mail Transfer Agent reporting delivery status. + /// Recipients for delivery. + /// SMTP server response message. + /// SMTP server status. + /// Time in milliseconds for delivery processing. + /// Time event was received. + /// Email subject. + public WebhookDeliveryStatusPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid id = default(Guid), Guid userId = default(Guid), Guid? sentId = default(Guid?), string remoteMtaIp = default(string), Guid? inboxId = default(Guid?), string reportingMta = default(string), List recipients = default(List), string smtpResponse = default(string), int? smtpStatusCode = default(int?), long? processingTimeMillis = default(long?), DateTime? received = default(DateTime?), string subject = default(string)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookDeliveryStatusPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + this.Id = id; + this.UserId = userId; + this.WebhookName = webhookName; + this.SentId = sentId; + this.RemoteMtaIp = remoteMtaIp; + this.InboxId = inboxId; + this.ReportingMta = reportingMta; + this.Recipients = recipients; + this.SmtpResponse = smtpResponse; + this.SmtpStatusCode = smtpStatusCode; + this.ProcessingTimeMillis = processingTimeMillis; + this.Received = received; + this.Subject = subject; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// ID of delivery status + /// + /// ID of delivery status + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// User ID of event + /// + /// User ID of event + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// ID of sent email + /// + /// ID of sent email + [DataMember(Name = "sentId", EmitDefaultValue = true)] + public Guid? SentId { get; set; } + + /// + /// IP address of the remote Mail Transfer Agent + /// + /// IP address of the remote Mail Transfer Agent + [DataMember(Name = "remoteMtaIp", EmitDefaultValue = true)] + public string RemoteMtaIp { get; set; } + + /// + /// Id of the inbox + /// + /// Id of the inbox + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Mail Transfer Agent reporting delivery status + /// + /// Mail Transfer Agent reporting delivery status + [DataMember(Name = "reportingMta", EmitDefaultValue = true)] + public string ReportingMta { get; set; } + + /// + /// Recipients for delivery + /// + /// Recipients for delivery + [DataMember(Name = "recipients", EmitDefaultValue = true)] + public List Recipients { get; set; } + + /// + /// SMTP server response message + /// + /// SMTP server response message + [DataMember(Name = "smtpResponse", EmitDefaultValue = true)] + public string SmtpResponse { get; set; } + + /// + /// SMTP server status + /// + /// SMTP server status + [DataMember(Name = "smtpStatusCode", EmitDefaultValue = true)] + public int? SmtpStatusCode { get; set; } + + /// + /// Time in milliseconds for delivery processing + /// + /// Time in milliseconds for delivery processing + [DataMember(Name = "processingTimeMillis", EmitDefaultValue = true)] + public long? ProcessingTimeMillis { get; set; } + + /// + /// Time event was received + /// + /// Time event was received + [DataMember(Name = "received", EmitDefaultValue = true)] + public DateTime? Received { get; set; } + + /// + /// Email subject + /// + /// Email subject + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookDeliveryStatusPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" SentId: ").Append(SentId).Append("\n"); + sb.Append(" RemoteMtaIp: ").Append(RemoteMtaIp).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" ReportingMta: ").Append(ReportingMta).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" SmtpResponse: ").Append(SmtpResponse).Append("\n"); + sb.Append(" SmtpStatusCode: ").Append(SmtpStatusCode).Append("\n"); + sb.Append(" ProcessingTimeMillis: ").Append(ProcessingTimeMillis).Append("\n"); + sb.Append(" Received: ").Append(Received).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookDeliveryStatusPayload); + } + + /// + /// Returns true if WebhookDeliveryStatusPayload instances are equal + /// + /// Instance of WebhookDeliveryStatusPayload to be compared + /// Boolean + public bool Equals(WebhookDeliveryStatusPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.SentId == input.SentId || + (this.SentId != null && + this.SentId.Equals(input.SentId)) + ) && + ( + this.RemoteMtaIp == input.RemoteMtaIp || + (this.RemoteMtaIp != null && + this.RemoteMtaIp.Equals(input.RemoteMtaIp)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.ReportingMta == input.ReportingMta || + (this.ReportingMta != null && + this.ReportingMta.Equals(input.ReportingMta)) + ) && + ( + this.Recipients == input.Recipients || + this.Recipients != null && + input.Recipients != null && + this.Recipients.SequenceEqual(input.Recipients) + ) && + ( + this.SmtpResponse == input.SmtpResponse || + (this.SmtpResponse != null && + this.SmtpResponse.Equals(input.SmtpResponse)) + ) && + ( + this.SmtpStatusCode == input.SmtpStatusCode || + (this.SmtpStatusCode != null && + this.SmtpStatusCode.Equals(input.SmtpStatusCode)) + ) && + ( + this.ProcessingTimeMillis == input.ProcessingTimeMillis || + (this.ProcessingTimeMillis != null && + this.ProcessingTimeMillis.Equals(input.ProcessingTimeMillis)) + ) && + ( + this.Received == input.Received || + (this.Received != null && + this.Received.Equals(input.Received)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.SentId != null) + { + hashCode = (hashCode * 59) + this.SentId.GetHashCode(); + } + if (this.RemoteMtaIp != null) + { + hashCode = (hashCode * 59) + this.RemoteMtaIp.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.ReportingMta != null) + { + hashCode = (hashCode * 59) + this.ReportingMta.GetHashCode(); + } + if (this.Recipients != null) + { + hashCode = (hashCode * 59) + this.Recipients.GetHashCode(); + } + if (this.SmtpResponse != null) + { + hashCode = (hashCode * 59) + this.SmtpResponse.GetHashCode(); + } + if (this.SmtpStatusCode != null) + { + hashCode = (hashCode * 59) + this.SmtpStatusCode.GetHashCode(); + } + if (this.ProcessingTimeMillis != null) + { + hashCode = (hashCode * 59) + this.ProcessingTimeMillis.GetHashCode(); + } + if (this.Received != null) + { + hashCode = (hashCode * 59) + this.Received.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookDto.cs b/src/mailslurp/Model/WebhookDto.cs new file mode 100644 index 00000000..9d37eb94 --- /dev/null +++ b/src/mailslurp/Model/WebhookDto.cs @@ -0,0 +1,509 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://csharp.api.mailslurp.com/schemas/webhook-payload for the payload schema. + /// + [DataContract(Name = "WebhookDto")] + public partial class WebhookDto : IEquatable, IValidatableObject + { + /// + /// HTTP method that your server endpoint must listen for + /// + /// HTTP method that your server endpoint must listen for + [JsonConverter(typeof(StringEnumConverter))] + public enum MethodEnum + { + /// + /// Enum GET for value: GET + /// + [EnumMember(Value = "GET")] + GET = 1, + + /// + /// Enum HEAD for value: HEAD + /// + [EnumMember(Value = "HEAD")] + HEAD = 2, + + /// + /// Enum POST for value: POST + /// + [EnumMember(Value = "POST")] + POST = 3, + + /// + /// Enum PUT for value: PUT + /// + [EnumMember(Value = "PUT")] + PUT = 4, + + /// + /// Enum PATCH for value: PATCH + /// + [EnumMember(Value = "PATCH")] + PATCH = 5, + + /// + /// Enum DELETE for value: DELETE + /// + [EnumMember(Value = "DELETE")] + DELETE = 6, + + /// + /// Enum OPTIONS for value: OPTIONS + /// + [EnumMember(Value = "OPTIONS")] + OPTIONS = 7, + + /// + /// Enum TRACE for value: TRACE + /// + [EnumMember(Value = "TRACE")] + TRACE = 8 + + } + + + /// + /// HTTP method that your server endpoint must listen for + /// + /// HTTP method that your server endpoint must listen for + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] + public MethodEnum Method { get; set; } + /// + /// Webhook trigger event name + /// + /// Webhook trigger event name + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Webhook trigger event name + /// + /// Webhook trigger event name + [DataMember(Name = "eventName", EmitDefaultValue = true)] + public EventNameEnum? EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookDto() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the Webhook (required). + /// User ID of the Webhook (required). + /// Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. (required). + /// Name of the webhook. + /// The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set. + /// The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set. + /// Request body template for HTTP request that will be sent for the webhook. Use Moustache style template variables to insert values from the original event payload.. + /// URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. (required). + /// HTTP method that your server endpoint must listen for (required). + /// Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method (required). + /// When the webhook was created (required). + /// updatedAt (required). + /// Webhook trigger event name. + /// requestHeaders. + public WebhookDto(Guid id = default(Guid), Guid userId = default(Guid), bool basicAuth = default(bool), string name = default(string), Guid? phoneId = default(Guid?), Guid? inboxId = default(Guid?), string requestBodyTemplate = default(string), string url = default(string), MethodEnum method = default(MethodEnum), string payloadJsonSchema = default(string), DateTime? createdAt = default(DateTime?), DateTime updatedAt = default(DateTime), EventNameEnum? eventName = default(EventNameEnum?), WebhookHeaders requestHeaders = default(WebhookHeaders)) + { + this.Id = id; + this.UserId = userId; + this.BasicAuth = basicAuth; + // to ensure "url" is required (not null) + if (url == null) + { + throw new ArgumentNullException("url is a required property for WebhookDto and cannot be null"); + } + this.Url = url; + this.Method = method; + // to ensure "payloadJsonSchema" is required (not null) + if (payloadJsonSchema == null) + { + throw new ArgumentNullException("payloadJsonSchema is a required property for WebhookDto and cannot be null"); + } + this.PayloadJsonSchema = payloadJsonSchema; + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new ArgumentNullException("createdAt is a required property for WebhookDto and cannot be null"); + } + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Name = name; + this.PhoneId = phoneId; + this.InboxId = inboxId; + this.RequestBodyTemplate = requestBodyTemplate; + this.EventName = eventName; + this.RequestHeaders = requestHeaders; + } + + /// + /// ID of the Webhook + /// + /// ID of the Webhook + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// User ID of the Webhook + /// + /// User ID of the Webhook + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. + /// + /// Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. + [DataMember(Name = "basicAuth", IsRequired = true, EmitDefaultValue = true)] + public bool BasicAuth { get; set; } + + /// + /// Name of the webhook + /// + /// Name of the webhook + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set + /// + /// The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set + [DataMember(Name = "phoneId", EmitDefaultValue = true)] + public Guid? PhoneId { get; set; } + + /// + /// The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set + /// + /// The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Request body template for HTTP request that will be sent for the webhook. Use Moustache style template variables to insert values from the original event payload. + /// + /// Request body template for HTTP request that will be sent for the webhook. Use Moustache style template variables to insert values from the original event payload. + [DataMember(Name = "requestBodyTemplate", EmitDefaultValue = true)] + public string RequestBodyTemplate { get; set; } + + /// + /// URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. + /// + /// URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + public string Url { get; set; } + + /// + /// Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method + /// + /// Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method + [DataMember(Name = "payloadJsonSchema", IsRequired = true, EmitDefaultValue = true)] + public string PayloadJsonSchema { get; set; } + + /// + /// When the webhook was created + /// + /// When the webhook was created + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime? CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Gets or Sets RequestHeaders + /// + [DataMember(Name = "requestHeaders", EmitDefaultValue = false)] + public WebhookHeaders RequestHeaders { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" BasicAuth: ").Append(BasicAuth).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PhoneId: ").Append(PhoneId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" RequestBodyTemplate: ").Append(RequestBodyTemplate).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Method: ").Append(Method).Append("\n"); + sb.Append(" PayloadJsonSchema: ").Append(PayloadJsonSchema).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" RequestHeaders: ").Append(RequestHeaders).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookDto); + } + + /// + /// Returns true if WebhookDto instances are equal + /// + /// Instance of WebhookDto to be compared + /// Boolean + public bool Equals(WebhookDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.BasicAuth == input.BasicAuth || + this.BasicAuth.Equals(input.BasicAuth) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.PhoneId == input.PhoneId || + (this.PhoneId != null && + this.PhoneId.Equals(input.PhoneId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.RequestBodyTemplate == input.RequestBodyTemplate || + (this.RequestBodyTemplate != null && + this.RequestBodyTemplate.Equals(input.RequestBodyTemplate)) + ) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.Method == input.Method || + this.Method.Equals(input.Method) + ) && + ( + this.PayloadJsonSchema == input.PayloadJsonSchema || + (this.PayloadJsonSchema != null && + this.PayloadJsonSchema.Equals(input.PayloadJsonSchema)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.RequestHeaders == input.RequestHeaders || + (this.RequestHeaders != null && + this.RequestHeaders.Equals(input.RequestHeaders)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.BasicAuth.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.PhoneId != null) + { + hashCode = (hashCode * 59) + this.PhoneId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.RequestBodyTemplate != null) + { + hashCode = (hashCode * 59) + this.RequestBodyTemplate.GetHashCode(); + } + if (this.Url != null) + { + hashCode = (hashCode * 59) + this.Url.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Method.GetHashCode(); + if (this.PayloadJsonSchema != null) + { + hashCode = (hashCode * 59) + this.PayloadJsonSchema.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.RequestHeaders != null) + { + hashCode = (hashCode * 59) + this.RequestHeaders.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookEmailOpenedPayload.cs b/src/mailslurp/Model/WebhookEmailOpenedPayload.cs new file mode 100644 index 00000000..859718a5 --- /dev/null +++ b/src/mailslurp/Model/WebhookEmailOpenedPayload.cs @@ -0,0 +1,362 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// EMAIL_OPENED webhook payload. Sent to your webhook url endpoint via HTTP POST when an email containing a tracking pixel is opened and the pixel image is loaded by a reader. + /// + [DataContract(Name = "WebhookEmailOpenedPayload")] + public partial class WebhookEmailOpenedPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookEmailOpenedPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the event type webhook is being triggered for. (required). + /// Name of the webhook being triggered. + /// Id of the inbox (required). + /// ID of the tracking pixel (required). + /// ID of sent email (required). + /// Email address for the recipient of the tracking pixel (required). + /// Date time of event creation (required). + public WebhookEmailOpenedPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid inboxId = default(Guid), Guid pixelId = default(Guid), Guid sentEmailId = default(Guid), string recipient = default(string), DateTime createdAt = default(DateTime)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookEmailOpenedPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + this.InboxId = inboxId; + this.PixelId = pixelId; + this.SentEmailId = sentEmailId; + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for WebhookEmailOpenedPayload and cannot be null"); + } + this.Recipient = recipient; + this.CreatedAt = createdAt; + this.WebhookName = webhookName; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// Id of the inbox + /// + /// Id of the inbox + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// ID of the tracking pixel + /// + /// ID of the tracking pixel + [DataMember(Name = "pixelId", IsRequired = true, EmitDefaultValue = true)] + public Guid PixelId { get; set; } + + /// + /// ID of sent email + /// + /// ID of sent email + [DataMember(Name = "sentEmailId", IsRequired = true, EmitDefaultValue = true)] + public Guid SentEmailId { get; set; } + + /// + /// Email address for the recipient of the tracking pixel + /// + /// Email address for the recipient of the tracking pixel + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Date time of event creation + /// + /// Date time of event creation + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookEmailOpenedPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" PixelId: ").Append(PixelId).Append("\n"); + sb.Append(" SentEmailId: ").Append(SentEmailId).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookEmailOpenedPayload); + } + + /// + /// Returns true if WebhookEmailOpenedPayload instances are equal + /// + /// Instance of WebhookEmailOpenedPayload to be compared + /// Boolean + public bool Equals(WebhookEmailOpenedPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.PixelId == input.PixelId || + (this.PixelId != null && + this.PixelId.Equals(input.PixelId)) + ) && + ( + this.SentEmailId == input.SentEmailId || + (this.SentEmailId != null && + this.SentEmailId.Equals(input.SentEmailId)) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.PixelId != null) + { + hashCode = (hashCode * 59) + this.PixelId.GetHashCode(); + } + if (this.SentEmailId != null) + { + hashCode = (hashCode * 59) + this.SentEmailId.GetHashCode(); + } + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookEmailReadPayload.cs b/src/mailslurp/Model/WebhookEmailReadPayload.cs new file mode 100644 index 00000000..158c2382 --- /dev/null +++ b/src/mailslurp/Model/WebhookEmailReadPayload.cs @@ -0,0 +1,334 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// EMAIL_READ webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is read. This happens when an email is requested in full from the API or a user views the email in the dashboard. + /// + [DataContract(Name = "WebhookEmailReadPayload")] + public partial class WebhookEmailReadPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookEmailReadPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the event type webhook is being triggered for. (required). + /// Name of the webhook being triggered. + /// ID of the email that was received. Use this ID for fetching the email with the `EmailController`. (required). + /// Id of the inbox (required). + /// Is the email read (required). + /// Date time of event creation (required). + public WebhookEmailReadPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid emailId = default(Guid), Guid inboxId = default(Guid), bool emailIsRead = default(bool), DateTime createdAt = default(DateTime)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookEmailReadPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + this.EmailId = emailId; + this.InboxId = inboxId; + this.EmailIsRead = emailIsRead; + this.CreatedAt = createdAt; + this.WebhookName = webhookName; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// ID of the email that was received. Use this ID for fetching the email with the `EmailController`. + /// + /// ID of the email that was received. Use this ID for fetching the email with the `EmailController`. + [DataMember(Name = "emailId", IsRequired = true, EmitDefaultValue = true)] + public Guid EmailId { get; set; } + + /// + /// Id of the inbox + /// + /// Id of the inbox + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Is the email read + /// + /// Is the email read + [DataMember(Name = "emailIsRead", IsRequired = true, EmitDefaultValue = true)] + public bool EmailIsRead { get; set; } + + /// + /// Date time of event creation + /// + /// Date time of event creation + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookEmailReadPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" EmailId: ").Append(EmailId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" EmailIsRead: ").Append(EmailIsRead).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookEmailReadPayload); + } + + /// + /// Returns true if WebhookEmailReadPayload instances are equal + /// + /// Instance of WebhookEmailReadPayload to be compared + /// Boolean + public bool Equals(WebhookEmailReadPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.EmailId == input.EmailId || + (this.EmailId != null && + this.EmailId.Equals(input.EmailId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.EmailIsRead == input.EmailIsRead || + this.EmailIsRead.Equals(input.EmailIsRead) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + if (this.EmailId != null) + { + hashCode = (hashCode * 59) + this.EmailId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EmailIsRead.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookHeaderNameValue.cs b/src/mailslurp/Model/WebhookHeaderNameValue.cs new file mode 100644 index 00000000..ce4610b4 --- /dev/null +++ b/src/mailslurp/Model/WebhookHeaderNameValue.cs @@ -0,0 +1,164 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Name value pair for webhook header + /// + [DataContract(Name = "WebhookHeaderNameValue")] + public partial class WebhookHeaderNameValue : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookHeaderNameValue() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of header (required). + /// Value of header (required). + public WebhookHeaderNameValue(string name = default(string), string value = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for WebhookHeaderNameValue and cannot be null"); + } + this.Name = name; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for WebhookHeaderNameValue and cannot be null"); + } + this.Value = value; + } + + /// + /// Name of header + /// + /// Name of header + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Value of header + /// + /// Value of header + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookHeaderNameValue {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookHeaderNameValue); + } + + /// + /// Returns true if WebhookHeaderNameValue instances are equal + /// + /// Instance of WebhookHeaderNameValue to be compared + /// Boolean + public bool Equals(WebhookHeaderNameValue input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookHeaders.cs b/src/mailslurp/Model/WebhookHeaders.cs new file mode 100644 index 00000000..b5529eb8 --- /dev/null +++ b/src/mailslurp/Model/WebhookHeaders.cs @@ -0,0 +1,141 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Webhook HTTP headers to include with each request from MailSlurp to your server + /// + [DataContract(Name = "WebhookHeaders")] + public partial class WebhookHeaders : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookHeaders() { } + /// + /// Initializes a new instance of the class. + /// + /// List of header name value pairs to include with webhook requests (required). + public WebhookHeaders(List headers = default(List)) + { + // to ensure "headers" is required (not null) + if (headers == null) + { + throw new ArgumentNullException("headers is a required property for WebhookHeaders and cannot be null"); + } + this.Headers = headers; + } + + /// + /// List of header name value pairs to include with webhook requests + /// + /// List of header name value pairs to include with webhook requests + [DataMember(Name = "headers", IsRequired = true, EmitDefaultValue = true)] + public List Headers { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookHeaders {\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookHeaders); + } + + /// + /// Returns true if WebhookHeaders instances are equal + /// + /// Instance of WebhookHeaders to be compared + /// Boolean + public bool Equals(WebhookHeaders input) + { + if (input == null) + { + return false; + } + return + ( + this.Headers == input.Headers || + this.Headers != null && + input.Headers != null && + this.Headers.SequenceEqual(input.Headers) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Headers != null) + { + hashCode = (hashCode * 59) + this.Headers.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookNewAttachmentPayload.cs b/src/mailslurp/Model/WebhookNewAttachmentPayload.cs new file mode 100644 index 00000000..8bbb69ce --- /dev/null +++ b/src/mailslurp/Model/WebhookNewAttachmentPayload.cs @@ -0,0 +1,349 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// NEW_ATTACHMENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains an attachment. You can use the attachmentId to download the attachment. + /// + [DataContract(Name = "WebhookNewAttachmentPayload")] + public partial class WebhookNewAttachmentPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookNewAttachmentPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the webhook being triggered. + /// Name of the event type webhook is being triggered for. (required). + /// ID of attachment. Use the `AttachmentController` to (required). + /// Filename of the attachment if present (required). + /// Content type of attachment such as 'image/png' or 'application/pdf (required). + /// Size of attachment in bytes (required). + public WebhookNewAttachmentPayload(string messageId = default(string), Guid webhookId = default(Guid), string webhookName = default(string), EventNameEnum eventName = default(EventNameEnum), string attachmentId = default(string), string name = default(string), string contentType = default(string), long contentLength = default(long)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookNewAttachmentPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + // to ensure "attachmentId" is required (not null) + if (attachmentId == null) + { + throw new ArgumentNullException("attachmentId is a required property for WebhookNewAttachmentPayload and cannot be null"); + } + this.AttachmentId = attachmentId; + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for WebhookNewAttachmentPayload and cannot be null"); + } + this.Name = name; + // to ensure "contentType" is required (not null) + if (contentType == null) + { + throw new ArgumentNullException("contentType is a required property for WebhookNewAttachmentPayload and cannot be null"); + } + this.ContentType = contentType; + this.ContentLength = contentLength; + this.WebhookName = webhookName; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// ID of attachment. Use the `AttachmentController` to + /// + /// ID of attachment. Use the `AttachmentController` to + [DataMember(Name = "attachmentId", IsRequired = true, EmitDefaultValue = true)] + public string AttachmentId { get; set; } + + /// + /// Filename of the attachment if present + /// + /// Filename of the attachment if present + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Content type of attachment such as 'image/png' or 'application/pdf + /// + /// Content type of attachment such as 'image/png' or 'application/pdf + [DataMember(Name = "contentType", IsRequired = true, EmitDefaultValue = true)] + public string ContentType { get; set; } + + /// + /// Size of attachment in bytes + /// + /// Size of attachment in bytes + [DataMember(Name = "contentLength", IsRequired = true, EmitDefaultValue = true)] + public long ContentLength { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookNewAttachmentPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" AttachmentId: ").Append(AttachmentId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ContentType: ").Append(ContentType).Append("\n"); + sb.Append(" ContentLength: ").Append(ContentLength).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookNewAttachmentPayload); + } + + /// + /// Returns true if WebhookNewAttachmentPayload instances are equal + /// + /// Instance of WebhookNewAttachmentPayload to be compared + /// Boolean + public bool Equals(WebhookNewAttachmentPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.AttachmentId == input.AttachmentId || + (this.AttachmentId != null && + this.AttachmentId.Equals(input.AttachmentId)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ContentType == input.ContentType || + (this.ContentType != null && + this.ContentType.Equals(input.ContentType)) + ) && + ( + this.ContentLength == input.ContentLength || + this.ContentLength.Equals(input.ContentLength) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.AttachmentId != null) + { + hashCode = (hashCode * 59) + this.AttachmentId.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.ContentType != null) + { + hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ContentLength.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookNewContactPayload.cs b/src/mailslurp/Model/WebhookNewContactPayload.cs new file mode 100644 index 00000000..adba5dcd --- /dev/null +++ b/src/mailslurp/Model/WebhookNewContactPayload.cs @@ -0,0 +1,478 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// NEW_CONTACT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains a recipient that has not been saved as a contact. + /// + [DataContract(Name = "WebhookNewContactPayload")] + public partial class WebhookNewContactPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookNewContactPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the webhook being triggered. + /// Name of the event type webhook is being triggered for. (required). + /// Contact ID (required). + /// Contact group ID. + /// Contact first name. + /// Contact last name. + /// Contact company name. + /// Primary email address for contact. + /// Email addresses for contact (required). + /// Tags for contact (required). + /// metaData. + /// Has contact opted out of emails (required). + /// Date time of event creation (required). + public WebhookNewContactPayload(string messageId = default(string), Guid webhookId = default(Guid), string webhookName = default(string), EventNameEnum eventName = default(EventNameEnum), Guid contactId = default(Guid), Guid? groupId = default(Guid?), string firstName = default(string), string lastName = default(string), string company = default(string), string primaryEmailAddress = default(string), List emailAddresses = default(List), List tags = default(List), Object metaData = default(Object), bool optOut = default(bool), DateTime createdAt = default(DateTime)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookNewContactPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + this.ContactId = contactId; + // to ensure "emailAddresses" is required (not null) + if (emailAddresses == null) + { + throw new ArgumentNullException("emailAddresses is a required property for WebhookNewContactPayload and cannot be null"); + } + this.EmailAddresses = emailAddresses; + // to ensure "tags" is required (not null) + if (tags == null) + { + throw new ArgumentNullException("tags is a required property for WebhookNewContactPayload and cannot be null"); + } + this.Tags = tags; + this.OptOut = optOut; + this.CreatedAt = createdAt; + this.WebhookName = webhookName; + this.GroupId = groupId; + this.FirstName = firstName; + this.LastName = lastName; + this.Company = company; + this.PrimaryEmailAddress = primaryEmailAddress; + this.MetaData = metaData; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// Contact ID + /// + /// Contact ID + [DataMember(Name = "contactId", IsRequired = true, EmitDefaultValue = true)] + public Guid ContactId { get; set; } + + /// + /// Contact group ID + /// + /// Contact group ID + [DataMember(Name = "groupId", EmitDefaultValue = true)] + public Guid? GroupId { get; set; } + + /// + /// Contact first name + /// + /// Contact first name + [DataMember(Name = "firstName", EmitDefaultValue = true)] + public string FirstName { get; set; } + + /// + /// Contact last name + /// + /// Contact last name + [DataMember(Name = "lastName", EmitDefaultValue = true)] + public string LastName { get; set; } + + /// + /// Contact company name + /// + /// Contact company name + [DataMember(Name = "company", EmitDefaultValue = true)] + public string Company { get; set; } + + /// + /// Primary email address for contact + /// + /// Primary email address for contact + [DataMember(Name = "primaryEmailAddress", EmitDefaultValue = true)] + public string PrimaryEmailAddress { get; set; } + + /// + /// Email addresses for contact + /// + /// Email addresses for contact + [DataMember(Name = "emailAddresses", IsRequired = true, EmitDefaultValue = true)] + public List EmailAddresses { get; set; } + + /// + /// Tags for contact + /// + /// Tags for contact + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + public List Tags { get; set; } + + /// + /// Gets or Sets MetaData + /// + [DataMember(Name = "metaData", EmitDefaultValue = true)] + public Object MetaData { get; set; } + + /// + /// Has contact opted out of emails + /// + /// Has contact opted out of emails + [DataMember(Name = "optOut", IsRequired = true, EmitDefaultValue = true)] + public bool OptOut { get; set; } + + /// + /// Date time of event creation + /// + /// Date time of event creation + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookNewContactPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" ContactId: ").Append(ContactId).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" PrimaryEmailAddress: ").Append(PrimaryEmailAddress).Append("\n"); + sb.Append(" EmailAddresses: ").Append(EmailAddresses).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" MetaData: ").Append(MetaData).Append("\n"); + sb.Append(" OptOut: ").Append(OptOut).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookNewContactPayload); + } + + /// + /// Returns true if WebhookNewContactPayload instances are equal + /// + /// Instance of WebhookNewContactPayload to be compared + /// Boolean + public bool Equals(WebhookNewContactPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.ContactId == input.ContactId || + (this.ContactId != null && + this.ContactId.Equals(input.ContactId)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.PrimaryEmailAddress == input.PrimaryEmailAddress || + (this.PrimaryEmailAddress != null && + this.PrimaryEmailAddress.Equals(input.PrimaryEmailAddress)) + ) && + ( + this.EmailAddresses == input.EmailAddresses || + this.EmailAddresses != null && + input.EmailAddresses != null && + this.EmailAddresses.SequenceEqual(input.EmailAddresses) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.MetaData == input.MetaData || + (this.MetaData != null && + this.MetaData.Equals(input.MetaData)) + ) && + ( + this.OptOut == input.OptOut || + this.OptOut.Equals(input.OptOut) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.ContactId != null) + { + hashCode = (hashCode * 59) + this.ContactId.GetHashCode(); + } + if (this.GroupId != null) + { + hashCode = (hashCode * 59) + this.GroupId.GetHashCode(); + } + if (this.FirstName != null) + { + hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + } + if (this.LastName != null) + { + hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + } + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + if (this.PrimaryEmailAddress != null) + { + hashCode = (hashCode * 59) + this.PrimaryEmailAddress.GetHashCode(); + } + if (this.EmailAddresses != null) + { + hashCode = (hashCode * 59) + this.EmailAddresses.GetHashCode(); + } + if (this.Tags != null) + { + hashCode = (hashCode * 59) + this.Tags.GetHashCode(); + } + if (this.MetaData != null) + { + hashCode = (hashCode * 59) + this.MetaData.GetHashCode(); + } + hashCode = (hashCode * 59) + this.OptOut.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookNewEmailPayload.cs b/src/mailslurp/Model/WebhookNewEmailPayload.cs new file mode 100644 index 00000000..80c695fe --- /dev/null +++ b/src/mailslurp/Model/WebhookNewEmailPayload.cs @@ -0,0 +1,481 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// NEW_EMAIL webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to. Use the email ID to fetch the full email body or attachments. + /// + [DataContract(Name = "WebhookNewEmailPayload")] + public partial class WebhookNewEmailPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookNewEmailPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the event type webhook is being triggered for. (required). + /// Name of the webhook being triggered. + /// Id of the inbox (required). + /// Id of the domain that received an email. + /// ID of the email that was received. Use this ID for fetching the email with the `EmailController`. (required). + /// Date time of event creation (required). + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. (required). + /// Who the email was sent from. An email address - see fromName for the sender name. (required). + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. (required). + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. (required). + /// The subject line of the email message as specified by SMTP subject header. + /// List of attachment meta data objects if attachments present (required). + public WebhookNewEmailPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid inboxId = default(Guid), Guid? domainId = default(Guid?), Guid emailId = default(Guid), DateTime createdAt = default(DateTime), List to = default(List), string from = default(string), List cc = default(List), List bcc = default(List), string subject = default(string), List attachmentMetaDatas = default(List)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookNewEmailPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + this.InboxId = inboxId; + this.EmailId = emailId; + this.CreatedAt = createdAt; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for WebhookNewEmailPayload and cannot be null"); + } + this.To = to; + // to ensure "from" is required (not null) + if (from == null) + { + throw new ArgumentNullException("from is a required property for WebhookNewEmailPayload and cannot be null"); + } + this.From = from; + // to ensure "cc" is required (not null) + if (cc == null) + { + throw new ArgumentNullException("cc is a required property for WebhookNewEmailPayload and cannot be null"); + } + this.Cc = cc; + // to ensure "bcc" is required (not null) + if (bcc == null) + { + throw new ArgumentNullException("bcc is a required property for WebhookNewEmailPayload and cannot be null"); + } + this.Bcc = bcc; + // to ensure "attachmentMetaDatas" is required (not null) + if (attachmentMetaDatas == null) + { + throw new ArgumentNullException("attachmentMetaDatas is a required property for WebhookNewEmailPayload and cannot be null"); + } + this.AttachmentMetaDatas = attachmentMetaDatas; + this.WebhookName = webhookName; + this.DomainId = domainId; + this.Subject = subject; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// Id of the inbox + /// + /// Id of the inbox + [DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)] + public Guid InboxId { get; set; } + + /// + /// Id of the domain that received an email + /// + /// Id of the domain that received an email + [DataMember(Name = "domainId", EmitDefaultValue = true)] + public Guid? DomainId { get; set; } + + /// + /// ID of the email that was received. Use this ID for fetching the email with the `EmailController`. + /// + /// ID of the email that was received. Use this ID for fetching the email with the `EmailController`. + [DataMember(Name = "emailId", IsRequired = true, EmitDefaultValue = true)] + public Guid EmailId { get; set; } + + /// + /// Date time of event creation + /// + /// Date time of event creation + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// Who the email was sent from. An email address - see fromName for the sender name. + /// + /// Who the email was sent from. An email address - see fromName for the sender name. + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "cc", IsRequired = true, EmitDefaultValue = true)] + public List Cc { get; set; } + + /// + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + /// + /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + [DataMember(Name = "bcc", IsRequired = true, EmitDefaultValue = true)] + public List Bcc { get; set; } + + /// + /// The subject line of the email message as specified by SMTP subject header + /// + /// The subject line of the email message as specified by SMTP subject header + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// List of attachment meta data objects if attachments present + /// + /// List of attachment meta data objects if attachments present + [DataMember(Name = "attachmentMetaDatas", IsRequired = true, EmitDefaultValue = true)] + public List AttachmentMetaDatas { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookNewEmailPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" DomainId: ").Append(DomainId).Append("\n"); + sb.Append(" EmailId: ").Append(EmailId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" AttachmentMetaDatas: ").Append(AttachmentMetaDatas).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookNewEmailPayload); + } + + /// + /// Returns true if WebhookNewEmailPayload instances are equal + /// + /// Instance of WebhookNewEmailPayload to be compared + /// Boolean + public bool Equals(WebhookNewEmailPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.DomainId == input.DomainId || + (this.DomainId != null && + this.DomainId.Equals(input.DomainId)) + ) && + ( + this.EmailId == input.EmailId || + (this.EmailId != null && + this.EmailId.Equals(input.EmailId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.To == input.To || + this.To != null && + input.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + input.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + input.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.AttachmentMetaDatas == input.AttachmentMetaDatas || + this.AttachmentMetaDatas != null && + input.AttachmentMetaDatas != null && + this.AttachmentMetaDatas.SequenceEqual(input.AttachmentMetaDatas) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.DomainId != null) + { + hashCode = (hashCode * 59) + this.DomainId.GetHashCode(); + } + if (this.EmailId != null) + { + hashCode = (hashCode * 59) + this.EmailId.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.To != null) + { + hashCode = (hashCode * 59) + this.To.GetHashCode(); + } + if (this.From != null) + { + hashCode = (hashCode * 59) + this.From.GetHashCode(); + } + if (this.Cc != null) + { + hashCode = (hashCode * 59) + this.Cc.GetHashCode(); + } + if (this.Bcc != null) + { + hashCode = (hashCode * 59) + this.Bcc.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.AttachmentMetaDatas != null) + { + hashCode = (hashCode * 59) + this.AttachmentMetaDatas.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookNewSmsPayload.cs b/src/mailslurp/Model/WebhookNewSmsPayload.cs new file mode 100644 index 00000000..c2f6ee5d --- /dev/null +++ b/src/mailslurp/Model/WebhookNewSmsPayload.cs @@ -0,0 +1,406 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// NEW_SMS webhook payload. Sent to your webhook url endpoint via HTTP POST when an sms is received by the phone number that your webhook is attached to. Use the SMS ID to fetch the full SMS details. + /// + [DataContract(Name = "WebhookNewSmsPayload")] + public partial class WebhookNewSmsPayload : IEquatable, IValidatableObject + { + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Name of the event type webhook is being triggered for. + /// + /// Name of the event type webhook is being triggered for. + [DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)] + public EventNameEnum EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookNewSmsPayload() { } + /// + /// Initializes a new instance of the class. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). + /// ID of webhook entity being triggered (required). + /// Name of the event type webhook is being triggered for. (required). + /// Name of the webhook being triggered. + /// ID of SMS message (required). + /// User ID of event (required). + /// ID of phone number receiving SMS (required). + /// Recipient phone number (required). + /// Sender phone number (required). + /// SMS message body (required). + /// SMS has been read (required). + public WebhookNewSmsPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid smsId = default(Guid), Guid userId = default(Guid), Guid phoneNumber = default(Guid), string toNumber = default(string), string fromNumber = default(string), string body = default(string), bool read = default(bool)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookNewSmsPayload and cannot be null"); + } + this.MessageId = messageId; + this.WebhookId = webhookId; + this.EventName = eventName; + this.SmsId = smsId; + this.UserId = userId; + this.PhoneNumber = phoneNumber; + // to ensure "toNumber" is required (not null) + if (toNumber == null) + { + throw new ArgumentNullException("toNumber is a required property for WebhookNewSmsPayload and cannot be null"); + } + this.ToNumber = toNumber; + // to ensure "fromNumber" is required (not null) + if (fromNumber == null) + { + throw new ArgumentNullException("fromNumber is a required property for WebhookNewSmsPayload and cannot be null"); + } + this.FromNumber = fromNumber; + // to ensure "body" is required (not null) + if (body == null) + { + throw new ArgumentNullException("body is a required property for WebhookNewSmsPayload and cannot be null"); + } + this.Body = body; + this.Read = read; + this.WebhookName = webhookName; + } + + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + /// + /// Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// ID of webhook entity being triggered + /// + /// ID of webhook entity being triggered + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Name of the webhook being triggered + /// + /// Name of the webhook being triggered + [DataMember(Name = "webhookName", EmitDefaultValue = true)] + public string WebhookName { get; set; } + + /// + /// ID of SMS message + /// + /// ID of SMS message + [DataMember(Name = "smsId", IsRequired = true, EmitDefaultValue = true)] + public Guid SmsId { get; set; } + + /// + /// User ID of event + /// + /// User ID of event + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// ID of phone number receiving SMS + /// + /// ID of phone number receiving SMS + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] + public Guid PhoneNumber { get; set; } + + /// + /// Recipient phone number + /// + /// Recipient phone number + [DataMember(Name = "toNumber", IsRequired = true, EmitDefaultValue = true)] + public string ToNumber { get; set; } + + /// + /// Sender phone number + /// + /// Sender phone number + [DataMember(Name = "fromNumber", IsRequired = true, EmitDefaultValue = true)] + public string FromNumber { get; set; } + + /// + /// SMS message body + /// + /// SMS message body + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] + public string Body { get; set; } + + /// + /// SMS has been read + /// + /// SMS has been read + [DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)] + public bool Read { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookNewSmsPayload {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" WebhookName: ").Append(WebhookName).Append("\n"); + sb.Append(" SmsId: ").Append(SmsId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" ToNumber: ").Append(ToNumber).Append("\n"); + sb.Append(" FromNumber: ").Append(FromNumber).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" Read: ").Append(Read).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookNewSmsPayload); + } + + /// + /// Returns true if WebhookNewSmsPayload instances are equal + /// + /// Instance of WebhookNewSmsPayload to be compared + /// Boolean + public bool Equals(WebhookNewSmsPayload input) + { + if (input == null) + { + return false; + } + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.WebhookName == input.WebhookName || + (this.WebhookName != null && + this.WebhookName.Equals(input.WebhookName)) + ) && + ( + this.SmsId == input.SmsId || + (this.SmsId != null && + this.SmsId.Equals(input.SmsId)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ) && + ( + this.ToNumber == input.ToNumber || + (this.ToNumber != null && + this.ToNumber.Equals(input.ToNumber)) + ) && + ( + this.FromNumber == input.FromNumber || + (this.FromNumber != null && + this.FromNumber.Equals(input.FromNumber)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.Read == input.Read || + this.Read.Equals(input.Read) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.WebhookName != null) + { + hashCode = (hashCode * 59) + this.WebhookName.GetHashCode(); + } + if (this.SmsId != null) + { + hashCode = (hashCode * 59) + this.SmsId.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.PhoneNumber != null) + { + hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); + } + if (this.ToNumber != null) + { + hashCode = (hashCode * 59) + this.ToNumber.GetHashCode(); + } + if (this.FromNumber != null) + { + hashCode = (hashCode * 59) + this.FromNumber.GetHashCode(); + } + if (this.Body != null) + { + hashCode = (hashCode * 59) + this.Body.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Read.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookProjection.cs b/src/mailslurp/Model/WebhookProjection.cs new file mode 100644 index 00000000..2b714c02 --- /dev/null +++ b/src/mailslurp/Model/WebhookProjection.cs @@ -0,0 +1,329 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Representation of a webhook + /// + [DataContract(Name = "WebhookProjection")] + public partial class WebhookProjection : IEquatable, IValidatableObject + { + /// + /// Defines EventName + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EventNameEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Gets or Sets EventName + /// + [DataMember(Name = "eventName", EmitDefaultValue = false)] + public EventNameEnum? EventName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookProjection() { } + /// + /// Initializes a new instance of the class. + /// + /// name. + /// id (required). + /// url (required). + /// inboxId. + /// eventName. + /// createdAt (required). + /// updatedAt (required). + /// phoneNumberId. + public WebhookProjection(string name = default(string), Guid id = default(Guid), string url = default(string), Guid inboxId = default(Guid), EventNameEnum? eventName = default(EventNameEnum?), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), Guid phoneNumberId = default(Guid)) + { + this.Id = id; + // to ensure "url" is required (not null) + if (url == null) + { + throw new ArgumentNullException("url is a required property for WebhookProjection and cannot be null"); + } + this.Url = url; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Name = name; + this.InboxId = inboxId; + this.EventName = eventName; + this.PhoneNumberId = phoneNumberId; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public Guid Id { get; set; } + + /// + /// Gets or Sets Url + /// + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + public string Url { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = false)] + public Guid InboxId { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Gets or Sets PhoneNumberId + /// + [DataMember(Name = "phoneNumberId", EmitDefaultValue = false)] + public Guid PhoneNumberId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookProjection {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" EventName: ").Append(EventName).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" PhoneNumberId: ").Append(PhoneNumberId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookProjection); + } + + /// + /// Returns true if WebhookProjection instances are equal + /// + /// Instance of WebhookProjection to be compared + /// Boolean + public bool Equals(WebhookProjection input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.EventName == input.EventName || + this.EventName.Equals(input.EventName) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.PhoneNumberId == input.PhoneNumberId || + (this.PhoneNumberId != null && + this.PhoneNumberId.Equals(input.PhoneNumberId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Url != null) + { + hashCode = (hashCode * 59) + this.Url.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.EventName.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + if (this.PhoneNumberId != null) + { + hashCode = (hashCode * 59) + this.PhoneNumberId.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookRedriveResult.cs b/src/mailslurp/Model/WebhookRedriveResult.cs new file mode 100644 index 00000000..09104578 --- /dev/null +++ b/src/mailslurp/Model/WebhookRedriveResult.cs @@ -0,0 +1,166 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of retrying webhook + /// + [DataContract(Name = "WebhookRedriveResult")] + public partial class WebhookRedriveResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookRedriveResult() { } + /// + /// Initializes a new instance of the class. + /// + /// webhookResultId (required). + /// success (required). + /// message. + public WebhookRedriveResult(Guid webhookResultId = default(Guid), bool success = default(bool), string message = default(string)) + { + this.WebhookResultId = webhookResultId; + this.Success = success; + this.Message = message; + } + + /// + /// Gets or Sets WebhookResultId + /// + [DataMember(Name = "webhookResultId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookResultId { get; set; } + + /// + /// Gets or Sets Success + /// + [DataMember(Name = "success", IsRequired = true, EmitDefaultValue = true)] + public bool Success { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookRedriveResult {\n"); + sb.Append(" WebhookResultId: ").Append(WebhookResultId).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookRedriveResult); + } + + /// + /// Returns true if WebhookRedriveResult instances are equal + /// + /// Instance of WebhookRedriveResult to be compared + /// Boolean + public bool Equals(WebhookRedriveResult input) + { + if (input == null) + { + return false; + } + return + ( + this.WebhookResultId == input.WebhookResultId || + (this.WebhookResultId != null && + this.WebhookResultId.Equals(input.WebhookResultId)) + ) && + ( + this.Success == input.Success || + this.Success.Equals(input.Success) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.WebhookResultId != null) + { + hashCode = (hashCode * 59) + this.WebhookResultId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Success.GetHashCode(); + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookResultDto.cs b/src/mailslurp/Model/WebhookResultDto.cs new file mode 100644 index 00000000..d198351c --- /dev/null +++ b/src/mailslurp/Model/WebhookResultDto.cs @@ -0,0 +1,544 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of a webhook notification + /// + [DataContract(Name = "WebhookResultDto")] + public partial class WebhookResultDto : IEquatable, IValidatableObject + { + /// + /// Defines HttpMethod + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum HttpMethodEnum + { + /// + /// Enum GET for value: GET + /// + [EnumMember(Value = "GET")] + GET = 1, + + /// + /// Enum HEAD for value: HEAD + /// + [EnumMember(Value = "HEAD")] + HEAD = 2, + + /// + /// Enum POST for value: POST + /// + [EnumMember(Value = "POST")] + POST = 3, + + /// + /// Enum PUT for value: PUT + /// + [EnumMember(Value = "PUT")] + PUT = 4, + + /// + /// Enum PATCH for value: PATCH + /// + [EnumMember(Value = "PATCH")] + PATCH = 5, + + /// + /// Enum DELETE for value: DELETE + /// + [EnumMember(Value = "DELETE")] + DELETE = 6, + + /// + /// Enum OPTIONS for value: OPTIONS + /// + [EnumMember(Value = "OPTIONS")] + OPTIONS = 7, + + /// + /// Enum TRACE for value: TRACE + /// + [EnumMember(Value = "TRACE")] + TRACE = 8 + + } + + + /// + /// Gets or Sets HttpMethod + /// + [DataMember(Name = "httpMethod", IsRequired = true, EmitDefaultValue = true)] + public HttpMethodEnum HttpMethod { get; set; } + /// + /// Defines WebhookEvent + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum WebhookEventEnum + { + /// + /// Enum EMAILRECEIVED for value: EMAIL_RECEIVED + /// + [EnumMember(Value = "EMAIL_RECEIVED")] + EMAILRECEIVED = 1, + + /// + /// Enum NEWEMAIL for value: NEW_EMAIL + /// + [EnumMember(Value = "NEW_EMAIL")] + NEWEMAIL = 2, + + /// + /// Enum NEWCONTACT for value: NEW_CONTACT + /// + [EnumMember(Value = "NEW_CONTACT")] + NEWCONTACT = 3, + + /// + /// Enum NEWATTACHMENT for value: NEW_ATTACHMENT + /// + [EnumMember(Value = "NEW_ATTACHMENT")] + NEWATTACHMENT = 4, + + /// + /// Enum EMAILOPENED for value: EMAIL_OPENED + /// + [EnumMember(Value = "EMAIL_OPENED")] + EMAILOPENED = 5, + + /// + /// Enum EMAILREAD for value: EMAIL_READ + /// + [EnumMember(Value = "EMAIL_READ")] + EMAILREAD = 6, + + /// + /// Enum DELIVERYSTATUS for value: DELIVERY_STATUS + /// + [EnumMember(Value = "DELIVERY_STATUS")] + DELIVERYSTATUS = 7, + + /// + /// Enum BOUNCE for value: BOUNCE + /// + [EnumMember(Value = "BOUNCE")] + BOUNCE = 8, + + /// + /// Enum BOUNCERECIPIENT for value: BOUNCE_RECIPIENT + /// + [EnumMember(Value = "BOUNCE_RECIPIENT")] + BOUNCERECIPIENT = 9, + + /// + /// Enum NEWSMS for value: NEW_SMS + /// + [EnumMember(Value = "NEW_SMS")] + NEWSMS = 10 + + } + + + /// + /// Gets or Sets WebhookEvent + /// + [DataMember(Name = "webhookEvent", IsRequired = true, EmitDefaultValue = true)] + public WebhookEventEnum WebhookEvent { get; set; } + /// + /// Defines ResultType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ResultTypeEnum + { + /// + /// Enum BADRESPONSE for value: BAD_RESPONSE + /// + [EnumMember(Value = "BAD_RESPONSE")] + BADRESPONSE = 1, + + /// + /// Enum EXCEPTION for value: EXCEPTION + /// + [EnumMember(Value = "EXCEPTION")] + EXCEPTION = 2, + + /// + /// Enum SUCCESS for value: SUCCESS + /// + [EnumMember(Value = "SUCCESS")] + SUCCESS = 3 + + } + + + /// + /// Gets or Sets ResultType + /// + [DataMember(Name = "resultType", EmitDefaultValue = true)] + public ResultTypeEnum? ResultType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookResultDto() { } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// userId (required). + /// inboxId. + /// webhookId (required). + /// webhookUrl (required). + /// messageId (required). + /// redriveId. + /// httpMethod (required). + /// webhookEvent (required). + /// responseStatus. + /// responseTimeMillis (required). + /// responseBodyExtract. + /// resultType. + /// createdAt (required). + /// updatedAt (required). + /// seen (required). + public WebhookResultDto(Guid? id = default(Guid?), Guid userId = default(Guid), Guid? inboxId = default(Guid?), Guid webhookId = default(Guid), string webhookUrl = default(string), string messageId = default(string), Guid? redriveId = default(Guid?), HttpMethodEnum httpMethod = default(HttpMethodEnum), WebhookEventEnum webhookEvent = default(WebhookEventEnum), int? responseStatus = default(int?), long responseTimeMillis = default(long), string responseBodyExtract = default(string), ResultTypeEnum? resultType = default(ResultTypeEnum?), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), bool seen = default(bool)) + { + this.UserId = userId; + this.WebhookId = webhookId; + // to ensure "webhookUrl" is required (not null) + if (webhookUrl == null) + { + throw new ArgumentNullException("webhookUrl is a required property for WebhookResultDto and cannot be null"); + } + this.WebhookUrl = webhookUrl; + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for WebhookResultDto and cannot be null"); + } + this.MessageId = messageId; + this.HttpMethod = httpMethod; + this.WebhookEvent = webhookEvent; + this.ResponseTimeMillis = responseTimeMillis; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Seen = seen; + this.Id = id; + this.InboxId = inboxId; + this.RedriveId = redriveId; + this.ResponseStatus = responseStatus; + this.ResponseBodyExtract = responseBodyExtract; + this.ResultType = resultType; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = true)] + public Guid? Id { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public Guid UserId { get; set; } + + /// + /// Gets or Sets InboxId + /// + [DataMember(Name = "inboxId", EmitDefaultValue = true)] + public Guid? InboxId { get; set; } + + /// + /// Gets or Sets WebhookId + /// + [DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)] + public Guid WebhookId { get; set; } + + /// + /// Gets or Sets WebhookUrl + /// + [DataMember(Name = "webhookUrl", IsRequired = true, EmitDefaultValue = true)] + public string WebhookUrl { get; set; } + + /// + /// Gets or Sets MessageId + /// + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// Gets or Sets RedriveId + /// + [DataMember(Name = "redriveId", EmitDefaultValue = true)] + public Guid? RedriveId { get; set; } + + /// + /// Gets or Sets ResponseStatus + /// + [DataMember(Name = "responseStatus", EmitDefaultValue = true)] + public int? ResponseStatus { get; set; } + + /// + /// Gets or Sets ResponseTimeMillis + /// + [DataMember(Name = "responseTimeMillis", IsRequired = true, EmitDefaultValue = true)] + public long ResponseTimeMillis { get; set; } + + /// + /// Gets or Sets ResponseBodyExtract + /// + [DataMember(Name = "responseBodyExtract", EmitDefaultValue = true)] + public string ResponseBodyExtract { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Gets or Sets Seen + /// + [DataMember(Name = "seen", IsRequired = true, EmitDefaultValue = true)] + public bool Seen { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookResultDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" InboxId: ").Append(InboxId).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" WebhookUrl: ").Append(WebhookUrl).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" RedriveId: ").Append(RedriveId).Append("\n"); + sb.Append(" HttpMethod: ").Append(HttpMethod).Append("\n"); + sb.Append(" WebhookEvent: ").Append(WebhookEvent).Append("\n"); + sb.Append(" ResponseStatus: ").Append(ResponseStatus).Append("\n"); + sb.Append(" ResponseTimeMillis: ").Append(ResponseTimeMillis).Append("\n"); + sb.Append(" ResponseBodyExtract: ").Append(ResponseBodyExtract).Append("\n"); + sb.Append(" ResultType: ").Append(ResultType).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Seen: ").Append(Seen).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookResultDto); + } + + /// + /// Returns true if WebhookResultDto instances are equal + /// + /// Instance of WebhookResultDto to be compared + /// Boolean + public bool Equals(WebhookResultDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.InboxId == input.InboxId || + (this.InboxId != null && + this.InboxId.Equals(input.InboxId)) + ) && + ( + this.WebhookId == input.WebhookId || + (this.WebhookId != null && + this.WebhookId.Equals(input.WebhookId)) + ) && + ( + this.WebhookUrl == input.WebhookUrl || + (this.WebhookUrl != null && + this.WebhookUrl.Equals(input.WebhookUrl)) + ) && + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.RedriveId == input.RedriveId || + (this.RedriveId != null && + this.RedriveId.Equals(input.RedriveId)) + ) && + ( + this.HttpMethod == input.HttpMethod || + this.HttpMethod.Equals(input.HttpMethod) + ) && + ( + this.WebhookEvent == input.WebhookEvent || + this.WebhookEvent.Equals(input.WebhookEvent) + ) && + ( + this.ResponseStatus == input.ResponseStatus || + (this.ResponseStatus != null && + this.ResponseStatus.Equals(input.ResponseStatus)) + ) && + ( + this.ResponseTimeMillis == input.ResponseTimeMillis || + this.ResponseTimeMillis.Equals(input.ResponseTimeMillis) + ) && + ( + this.ResponseBodyExtract == input.ResponseBodyExtract || + (this.ResponseBodyExtract != null && + this.ResponseBodyExtract.Equals(input.ResponseBodyExtract)) + ) && + ( + this.ResultType == input.ResultType || + this.ResultType.Equals(input.ResultType) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.Seen == input.Seen || + this.Seen.Equals(input.Seen) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.InboxId != null) + { + hashCode = (hashCode * 59) + this.InboxId.GetHashCode(); + } + if (this.WebhookId != null) + { + hashCode = (hashCode * 59) + this.WebhookId.GetHashCode(); + } + if (this.WebhookUrl != null) + { + hashCode = (hashCode * 59) + this.WebhookUrl.GetHashCode(); + } + if (this.MessageId != null) + { + hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); + } + if (this.RedriveId != null) + { + hashCode = (hashCode * 59) + this.RedriveId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.HttpMethod.GetHashCode(); + hashCode = (hashCode * 59) + this.WebhookEvent.GetHashCode(); + if (this.ResponseStatus != null) + { + hashCode = (hashCode * 59) + this.ResponseStatus.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ResponseTimeMillis.GetHashCode(); + if (this.ResponseBodyExtract != null) + { + hashCode = (hashCode * 59) + this.ResponseBodyExtract.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ResultType.GetHashCode(); + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Seen.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookTestRequest.cs b/src/mailslurp/Model/WebhookTestRequest.cs new file mode 100644 index 00000000..06af03b6 --- /dev/null +++ b/src/mailslurp/Model/WebhookTestRequest.cs @@ -0,0 +1,251 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Result of webhook test request + /// + [DataContract(Name = "WebhookTestRequest")] + public partial class WebhookTestRequest : IEquatable, IValidatableObject + { + /// + /// Defines Method + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum MethodEnum + { + /// + /// Enum GET for value: GET + /// + [EnumMember(Value = "GET")] + GET = 1, + + /// + /// Enum HEAD for value: HEAD + /// + [EnumMember(Value = "HEAD")] + HEAD = 2, + + /// + /// Enum POST for value: POST + /// + [EnumMember(Value = "POST")] + POST = 3, + + /// + /// Enum PUT for value: PUT + /// + [EnumMember(Value = "PUT")] + PUT = 4, + + /// + /// Enum PATCH for value: PATCH + /// + [EnumMember(Value = "PATCH")] + PATCH = 5, + + /// + /// Enum DELETE for value: DELETE + /// + [EnumMember(Value = "DELETE")] + DELETE = 6, + + /// + /// Enum OPTIONS for value: OPTIONS + /// + [EnumMember(Value = "OPTIONS")] + OPTIONS = 7, + + /// + /// Enum TRACE for value: TRACE + /// + [EnumMember(Value = "TRACE")] + TRACE = 8 + + } + + + /// + /// Gets or Sets Method + /// + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] + public MethodEnum Method { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookTestRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// url (required). + /// method (required). + /// headers (required). + /// payload. + public WebhookTestRequest(string url = default(string), MethodEnum method = default(MethodEnum), Dictionary headers = default(Dictionary), string payload = default(string)) + { + // to ensure "url" is required (not null) + if (url == null) + { + throw new ArgumentNullException("url is a required property for WebhookTestRequest and cannot be null"); + } + this.Url = url; + this.Method = method; + // to ensure "headers" is required (not null) + if (headers == null) + { + throw new ArgumentNullException("headers is a required property for WebhookTestRequest and cannot be null"); + } + this.Headers = headers; + this.Payload = payload; + } + + /// + /// Gets or Sets Url + /// + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + public string Url { get; set; } + + /// + /// Gets or Sets Headers + /// + [DataMember(Name = "headers", IsRequired = true, EmitDefaultValue = true)] + public Dictionary Headers { get; set; } + + /// + /// Gets or Sets Payload + /// + [DataMember(Name = "payload", EmitDefaultValue = true)] + public string Payload { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookTestRequest {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Method: ").Append(Method).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + sb.Append(" Payload: ").Append(Payload).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookTestRequest); + } + + /// + /// Returns true if WebhookTestRequest instances are equal + /// + /// Instance of WebhookTestRequest to be compared + /// Boolean + public bool Equals(WebhookTestRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.Method == input.Method || + this.Method.Equals(input.Method) + ) && + ( + this.Headers == input.Headers || + this.Headers != null && + input.Headers != null && + this.Headers.SequenceEqual(input.Headers) + ) && + ( + this.Payload == input.Payload || + (this.Payload != null && + this.Payload.Equals(input.Payload)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Url != null) + { + hashCode = (hashCode * 59) + this.Url.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Method.GetHashCode(); + if (this.Headers != null) + { + hashCode = (hashCode * 59) + this.Headers.GetHashCode(); + } + if (this.Payload != null) + { + hashCode = (hashCode * 59) + this.Payload.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookTestResponse.cs b/src/mailslurp/Model/WebhookTestResponse.cs new file mode 100644 index 00000000..d085daa2 --- /dev/null +++ b/src/mailslurp/Model/WebhookTestResponse.cs @@ -0,0 +1,147 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Response from webhook test request + /// + [DataContract(Name = "WebhookTestResponse")] + public partial class WebhookTestResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// statusCode. + /// message. + public WebhookTestResponse(int? statusCode = default(int?), string message = default(string)) + { + this.StatusCode = statusCode; + this.Message = message; + } + + /// + /// Gets or Sets StatusCode + /// + [DataMember(Name = "statusCode", EmitDefaultValue = true)] + public int? StatusCode { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookTestResponse {\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookTestResponse); + } + + /// + /// Returns true if WebhookTestResponse instances are equal + /// + /// Instance of WebhookTestResponse to be compared + /// Boolean + public bool Equals(WebhookTestResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.StatusCode == input.StatusCode || + (this.StatusCode != null && + this.StatusCode.Equals(input.StatusCode)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.StatusCode != null) + { + hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/Model/WebhookTestResult.cs b/src/mailslurp/Model/WebhookTestResult.cs new file mode 100644 index 00000000..30ab4abb --- /dev/null +++ b/src/mailslurp/Model/WebhookTestResult.cs @@ -0,0 +1,180 @@ +/* + * MailSlurp API + * + * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository + * + * The version of the OpenAPI document: 6.5.2 + * Contact: contact@mailslurp.dev + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = mailslurp.Client.OpenAPIDateConverter; + +namespace mailslurp.Model +{ + /// + /// Results of testing a webhook + /// + [DataContract(Name = "WebhookTestResult")] + public partial class WebhookTestResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WebhookTestResult() { } + /// + /// Initializes a new instance of the class. + /// + /// message. + /// response (required). + /// request (required). + public WebhookTestResult(string message = default(string), WebhookTestResponse response = default(WebhookTestResponse), WebhookTestRequest request = default(WebhookTestRequest)) + { + // to ensure "response" is required (not null) + if (response == null) + { + throw new ArgumentNullException("response is a required property for WebhookTestResult and cannot be null"); + } + this.Response = response; + // to ensure "request" is required (not null) + if (request == null) + { + throw new ArgumentNullException("request is a required property for WebhookTestResult and cannot be null"); + } + this.Request = request; + this.Message = message; + } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Gets or Sets Response + /// + [DataMember(Name = "response", IsRequired = true, EmitDefaultValue = true)] + public WebhookTestResponse Response { get; set; } + + /// + /// Gets or Sets Request + /// + [DataMember(Name = "request", IsRequired = true, EmitDefaultValue = true)] + public WebhookTestRequest Request { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookTestResult {\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Response: ").Append(Response).Append("\n"); + sb.Append(" Request: ").Append(Request).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as WebhookTestResult); + } + + /// + /// Returns true if WebhookTestResult instances are equal + /// + /// Instance of WebhookTestResult to be compared + /// Boolean + public bool Equals(WebhookTestResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Response == input.Response || + (this.Response != null && + this.Response.Equals(input.Response)) + ) && + ( + this.Request == input.Request || + (this.Request != null && + this.Request.Equals(input.Request)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Response != null) + { + hashCode = (hashCode * 59) + this.Response.GetHashCode(); + } + if (this.Request != null) + { + hashCode = (hashCode * 59) + this.Request.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/mailslurp/README.md b/src/mailslurp/README.md new file mode 100644 index 00000000..0eb1489f --- /dev/null +++ b/src/mailslurp/README.md @@ -0,0 +1,395 @@ +# MailSlurp C\# Client + +> Create real email addresses on demand. Send and receive emails and attachments from code and tests using CSharp (C# DotNet Core). + +MailSlurp is an email API service that lets you create real email addresses in code. You can then send and receive emails and attachments in C# applications and tests. + +```csharp +// create client +var config = new Configuration(); +config.ApiKey.Add("x-api-key", ApiKey); + +// create inboxes +var inboxControllerApi = new InboxControllerApi(config); +var inbox1 = inboxControllerApi.CreateInbox(); +var inbox2 = inboxControllerApi.CreateInbox(); + +// send email +inboxControllerApi.SendEmail(inbox1.Id, new SendEmailOptions( + to: new List {inbox2.EmailAddress}, + subject: "Test", + body: "Hello", + isHTML: true +)); + +// receive email with wait controller +var email = new WaitForControllerApi(config).WaitForLatestEmail(inbox2.Id, 60000, true); +StringAssert.Contains(email.Body, "Hello"); + +// list emails in inbox +var emails = inboxControllerApi.GetInboxEmailsPaginated(inbox2.Id); +Assert.AreEqual(emails.TotalElements, 1); +``` + +## Quick links + +- [Method Documentation](https://docs.mailslurp.com/csharp/docs/) +- [NuGet Package](https://www.nuget.org/packages/mailslurp/) +- [Code Examples](https://github.com/mailslurp/examples) +- [Github Source](https://github.com/mailslurp/mailslurp-client-csharp) +- [CSharp SMTP access](https://www.mailslurp.com/smtp/csharp-send-email-smtp/) + +### Tutorials + +- [SpecFlow email integration test](https://www.mailslurp.com/examples/specflow-test-email-accounts/) +- [Selenium DotNet email tutorial](https://www.mailslurp.com/examples/test-emails-selenium-dotnet-csharp/) + +## Get started + +This section describes how to get up and running with the CSharp client. The client targets `DotNet-Core 2.1` and greater. If you need a different target see the .NET Standard targets below or consider calling the [REST API](https://docs.mailslurp.com/api/). + +- [.NET Core 2.1](https://github.com/mailslurp/mailslurp-client-csharp) +- [.NET Standard 2.1](https://github.com/mailslurp/mailslurp-client-csharp-netstandard-2x) + +See the method documentation for a [list of all functions](https://github.com/mailslurp/mailslurp-client-csharp) + +### Create API Key + +First you'll need an API Key. [Create a free account](https://app.mailslurp.com) and copy the key from your dashboard. + +### Install NuGet Package + +MailSlurp's CSharp library is [hosted on NuGet](https://www.nuget.org/packages/mailslurp/). + +![dotnet add mailslurp](https://www.mailslurp.com/assets/dotnet-add-mailslurp.png) + +#### With .NET CLI + +```bash +dotnet add package mailslurp +dotnet restore +``` + +### Package Manager + +```bash +Install-Package mailslurp +``` + +## Configure client + +Once your MailSlurp package is installed you can configure a client with your API Key. + +```csharp +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; + +var config = new Configuration(); +config.ApiKey.Add("x-api-key", "your_api_key_here"); +``` + +### Create controllers + +You can call API controllers using the corresponding ControllerApi classes. + +```csharp +// create an inbox controller to control inboxes +var apiInstance = new InboxControllerApi(config); +``` + +### Common controllers + +- [EmailController](https://docs.mailslurp.com/csharp/docs/EmailControllerApi/) read and send emails +- [InboxController](https://docs.mailslurp.com/csharp/docs/InboxControllerApi/) create email addresses +- [WaitForController](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) wait for emails to arrive +- [WebhookController](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) manage http server webhooks + +## Common uses + +MailSlurp has many functions. Here are some common uses: + +### Create an inbox + +Inboxes have an ID and a real email address. You can create them using the [InboxController](https://docs.mailslurp.com/csharp/docs/InboxControllerApi/). For more information see the [creating inboxes guide](https://www.mailslurp.com/guides/creating-inboxes/). + +```csharp +var apiInstance = new InboxControllerApi(config); +var inbox = apiInstance.CreateInbox(); + +Assert.NotNull(inbox); +Assert.Contains("@mailslurp.com", inbox.EmailAddress); +``` + +#### Inbox types + +Inboxes can be either `SMTP` or `HTTP` type. Set the inbox type using the `inboxType` property. SMTP inboxes are handled by a custom mailserver and support a wide range of clients while HTTP inboxes use Amazon SES and don't support some older clients like Outlook. SMTP inboxes are recommended for public facing email addresses while HTTP inboxes are best for application testing. Please see the guide on [types of inboxes](https://www.mailslurp.com/guides/smtp-vs-http-email-inboxes/) for more information. + +### Send and receive using SMTP Client +MailSlurp provides SMTP and IMAP servers for all SMTP inboxes. Each account has unique username and password for IMAP and SMTP. + +| Protocol | Host | Port | TLS | Description | +|----------|------------------|------|-------|-------------| +| SMTP | mx.mailslurp.com | 2525 | false | SMTP server | +| IMAP | mailslurp.click | 1143 | false | IMAP server | + +If you wish to send or receive using SMTP in CSharp simply create an SMTP type inbox and use the `GetImapSmtpAccess` method on the inbox controller to obtain SMTP host, port, username and password for your client. Set SSL to false: + +```csharp +using System; +using System.Net; +using System.Net.Mail; +using mailslurp.Api; +using mailslurp.Client; +using mailslurp.Model; +using Xunit; + +namespace SmtpService.Tests +{ + public class UnitTest1 + { + [Fact] + public void CanSendEmailWithMailSlurpSmtp() + { + var apiKey = Environment.GetEnvironmentVariable("API_KEY") + ?? throw new ArgumentNullException("Missing API_KEY environment variable containing MailSlurp key"); + + // configure client + var config = new Configuration(); + config.ApiKey.Add("x-api-key", apiKey); + var inboxController = new InboxControllerApi(config); + + // create an smtp inbox + var inbox = inboxController.CreateInboxWithOptions(new CreateInboxDto( + inboxType: CreateInboxDto.InboxTypeEnum.SMTPINBOX + )); + Assert.Contains("@mailslurp.mx", inbox.EmailAddress); + + // get smtp host, port, password, username etc + var imapSmtpAccessDetails = inboxController.GetImapSmtpAccess(); + var smtpClient = new SmtpClient(imapSmtpAccessDetails.SmtpServerHost) + { + Port = imapSmtpAccessDetails.SmtpServerPort, + Credentials = new NetworkCredential(userName: imapSmtpAccessDetails.SmtpUsername, password: imapSmtpAccessDetails.SmtpPassword), + // disable ssl recommended + EnableSsl = false + }; + + // send email to inbox + smtpClient.Send(from: "test@external.com", recipients: inbox.EmailAddress, subject: "This inbound", body: "Hello"); + + // wait for email to arrive + var waitController = new WaitForControllerApi(config); + waitController.WaitForLatestEmail(inboxId: inbox.Id, timeout: 30_000); + } + } +} +``` + +### Can list inboxes + +Inboxes are listed in paginated format: + +```csharp +[TestMethod] +public void Can_List_Inboxes() +{ + + // create an inbox controller + var inboxControllerApi = new InboxControllerApi(_config); + var pageInboxes = inboxControllerApi.GetAllInboxes(page:0, size:20); + + // result pagination options + Assert.IsTrue(pageInboxes.Number == 0); + + // contents contains the results + foreach (var inboxProjection in pageInboxes.Content) + { + Assert.IsNotNull(inboxProjection.Id); + } +} +``` + +See the [InboxController docs](https://docs.mailslurp.com/csharp/docs/InboxControllerApi/) for help. + +### Verify email address +Validate email recipients to maintain a good sender reputation and reduce bounces. + +```csharp +Log("Can validate email address"); +var emails = new List +{ + "contact@mailslurp.dev", + "bad@mailslurp.dev" +}; +var emailVerificationControllerApi = new EmailVerificationControllerApi(config); +var validateEmailAddressListResult = emailVerificationControllerApi.ValidateEmailAddressList(new ValidateEmailAddressListOptions(emails)); +Assert(validateEmailAddressListResult.InvalidEmailAddresses.Contains("bad@mailslurp.dev"), "Has invalid"); +Assert(validateEmailAddressListResult.ValidEmailAddresses.Contains("contact@mailslurp.dev"), "Has valid"); +``` + +### Send emails + +You can send an email by first creating an inbox. Then use the inbox ID to send an email from it. + +```csharp +var sendEmailOptions = new SendEmailOptions() +{ + To = new List‹string›() {"test@example.com"}, + Subject = "Hello", + Body = "

MailSlurp supports HTML

", +}; +apiInstance.SendEmail(inbox.Id, sendEmailOptions); +``` + +See the [SendEmailOptions](https://docs.mailslurp.com/csharp/docs/SendEmailOptions/) for sending options. + +### Receive emails + +You can fetch and read emails that already exist using the [EmailControllerApi](https://docs.mailslurp.com/csharp/docs/EmailControllerApi/). To wait for expected emails to arrive use the [WaitForControllerApi](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) to wait for conditions to be met. + +You can receive emails using `waitFor` methods on the [WaitForControllerApi](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) class. + +```csharp +var Timeout = 30000L; // max milliseconds to wait +var UnreadOnly = true; // only count unread emails + +var waitForInstance = new WaitForControllerApi(config); +var email = waitForInstance.WaitForLatestEmail(inbox.Id, Timeout, UnreadOnly); + +Assert.NotNull(email); +Assert.Equal("Hello", email.Subject); +Assert.Contains("Your code is: ", email.Body); +``` + +You can extract content from email bodies using RegExps: + +```csharp +// imagine that email body is `Your code is: 123` and you want to get the number +var rx = new Regex(@"Your code is: ([0-9]{3})", RegexOptions.Compiled); +var match = rx.Match(email.Body); +var code = match.Groups[1].Value; + +Assert.Equal("123", code); +``` + +If you are having trouble receiving emails please see the [email receiving guide](https://www.mailslurp.com/guides/receiving-emails/) or the [inbox not receiving support page](https://www.mailslurp.com/support/inbox-not-receiving-emails/). + +### Attachments + +To send attachments first upload them using the [AttachmentControllerApi](https://docs.mailslurp.com/csharp/docs/AttachmentControllerApi/). + +```csharp +private List _uploadAttachment() +{ + var attachmentControllerApi = new AttachmentControllerApi(_config); + // read a file in byte array + byte[] bytesOfAttachment = {0}; + // encode the bytes as base64 encoded string + string base64EncodedFile = Convert.ToBase64String(bytesOfAttachment, 0, bytesOfAttachment.Length); + // specify file name and content-type + var uploadOptions = new UploadAttachmentOptions(filename:"test.txt", contentType:"text/plain", base64Contents: base64EncodedFile); + // use the returned list of ids for subsequent sending (can return multiple ids depending on size of files). + return attachmentControllerApi.UploadAttachment(uploadOptions); +} +``` + +Then use the returned attachment IDs in the [SendEmailOptions](https://docs.mailslurp.com/csharp/docs/SendEmailOptions/) of your email send call. + +```csharp +[TestMethod] +public void Can_Receive_Email_Contents_And_Attachments() +{ + + // create two inboxes and send an email between them + var inboxControllerApi = new InboxControllerApi(_config); + var inbox1 = inboxControllerApi.CreateInbox(); + var inbox2 = inboxControllerApi.CreateInbox(); + + // send email with attachment from inbox 1 to inbox 2 + var sendEmailOptions = new SendEmailOptions( + // send to inbox 2 + to: new List {inbox2.EmailAddress}, + subject: "Hello inbox 2", + body: "Here is your attachment", + isHTML: true, + attachments: _uploadAttachment() + ); + inboxControllerApi.SendEmail(inbox1.Id, sendEmailOptions); + + // now wait for email to arrive in inbox 2 + var waitForControllerApi = new WaitForControllerApi(_config); + var email = waitForControllerApi.WaitForLatestEmail(inboxId: inbox2.Id, timeout: 30000, unreadOnly: true); + + // validate received email + StringAssert.Contains(email.Body, "Here is your attachment"); + StringAssert.Contains(email.Subject, "Hello inbox 2"); + Assert.IsTrue(email.Attachments.Count > 0); + + // fetch attachment + var emailControllerApi = new EmailControllerApi(_config); + var downloadAttachmentDto = emailControllerApi.DownloadAttachmentBase64(attachmentId: email.Attachments.First(), emailId: email.Id); + + StringAssert.Contains(downloadAttachmentDto.ContentType, "text/plain"); + Assert.IsNotNull(downloadAttachmentDto.SizeBytes); + Assert.IsNotNull(downloadAttachmentDto.Base64FileContents); // convert to bytes if you wish to parse or save file +} +``` + +### Get sent emails + +```csharp +[TestMethod] +public void Can_Get_Sent_Emails() +{ + + var sentEmailsControllerApi = new SentEmailsControllerApi(_config); + var inboxControllerApi = new InboxControllerApi(_config); + + var inbox = inboxControllerApi.CreateInbox(); + var sentEmails = sentEmailsControllerApi.GetSentEmails(inboxId:inbox.Id, page:0, size: 20); + + Assert.IsNotNull(sentEmails.Content); + Assert.IsNotNull(sentEmails.TotalPages); + Assert.AreEqual(sentEmails.Pageable.PageNumber, 0); + Assert.AreEqual(sentEmails.Pageable.PageSize, 20); +} +``` + +### Extract email content + +You can extract content using pattern matching with the [WaitForController](https://docs.mailslurp.com/csharp/docs/WaitForControllerApi/) + +```csharp +[TestMethod] +public void Can_Extract_Codes() +{ + + // create an inbox + var inboxControllerApi = new InboxControllerApi(_config); + var inbox = inboxControllerApi.CreateInbox(); + + // send a code to the inbox + var sendEmailOptions = new SendEmailOptions( + to: new List() {inbox.EmailAddress}, + subject: "Welcome email", + body: "Hello. Your code is X-456" + ); + inboxControllerApi.SendEmail(inbox.Id, sendEmailOptions); + + // wait for the email to arrive + var waitForController = new WaitForControllerApi(_config); + var emailController = new EmailControllerApi(_config); + var email = waitForController.WaitForLatestEmail(inboxId:inbox.Id, timeout: 30000, unreadOnly: true); + StringAssert.Contains(email.Body, "Hello"); + + // extract the code + var matchOptions = new ContentMatchOptions(pattern:"Your code is ([A-Z]-[0-9]{3})"); + var matchResults = emailController.GetEmailContentMatch(email.Id, matchOptions); + Assert.AreEqual(matchResults.Matches[1], "X-456"); +} +``` + +## SDK Documentation + +See the GitHub source code for more [Method Documentation](https://docs.mailslurp.com/csharp/docs/). diff --git a/src/mailslurp/mailslurp.csproj b/src/mailslurp/mailslurp.csproj new file mode 100644 index 00000000..66a95176 --- /dev/null +++ b/src/mailslurp/mailslurp.csproj @@ -0,0 +1,42 @@ + + + + false + netcoreapp3.1 + mailslurp + mailslurp + Library + MailSlurp + MailSlurp + MailSlurp Library + The official MailSlurp Email API SDK. See mailslurp.com/docs/csharp for more information. + No Copyright + mailslurp + 15.16.10 + bin\$(Configuration)\$(TargetFramework)\mailslurp.xml + https://github.com/mailslurp/mailslurp-client-csharp.git + git + Minor update + + + + + + + + + + + + + + + + + + + true + README.md + + +