CertApplyThirdRequest.go 1.2 KB

12345678910111213141516171819202122232425262728
  1. package cert_request
  2. import (
  3. "private-go-sdk/http"
  4. "encoding/json"
  5. "private-go-sdk/model/common"
  6. )
  7. type CertApplyThirdRequest struct {
  8. Company *common.CertApplyThirdCompanyRequest `json:"company,omitempty"`
  9. User *common.CertApplyThirdUserRequest `json:"user,omitempty"`
  10. // <ext>core:true</ext> 【证书算法】证书算法 【传参】 取值范围:RSA(国际算法),SM2(国密算法);不传值默认为:RSA(国际算法)。
  11. SigAlgType string `json:"sigAlgType,omitempty"`
  12. // <ext>core:true</ext> 【证书请求文件的base64】证书请求文件的base64 【传参】 需要按照sigAlgType生成对应算法的p10
  13. P10 string `json:"p10"`
  14. // <ext>core:true</ext> 【证书年限】证书年限 【传参】 取值范围:1(1年期),2(2年期);不传值默认为:1(1年期)。
  15. Years *int64 `json:"years,omitempty"`
  16. }
  17. func (obj CertApplyThirdRequest) GetUrl() string {
  18. return "/cert/apply/third"
  19. }
  20. func (obj CertApplyThirdRequest) GetHttpParameter() *http.HttpParameter {
  21. parameter := http.NewPostHttpParameter()
  22. jsonBytes, _ := json.Marshal(obj)
  23. parameter.SetJsonParamer(string(jsonBytes))
  24. return parameter
  25. }