describe_total_statistics.go 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. package aegis
  2. //Licensed under the Apache License, Version 2.0 (the "License");
  3. //you may not use this file except in compliance with the License.
  4. //You may obtain a copy of the License at
  5. //
  6. //http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. //Unless required by applicable law or agreed to in writing, software
  9. //distributed under the License is distributed on an "AS IS" BASIS,
  10. //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. //See the License for the specific language governing permissions and
  12. //limitations under the License.
  13. //
  14. // Code generated by Alibaba Cloud SDK Code Generator.
  15. // Changes may cause incorrect behavior and will be lost if the code is regenerated.
  16. import (
  17. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
  18. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
  19. )
  20. // DescribeTotalStatistics invokes the aegis.DescribeTotalStatistics API synchronously
  21. // api document: https://help.aliyun.com/api/aegis/describetotalstatistics.html
  22. func (client *Client) DescribeTotalStatistics(request *DescribeTotalStatisticsRequest) (response *DescribeTotalStatisticsResponse, err error) {
  23. response = CreateDescribeTotalStatisticsResponse()
  24. err = client.DoAction(request, response)
  25. return
  26. }
  27. // DescribeTotalStatisticsWithChan invokes the aegis.DescribeTotalStatistics API asynchronously
  28. // api document: https://help.aliyun.com/api/aegis/describetotalstatistics.html
  29. // asynchronous document: https://help.aliyun.com/document_detail/66220.html
  30. func (client *Client) DescribeTotalStatisticsWithChan(request *DescribeTotalStatisticsRequest) (<-chan *DescribeTotalStatisticsResponse, <-chan error) {
  31. responseChan := make(chan *DescribeTotalStatisticsResponse, 1)
  32. errChan := make(chan error, 1)
  33. err := client.AddAsyncTask(func() {
  34. defer close(responseChan)
  35. defer close(errChan)
  36. response, err := client.DescribeTotalStatistics(request)
  37. if err != nil {
  38. errChan <- err
  39. } else {
  40. responseChan <- response
  41. }
  42. })
  43. if err != nil {
  44. errChan <- err
  45. close(responseChan)
  46. close(errChan)
  47. }
  48. return responseChan, errChan
  49. }
  50. // DescribeTotalStatisticsWithCallback invokes the aegis.DescribeTotalStatistics API asynchronously
  51. // api document: https://help.aliyun.com/api/aegis/describetotalstatistics.html
  52. // asynchronous document: https://help.aliyun.com/document_detail/66220.html
  53. func (client *Client) DescribeTotalStatisticsWithCallback(request *DescribeTotalStatisticsRequest, callback func(response *DescribeTotalStatisticsResponse, err error)) <-chan int {
  54. result := make(chan int, 1)
  55. err := client.AddAsyncTask(func() {
  56. var response *DescribeTotalStatisticsResponse
  57. var err error
  58. defer close(result)
  59. response, err = client.DescribeTotalStatistics(request)
  60. callback(response, err)
  61. result <- 1
  62. })
  63. if err != nil {
  64. defer close(result)
  65. callback(nil, err)
  66. result <- 0
  67. }
  68. return result
  69. }
  70. // DescribeTotalStatisticsRequest is the request struct for api DescribeTotalStatistics
  71. type DescribeTotalStatisticsRequest struct {
  72. *requests.RpcRequest
  73. StatusList string `position:"Query" name:"StatusList"`
  74. SaleId string `position:"Query" name:"SaleId"`
  75. RuleType requests.Integer `position:"Query" name:"RuleType"`
  76. GroupId requests.Integer `position:"Query" name:"GroupId"`
  77. EndTime string `position:"Query" name:"EndTime"`
  78. Remark string `position:"Query" name:"Remark"`
  79. Dealed string `position:"Query" name:"Dealed"`
  80. CurrentPage requests.Integer `position:"Query" name:"CurrentPage"`
  81. StartTime string `position:"Query" name:"StartTime"`
  82. Type string `position:"Query" name:"Type"`
  83. Uuid string `position:"Query" name:"Uuid"`
  84. SecureToken string `position:"Query" name:"SecureToken"`
  85. SourceIp string `position:"Query" name:"SourceIp"`
  86. WebGroupId requests.Integer `position:"Query" name:"WebGroupId"`
  87. PageSize requests.Integer `position:"Query" name:"PageSize"`
  88. From string `position:"Query" name:"From"`
  89. Action1 requests.Integer `position:"Query" name:"Action1"`
  90. Tag string `position:"Query" name:"Tag"`
  91. Flow requests.Integer `position:"Query" name:"Flow"`
  92. Status requests.Integer `position:"Query" name:"Status"`
  93. }
  94. // DescribeTotalStatisticsResponse is the response struct for api DescribeTotalStatistics
  95. type DescribeTotalStatisticsResponse struct {
  96. *responses.BaseResponse
  97. RequestId string `json:"RequestId" xml:"RequestId"`
  98. VulAsapSum int `json:"VulAsapSum" xml:"VulAsapSum"`
  99. VulNntfSum int `json:"VulNntfSum" xml:"VulNntfSum"`
  100. HealthTotal int `json:"HealthTotal" xml:"HealthTotal"`
  101. SuspiciousmediumTotal int `json:"SuspiciousmediumTotal" xml:"SuspiciousmediumTotal"`
  102. Health int `json:"Health" xml:"Health"`
  103. HealthdealedTotal int `json:"HealthdealedTotal" xml:"HealthdealedTotal"`
  104. Trojan int `json:"Trojan" xml:"Trojan"`
  105. VulLaterSum int `json:"VulLaterSum" xml:"VulLaterSum"`
  106. Suspicious int `json:"Suspicious" xml:"Suspicious"`
  107. Vul int `json:"Vul" xml:"Vul"`
  108. HealthhighTotal int `json:"HealthhighTotal" xml:"HealthhighTotal"`
  109. HealthlowTotal int `json:"HealthlowTotal" xml:"HealthlowTotal"`
  110. HealthseriousTotal int `json:"HealthseriousTotal" xml:"HealthseriousTotal"`
  111. VulDealedTotal int `json:"VulDealedTotal" xml:"VulDealedTotal"`
  112. Patch int `json:"Patch" xml:"Patch"`
  113. SuspicioushighTotal int `json:"SuspicioushighTotal" xml:"SuspicioushighTotal"`
  114. SuspiciouslowTotal int `json:"SuspiciouslowTotal" xml:"SuspiciouslowTotal"`
  115. SuspiciousTotal int `json:"SuspiciousTotal" xml:"SuspiciousTotal"`
  116. VulTotal int `json:"VulTotal" xml:"VulTotal"`
  117. SuspiciousseriousTotal int `json:"SuspiciousseriousTotal" xml:"SuspiciousseriousTotal"`
  118. HealthmediumTotal int `json:"HealthmediumTotal" xml:"HealthmediumTotal"`
  119. Online bool `json:"Online" xml:"Online"`
  120. SuspiciousdealedTotal int `json:"SuspiciousdealedTotal" xml:"SuspiciousdealedTotal"`
  121. Account int `json:"Account" xml:"Account"`
  122. Newsuspicious int `json:"Newsuspicious" xml:"Newsuspicious"`
  123. }
  124. // CreateDescribeTotalStatisticsRequest creates a request to invoke DescribeTotalStatistics API
  125. func CreateDescribeTotalStatisticsRequest() (request *DescribeTotalStatisticsRequest) {
  126. request = &DescribeTotalStatisticsRequest{
  127. RpcRequest: &requests.RpcRequest{},
  128. }
  129. request.InitWithApiInfo("aegis", "2016-11-11", "DescribeTotalStatistics", "vipaegis", "openAPI")
  130. return
  131. }
  132. // CreateDescribeTotalStatisticsResponse creates a response to parse from DescribeTotalStatistics response
  133. func CreateDescribeTotalStatisticsResponse() (response *DescribeTotalStatisticsResponse) {
  134. response = &DescribeTotalStatisticsResponse{
  135. BaseResponse: &responses.BaseResponse{},
  136. }
  137. return
  138. }