using Hcs.ClientNet.Api.Request;
using Hcs.ClientNet.Api.Request.Adapter;
using Hcs.Service.Async.OrgRegistryCommon;
using System.Threading.Tasks;

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

    public partial class RegOrgPortsTypeAsyncClient : IAsyncClient<ISRequestHeader>
    {
        public async Task<IGetStateResponse> GetStateAsync(ISRequestHeader 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.ClientNet.Api.Request.OrgRegistryCommon
{
    internal class OrgRegistryCommonRequestBase(ClientBase client) :
        RequestBase<getStateResult,
            RegOrgPortsTypeAsyncClient,
            RegOrgPortsTypeAsync,
            ISRequestHeader,
            AckRequestAck,
            ErrorMessageType,
            getStateRequest>(client)
    {
        protected override EndPoint EndPoint => EndPoint.OrgRegistryCommonAsync;

        protected override bool EnableMinimalResponseWaitDelay => true;

        protected override bool CanBeRestarted => true;

        protected override int RestartTimeoutMinutes => 20;
    }
}
