using RestEase;
using System;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using WireMock.Admin.Mappings;
using WireMock.Admin.Requests;
using WireMock.Admin.Settings;
namespace WireMock.Client
{
///
/// The RestEase interface which defines all admin commands.
///
public interface IFluentMockServerAdmin
{
///
/// Authentication header
///
[Header("Authorization")]
AuthenticationHeaderValue Authorization { get; set; }
///
/// Get the settings.
///
/// SettingsModel
[Get("__admin/settings")]
Task GetSettingsAsync();
///
/// Update the settings.
///
/// SettingsModel
[Put("__admin/settings")]
[Header("Content-Type", "application/json")]
Task PutSettingsAsync([Body] SettingsModel settings);
///
/// Update the settings
///
/// SettingsModel
[Post("__admin/settings")]
[Header("Content-Type", "application/json")]
Task PostSettingsAsync([Body] SettingsModel settings);
///
/// Get the mappings.
///
/// MappingModels
[Get("__admin/mappings")]
Task> GetMappingsAsync();
///
/// Add a new mapping.
///
/// MappingModel
[Post("__admin/mappings")]
Task PostMappingAsync([Body] MappingModel mapping);
///
/// Delete all mappings.
///
[Delete("__admin/mappings")]
Task DeleteMappingsAsync();
///
/// Delete (reset) all mappings.
///
[Post("__admin/mappings/reset")]
Task ResetMappingsAsync();
///
/// Get a mapping based on the guid
///
/// The Guid
/// MappingModel
[Get("__admin/mappings/{guid}")]
Task GetMappingAsync([Path] Guid guid);
///
/// Update a mapping based on the guid
///
/// The Guid
/// MappingModel
[Put("__admin/mappings/{guid}")]
Task PutMappingAsync([Path] Guid guid, [Body] MappingModel mapping);
///
/// Delete a mapping based on the guid
///
/// The Guid
[Delete("__admin/mappings/{guid}")]
Task DeleteMappingAsync([Path] Guid guid);
///
/// Save the mappings
///
[Post("__admin/mappings/save")]
Task SaveMappingAsync();
///
/// Get the requests.
///
/// LogRequestModels
[Get("__admin/requests")]
Task> GetRequestsAsync();
///
/// Delete all requests.
///
[Delete("__admin/requests")]
Task DeleteRequestsAsync();
///
/// Delete (reset) all requests.
///
[Post("__admin/requests/reset")]
Task ResetRequestsAsync();
///
/// Get a request based on the guid
///
/// The Guid
/// MappingModel
[Get("__admin/requests/{guid}")]
Task GetRequestAsync([Path] Guid guid);
///
/// Delete a request based on the guid
///
/// The Guid
[Delete("__admin/requests/{guid}")]
Task DeleteRequestAsync([Path] Guid guid);
///
/// Find a request based on the criteria
///
/// The RequestModel
[Post("__admin/requests/find")]
Task> FindRequestsAsync([Body] RequestModel model);
}
}