using System;
using System.Runtime.Serialization;
using Com.Bocom.OpenApi.Response;
using Com.Bocom.OpenApi.Security.KeyGen;
using Com.Bocom.OpenApi.Utils;

namespace Com.Bocom.OpenApi
{
    namespace Request
    {
        public class HmdLoanStatusListFileDownloadRequestV1 : BocomDownloadEncryptRequest<FileDownloadResponseV1>
        {
            private string encryptKey = AESKeyGen.GenAES256Key();

            private string encryptPolicy = "FILE";

            private string hashCode;

            private string encryptType = "AES";


            public override bool IsNeedEncrypt()
            {
                return true;
            }


            public override string GetMethod()
            {
                return "POST";
            }


            public override Type GetResponseClass()
            {
                return typeof(FileDownloadResponseV1);
            }


            public override Type GetBizContentClass()
            {
                return typeof(HmdLoanStatusListFileDownloadRequestV1Biz);
            }

            [DataContract]
            public class HmdLoanStatusListFileDownloadRequestV1Biz : BizContent
            {
                //(desc = "联盟商标识")
                //@JsonProperty("bv_ode_no")

                [DataMember]
                public string bv_ode_no { get; set; }


                [DataMember]
                public string clc_no { get; set; }

                //(desc = "备用字段1")
                //@JsonProperty("query_date")

                [DataMember]
                public string query_date { get; set; }

                //(desc = "备用字段2")
                //@JsonProperty("notify_url")

                [DataMember]
                public string notify_url { get; set; }

            }


            public override string getEncryptKey()
            {
                // TODO Auto-generated method stub
                return encryptKey;
            }


            public override string getEncryptPolicy()
            {
                // TODO Auto-generated method stub
                return encryptPolicy;
            }


            public string getHashCode()
            {
                // TODO Auto-generated method stub
                return hashCode;
            }


            public void setHashCode(string hashCode)
            {
                // TODO Auto-generated method stub
                this.hashCode = hashCode;
            }

            public void setEncryptType(string encryptType)
            {
                if (encryptType.Equals(BocomConstants.ENCRYPT_TYPE_SM2_AND_SM4))
                {
                    this.encryptType = encryptType;
                    encryptKey = SM4KeyGen.GenSM4Key();
                }
            }

            public override string GetEncryptType()
            {
                return encryptType;
            }
        }
    }
}