// Copyright © WireMock.Net using System.Diagnostics.CodeAnalysis; using WireMock.Types; namespace WireMock.Settings; /// /// Defines an old path param and a new path param to be replaced when proxying. /// public class ProxyUrlReplaceSettings { /// /// The old path value to be replaced by the new path value. /// public string? OldValue { get; set; } /// /// The new path value to replace the old value with. /// public string? NewValue { get; set; } /// /// Defines if the case should be ignored when replacing. /// public bool IgnoreCase { get; set; } /// /// Holds the transformation template used when is true. /// public string? TransformTemplate { get; set; } /// /// Use Transformer. /// [MemberNotNullWhen(true, nameof(TransformTemplate))] [MemberNotNullWhen(false, nameof(OldValue))] [MemberNotNullWhen(false, nameof(NewValue))] public bool UseTransformer => !string.IsNullOrEmpty(TransformTemplate); /// /// The transformer type, in case is set to true. /// public TransformerType TransformerType { get; set; } = TransformerType.Handlebars; }