// Copyright © WireMock.Net
using System;
// ReSharper disable once CheckNamespace
namespace WireMock.Admin.Mappings;
///
/// RequestModelBuilder
///
public partial class RequestModelBuilder
{
///
/// UsingConnect: add HTTP Method matching on `CONNECT`.
///
/// The .
public RequestModelBuilder UsingConnect() => WithMethods("CONNECT");
///
/// UsingDelete: add HTTP Method matching on `DELETE`.
///
/// The .
public RequestModelBuilder UsingDelete() => WithMethods("DELETE");
///
/// UsingGet: add HTTP Method matching on `GET`.
///
/// The .
public RequestModelBuilder UsingGet() => WithMethods("GET");
///
/// UsingHead: Add HTTP Method matching on `HEAD`.
///
/// The .
public RequestModelBuilder UsingHead() => WithMethods("HEAD");
///
/// UsingPost: add HTTP Method matching on `POST`.
///
/// The .
public RequestModelBuilder UsingPost() => WithMethods("POST");
///
/// UsingPatch: add HTTP Method matching on `PATCH`.
///
/// The .
public RequestModelBuilder UsingPatch() => WithMethods("PATCH");
///
/// UsingPut: add HTTP Method matching on `OPTIONS`.
///
/// The .
public RequestModelBuilder UsingOptions() => WithMethods("OPTIONS");
///
/// UsingPut: add HTTP Method matching on `PUT`.
///
/// The .
public RequestModelBuilder UsingPut() => WithMethods("PUT");
///
/// UsingTrace: add HTTP Method matching on `TRACE`.
///
/// The .
public RequestModelBuilder UsingTrace() => WithMethods("TRACE");
///
/// UsingAnyMethod: add HTTP Method matching on any method.
///
/// The .
public RequestModelBuilder UsingAnyMethod() => this;
///
/// Set the ClientIP.
///
public RequestModelBuilder WithClientIP(string value) => WithClientIP(() => value);
///
/// Set the ClientIP.
///
public RequestModelBuilder WithClientIP(ClientIPModel value) => WithClientIP(() => value);
///
/// Set the ClientIP.
///
public RequestModelBuilder WithClientIP(Action action)
{
return WithClientIP(() =>
{
var builder = new ClientIPModelBuilder();
action(builder);
return builder.Build();
});
}
///
/// Set the Path.
///
public RequestModelBuilder WithPath(string value) => WithPath(() => value);
///
/// Set the Path.
///
public RequestModelBuilder WithPath(PathModel value) => WithPath(() => value);
///
/// Set the Path.
///
public RequestModelBuilder WithPath(Action action)
{
return WithPath(() =>
{
var builder = new PathModelBuilder();
action(builder);
return builder.Build();
});
}
///
/// Set the Url.
///
public RequestModelBuilder WithUrl(string value) => WithUrl(() => value);
///
/// Set the Url.
///
public RequestModelBuilder WithUrl(UrlModel value) => WithUrl(() => value);
///
/// Set the Url.
///
public RequestModelBuilder WithUrl(Action action)
{
return WithUrl(() =>
{
var builder = new UrlModelBuilder();
action(builder);
return builder.Build();
});
}
}