github.com/cilium/cilium@v1.16.2/api/v1/models/message_forwarding_statistics.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // Copyright Authors of Cilium 4 // SPDX-License-Identifier: Apache-2.0 5 6 package models 7 8 // This file was generated by the swagger tool. 9 // Editing this file might prove futile when you re-run the swagger generate command 10 11 import ( 12 "context" 13 14 "github.com/go-openapi/strfmt" 15 "github.com/go-openapi/swag" 16 ) 17 18 // MessageForwardingStatistics Statistics of a message forwarding entity 19 // 20 // swagger:model MessageForwardingStatistics 21 type MessageForwardingStatistics struct { 22 23 // Number of messages denied 24 Denied int64 `json:"denied,omitempty"` 25 26 // Number of errors while parsing messages 27 Error int64 `json:"error,omitempty"` 28 29 // Number of messages forwarded 30 Forwarded int64 `json:"forwarded,omitempty"` 31 32 // Number of messages received 33 Received int64 `json:"received,omitempty"` 34 } 35 36 // Validate validates this message forwarding statistics 37 func (m *MessageForwardingStatistics) Validate(formats strfmt.Registry) error { 38 return nil 39 } 40 41 // ContextValidate validates this message forwarding statistics based on context it is used 42 func (m *MessageForwardingStatistics) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 43 return nil 44 } 45 46 // MarshalBinary interface implementation 47 func (m *MessageForwardingStatistics) MarshalBinary() ([]byte, error) { 48 if m == nil { 49 return nil, nil 50 } 51 return swag.WriteJSON(m) 52 } 53 54 // UnmarshalBinary interface implementation 55 func (m *MessageForwardingStatistics) UnmarshalBinary(b []byte) error { 56 var res MessageForwardingStatistics 57 if err := swag.ReadJSON(b, &res); err != nil { 58 return err 59 } 60 *m = res 61 return nil 62 }