using System; using HandlebarsDotNet; using JetBrains.Annotations; using WireMock.Handlers; using WireMock.Logging; using WireMock.Matchers; namespace WireMock.Settings { /// /// IWireMockServerSettings /// public interface IWireMockServerSettings { /// /// Gets or sets the port. /// [PublicAPI] int? Port { get; set; } /// /// Gets or sets the use SSL. /// // ReSharper disable once InconsistentNaming [PublicAPI] bool? UseSSL { get; set; } /// /// Gets or sets whether to start admin interface. /// [PublicAPI] bool? StartAdminInterface { get; set; } /// /// Gets or sets if the static mappings should be read at startup. /// [PublicAPI] bool? ReadStaticMappings { get; set; } /// /// Watch the static mapping files + folder for changes when running. /// [PublicAPI] bool? WatchStaticMappings { get; set; } /// /// A value indicating whether subdirectories within the static mappings path should be monitored. /// [PublicAPI] bool? WatchStaticMappingsInSubdirectories { get; set; } /// /// Gets or sets if the proxy and record settings. /// [PublicAPI] IProxyAndRecordSettings ProxyAndRecordSettings { get; set; } /// /// Gets or sets the urls. /// [PublicAPI] string[] Urls { get; set; } /// /// StartTimeout /// [PublicAPI] int StartTimeout { get; set; } /// /// Allow Partial Mapping (default set to false). /// [PublicAPI] bool? AllowPartialMapping { get; set; } /// /// The username needed for __admin access. /// [PublicAPI] string AdminUsername { get; set; } /// /// The password needed for __admin access. /// [PublicAPI] string AdminPassword { get; set; } /// /// The RequestLog expiration in hours (optional). /// [PublicAPI] int? RequestLogExpirationDuration { get; set; } /// /// The MaxRequestLog count (optional). /// [PublicAPI] int? MaxRequestLogCount { get; set; } /// /// Action which is called (with the IAppBuilder or IApplicationBuilder) before the internal WireMockMiddleware is initialized. [Optional] /// [PublicAPI] Action PreWireMockMiddlewareInit { get; set; } /// /// Action which is called (with the IAppBuilder or IApplicationBuilder) after the internal WireMockMiddleware is initialized. [Optional] /// [PublicAPI] Action PostWireMockMiddlewareInit { get; set; } /// /// The IWireMockLogger which logs Debug, Info, Warning or Error /// [PublicAPI] IWireMockLogger Logger { get; set; } /// /// Handler to interact with the file system to read and write static mapping files. /// [PublicAPI] IFileSystemHandler FileSystemHandler { get; set; } /// /// Action which can be used to add additional Handlebars registrations. [Optional] /// [PublicAPI] Action HandlebarsRegistrationCallback { get; set; } /// /// Allow the usage of CSharpCodeMatcher (default is not allowed). /// [PublicAPI] bool? AllowCSharpCodeMatcher { get; set; } /// /// Allow a Body for all HTTP Methods. (default set to false). /// [PublicAPI] bool? AllowBodyForAllHttpMethods { get; set; } /// /// Allow only a HttpStatus Code in the response which is defined. (default set to false). /// - false : also null, 0, empty or invalid HttpStatus codes are allowed. /// - true : only codes defined in are allowed. /// [PublicAPI] bool? AllowOnlyDefinedHttpStatusCodeInResponse { get; set; } /// /// Set to true to disable Json deserialization when processing requests. (default set to false). /// [PublicAPI] bool? DisableJsonBodyParsing { get; set; } /// /// Disable support for GZip and Deflate request body decompression. (default set to false). /// [PublicAPI] bool? DisableRequestBodyDecompressing { get; set; } /// /// Handle all requests synchronously. (default set to false). /// [PublicAPI] bool? HandleRequestsSynchronously { get; set; } /// /// Throw an exception when the fails because of invalid input. (default set to false). /// [PublicAPI] bool? ThrowExceptionWhenMatcherFails { get; set; } /// /// If https is used, these settings can be used to configure the CertificateSettings in case a custom certificate instead the default .NET certificate should be used. /// /// X509StoreName and X509StoreLocation should be defined /// OR /// X509CertificateFilePath and X509CertificatePassword should be defined /// [PublicAPI] IWireMockCertificateSettings CertificateSettings { get; set; } /// /// Defines if custom CertificateSettings are defined /// [PublicAPI] bool CustomCertificateDefined { get; } /// /// Defines the global IWebhookSettingsto use /// [PublicAPI] IWebhookSettings WebhookSettings { get; set; } } }