using System.Collections.Generic; using System; namespace WireMock.Admin.Mappings; /// /// MatcherModel /// [FluentBuilder.AutoGenerateBuilder] public class MatcherModel { /// /// Gets or sets the name. /// public string Name { get; set; } = null!; /// /// Gets or sets the pattern. Can be a string (default) or an object. /// public object? Pattern { get; set; } /// /// Gets or sets the patterns. Can be array of strings (default) or an array of objects. /// public object[]? Patterns { get; set; } /// /// Gets or sets the pattern as a file. /// public string? PatternAsFile { get; set; } /// /// Gets or sets the ignore case. /// public bool? IgnoreCase { get; set; } /// /// Reject on match. /// public bool? RejectOnMatch { get; set; } /// /// The Operator to use when multiple patterns are defined. Optional. /// - null = Same as "or". /// - "or" = Only one pattern is required to match. /// - "and" = All patterns should match. /// - "average" = The average value from all patterns. /// public string? MatchOperator { get; set; } #region JsonPartialMatcher and JsonPartialWildcardMatcher /// /// Support Regex. /// public bool? Regex { get; set; } #endregion #region MimePartMatcher /// /// ContentType Matcher (image/png; name=image.png) /// public MatcherModel? ContentTypeMatcher { get; set; } /// /// ContentDisposition Matcher (attachment; filename=image.png) /// public MatcherModel? ContentDispositionMatcher { get; set; } /// /// ContentTransferEncoding Matcher (base64) /// public MatcherModel? ContentTransferEncodingMatcher { get; set; } #endregion #region MimePartMatcher + ProtoBufMatcher /// /// Content Matcher /// public MatcherModel? ContentMatcher { get; set; } #endregion #region ProtoBufMatcher /// /// The full type of the protobuf (request/response) message object. Format is "{package-name}.{type-name}". /// public string? ProtoBufMessageType { get; set; } #endregion #region XPathMatcher /// /// Array of namespace prefix and uri. (optional) /// public XmlNamespace[]? XmlNamespaceMap { get; set; } #endregion #region GraphQLMatcher /// /// Mapping of custom GraphQL Scalar name to ClrType. (optional) /// public IDictionary? CustomScalars { get; set; } #endregion }