zz_generated.model.go 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. // Licensed under the Apache License, Version 2.0 (the "License");
  2. // you may not use this file except in compliance with the License.
  3. // You may obtain a copy of the License at
  4. //
  5. // http://www.apache.org/licenses/LICENSE-2.0
  6. //
  7. // Unless required by applicable law or agreed to in writing, software
  8. // distributed under the License is distributed on an "AS IS" BASIS,
  9. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. // See the License for the specific language governing permissions and
  11. // limitations under the License.
  12. // Code generated by model-api-gen. DO NOT EDIT.
  13. package monitor
  14. import (
  15. time "time"
  16. jsonutils "yunion.io/x/jsonutils"
  17. "yunion.io/x/onecloud/pkg/apis"
  18. )
  19. // SAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlert.
  20. type SAlert struct {
  21. // db.SVirtualResourceBase
  22. apis.SEnabledResourceBase
  23. apis.SStatusStandaloneResourceBase
  24. SMonitorScopedResource
  25. // Frequency is evaluate period
  26. Frequency int64 `json:"frequency"`
  27. Settings *AlertSetting `json:"settings"`
  28. Level string `json:"level"`
  29. Message string `json:"message"`
  30. UsedBy string `json:"used_by"`
  31. // Silenced bool
  32. ExecutionError string `json:"execution_error"`
  33. // If an alert rule has a configured `For` and the query violates the configured threshold
  34. // it will first go from `OK` to `Pending`. Going from `OK` to `Pending` will not send any
  35. // notifications. Once the alert rule has been firing for more than `For` duration, it will
  36. // change to `Alerting` and send alert notifications.
  37. For int64 `json:"for"`
  38. EvalData jsonutils.JSONObject `json:"eval_data"`
  39. State string `json:"state"`
  40. NoDataState string `json:"no_data_state"`
  41. ExecutionErrorState string `json:"execution_error_state"`
  42. LastStateChange time.Time `json:"last_state_change"`
  43. StateChanges int `json:"state_changes"`
  44. CustomizeConfig jsonutils.JSONObject `json:"customize_config"`
  45. ResType string `json:"res_type"`
  46. }
  47. // SAlertDashBoard is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertDashBoard.
  48. type SAlertDashBoard struct {
  49. // db.SVirtualResourceBase
  50. apis.SEnabledResourceBase
  51. apis.SStatusStandaloneResourceBase
  52. apis.SScopedResourceBase
  53. Refresh string `json:"refresh"`
  54. }
  55. // SAlertPanel is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertPanel.
  56. type SAlertPanel struct {
  57. apis.SStatusStandaloneResourceBase
  58. apis.SScopedResourceBase
  59. Settings *AlertSetting `json:"settings"`
  60. Message string `json:"message"`
  61. }
  62. // SAlertRecord is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertRecord.
  63. type SAlertRecord struct {
  64. // db.SVirtualResourceBase
  65. apis.SEnabledResourceBase
  66. apis.SStandaloneAnonResourceBase
  67. SMonitorScopedResource
  68. AlertId string `json:"alert_id"`
  69. Level string `json:"level"`
  70. State string `json:"state"`
  71. SendState string `json:"send_state"`
  72. EvalData jsonutils.JSONObject `json:"eval_data"`
  73. AlertRule jsonutils.JSONObject `json:"alert_rule"`
  74. ResType string `json:"res_type"`
  75. ResIds string `json:"res_ids"`
  76. }
  77. // SAlertRecordShield is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertRecordShield.
  78. type SAlertRecordShield struct {
  79. // db.SVirtualResourceBase
  80. apis.SEnabledResourceBase
  81. apis.SStatusStandaloneResourceBase
  82. SMonitorScopedResource
  83. AlertId string `json:"alert_id"`
  84. ResId string `json:"res_id"`
  85. ResType string `json:"res_type"`
  86. StartTime time.Time `json:"start_time"`
  87. EndTime time.Time `json:"end_time"`
  88. }
  89. // SAlertResource is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SAlertResource.
  90. type SAlertResource struct {
  91. apis.SStandaloneResourceBase
  92. Type string `json:"type"`
  93. }
  94. // SCommonAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SCommonAlert.
  95. type SCommonAlert struct {
  96. SAlert
  97. }
  98. // SDataSource is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SDataSource.
  99. type SDataSource struct {
  100. apis.SStandaloneResourceBase
  101. Type string `json:"type"`
  102. Url string `json:"url"`
  103. User string `json:"user"`
  104. Password string `json:"password"`
  105. Database string `json:"database"`
  106. IsDefault *bool `json:"is_default,omitempty"`
  107. }
  108. // SMetric is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMetric.
  109. type SMetric struct {
  110. apis.SVirtualJointResourceBase
  111. MeasurementId string `json:"measurement_id"`
  112. FieldId string `json:"field_id"`
  113. }
  114. // SMetricField is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMetricField.
  115. type SMetricField struct {
  116. // db.SVirtualResourceBase
  117. apis.SEnabledResourceBase
  118. apis.SStatusStandaloneResourceBase
  119. apis.SScopedResourceBase
  120. DisplayName string `json:"display_name"`
  121. Unit string `json:"unit"`
  122. ValueType string `json:"value_type"`
  123. Score int `json:"score"`
  124. }
  125. // SMetricMeasurement is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMetricMeasurement.
  126. type SMetricMeasurement struct {
  127. // db.SVirtualResourceBase
  128. apis.SEnabledResourceBase
  129. apis.SStatusStandaloneResourceBase
  130. apis.SScopedResourceBase
  131. ResType string `json:"res_type"`
  132. Database string `json:"database"`
  133. DisplayName string `json:"display_name"`
  134. Score int `json:"score"`
  135. }
  136. // SMigrationAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMigrationAlert.
  137. type SMigrationAlert struct {
  138. SAlert
  139. MetricType string `json:"metric_type"`
  140. MigrateNotes jsonutils.JSONObject `json:"migrate_notes"`
  141. }
  142. // SMonitorResource is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMonitorResource.
  143. type SMonitorResource struct {
  144. apis.SVirtualResourceBase
  145. apis.SEnabledResourceBase
  146. AlertState string `json:"alert_state"`
  147. ResId string `json:"res_id"`
  148. ResType string `json:"res_type"`
  149. }
  150. // SMonitorResourceAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMonitorResourceAlert.
  151. type SMonitorResourceAlert struct {
  152. apis.SJointResourceBase
  153. MonitorResourceId string `json:"monitor_resource_id"`
  154. AlertId string `json:"alert_id"`
  155. AlertRecordId string `json:"alert_record_id"`
  156. ResType string `json:"res_type"`
  157. Metric string `json:"metric"`
  158. AlertState string `json:"alert_state"`
  159. SendState string `json:"send_state"`
  160. TriggerTime time.Time `json:"trigger_time"`
  161. Data jsonutils.JSONObject `json:"data"`
  162. }
  163. // SMonitorScopedResource is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SMonitorScopedResource.
  164. type SMonitorScopedResource struct {
  165. apis.SScopedResourceBase
  166. }
  167. // SNodeAlert is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SNodeAlert.
  168. type SNodeAlert struct {
  169. SCommonAlert
  170. }
  171. // SNotification is an autogenerated struct via yunion.io/x/onecloud/pkg/monitor/models.SNotification.
  172. type SNotification struct {
  173. apis.SVirtualResourceBase
  174. Type string `json:"type"`
  175. IsDefault bool `json:"is_default"`
  176. SendReminder bool `json:"send_reminder"`
  177. DisableResolveMessage bool `json:"disable_resolve_message"`
  178. // unit is second
  179. Frequency int64 `json:"frequency"`
  180. Settings jsonutils.JSONObject `json:"settings"`
  181. LastSendNotification time.Time `json:"last_send_notification"`
  182. }