using System; using HandlebarsDotNet; using JetBrains.Annotations; using Newtonsoft.Json; using WireMock.Handlers; using WireMock.Logging; #if USE_ASPNETCORE using Microsoft.Extensions.DependencyInjection; #endif namespace WireMock.Settings { /// /// WireMockServerSettings /// public class WireMockServerSettings : IWireMockServerSettings { /// [PublicAPI] public int? Port { get; set; } /// // ReSharper disable once InconsistentNaming [PublicAPI] public bool? UseSSL { get; set; } /// [PublicAPI] public bool? StartAdminInterface { get; set; } /// [PublicAPI] public bool? ReadStaticMappings { get; set; } /// [PublicAPI] public bool? WatchStaticMappings { get; set; } /// [PublicAPI] public bool? WatchStaticMappingsInSubdirectories { get; set; } /// [PublicAPI] public IProxyAndRecordSettings ProxyAndRecordSettings { get; set; } /// [PublicAPI] public string[] Urls { get; set; } /// [PublicAPI] public int StartTimeout { get; set; } = 10000; /// [PublicAPI] public bool? AllowPartialMapping { get; set; } /// [PublicAPI] public string AdminUsername { get; set; } /// [PublicAPI] public string AdminPassword { get; set; } /// [PublicAPI] public string AdminAzureADTenant { get; set; } /// [PublicAPI] public string AdminAzureADAudience { get; set; } /// [PublicAPI] public int? RequestLogExpirationDuration { get; set; } /// [PublicAPI] public int? MaxRequestLogCount { get; set; } /// [PublicAPI] [JsonIgnore] public Action PreWireMockMiddlewareInit { get; set; } /// [PublicAPI] [JsonIgnore] public Action PostWireMockMiddlewareInit { get; set; } #if USE_ASPNETCORE /// [PublicAPI] [JsonIgnore] public Action AdditionalServiceRegistration { get; set; } #endif /// [PublicAPI] [JsonIgnore] public IWireMockLogger Logger { get; set; } /// [PublicAPI] [JsonIgnore] public IFileSystemHandler FileSystemHandler { get; set; } /// [PublicAPI] [JsonIgnore] public Action HandlebarsRegistrationCallback { get; set; } /// [PublicAPI] public bool? AllowCSharpCodeMatcher { get; set; } /// [PublicAPI] public bool? AllowBodyForAllHttpMethods { get; set; } /// [PublicAPI] public bool? AllowOnlyDefinedHttpStatusCodeInResponse { get; set; } /// [PublicAPI] public bool? DisableJsonBodyParsing { get; set; } /// [PublicAPI] public bool? DisableRequestBodyDecompressing { get; set; } /// [PublicAPI] public bool? HandleRequestsSynchronously { get; set; } /// [PublicAPI] public bool? ThrowExceptionWhenMatcherFails { get; set; } /// [PublicAPI] public IWireMockCertificateSettings CertificateSettings { get; set; } /// [PublicAPI] public bool CustomCertificateDefined => CertificateSettings?.IsDefined == true; /// [PublicAPI] public IWebhookSettings WebhookSettings { get; set; } } }