using Hcs.Broker.Api.Request.Adapter;
using Hcs.Service.Async.Nsi;

namespace Hcs.Service.Async.Nsi
{
#pragma warning disable IDE1006
    public partial class getStateResult : IGetStateResultMany { }
#pragma warning restore IDE1006

    public partial class NsiPortsTypeAsyncClient : IAsyncClient<RequestHeader>
    {
        public async Task<IGetStateResponse> GetStateAsync(RequestHeader header, IGetStateRequest request)
        {
            return await getStateAsync(header, (getStateRequest)request);
        }
    }

#pragma warning disable IDE1006
    public partial class getStateResponse : IGetStateResponse
#pragma warning restore IDE1006
    {
        public IGetStateResult GetStateResult => getStateResult;
    }

    public partial class AckRequestAck : IAck { }

    public partial class ErrorMessageType : IErrorMessage { }

#pragma warning disable IDE1006
    public partial class getStateRequest : IGetStateRequest { }
#pragma warning restore IDE1006
}

namespace Hcs.Broker.Api.Request.Nsi
{
    internal class NsiRequestBase(Client client) :
        RequestBase<getStateResult,
            NsiPortsTypeAsyncClient,
            NsiPortsTypeAsync,
            RequestHeader,
            AckRequestAck,
            ErrorMessageType,
            getStateRequest>(client)
    {
        protected override EndPoint EndPoint => EndPoint.NsiAsync;

        protected override bool EnableMinimalResponseWaitDelay => true;

        protected override bool CanBeRestarted => true;

        protected override int RestartTimeoutMinutes => 20;
    }
}
