bitbucket.org/Aishee/synsec@v0.0.0-20210414005726-236fc01a153d/pkg/models/metrics_soft_info.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "github.com/go-openapi/strfmt" 10 "github.com/go-openapi/swag" 11 ) 12 13 // MetricsSoftInfo MetricsSoftInfo 14 // 15 // Software version info (so we can warn users about out-of-date software). The software name and the version are "guessed" from the user-agent 16 // 17 // swagger:model MetricsSoftInfo 18 type MetricsSoftInfo struct { 19 20 // name of the component 21 Name string `json:"name,omitempty"` 22 23 // software version 24 Version string `json:"version,omitempty"` 25 } 26 27 // Validate validates this metrics soft info 28 func (m *MetricsSoftInfo) Validate(formats strfmt.Registry) error { 29 return nil 30 } 31 32 // MarshalBinary interface implementation 33 func (m *MetricsSoftInfo) MarshalBinary() ([]byte, error) { 34 if m == nil { 35 return nil, nil 36 } 37 return swag.WriteJSON(m) 38 } 39 40 // UnmarshalBinary interface implementation 41 func (m *MetricsSoftInfo) UnmarshalBinary(b []byte) error { 42 var res MetricsSoftInfo 43 if err := swag.ReadJSON(b, &res); err != nil { 44 return err 45 } 46 *m = res 47 return nil 48 }