github.com/cilium/cilium@v1.16.2/api/v1/models/b_p_f_map_properties.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 // BPFMapProperties BPF map properties 19 // 20 // swagger:model BPFMapProperties 21 type BPFMapProperties struct { 22 23 // Name of the BPF map 24 Name string `json:"name,omitempty"` 25 26 // Size of the BPF map 27 Size int64 `json:"size,omitempty"` 28 } 29 30 // Validate validates this b p f map properties 31 func (m *BPFMapProperties) Validate(formats strfmt.Registry) error { 32 return nil 33 } 34 35 // ContextValidate validates this b p f map properties based on context it is used 36 func (m *BPFMapProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 37 return nil 38 } 39 40 // MarshalBinary interface implementation 41 func (m *BPFMapProperties) MarshalBinary() ([]byte, error) { 42 if m == nil { 43 return nil, nil 44 } 45 return swag.WriteJSON(m) 46 } 47 48 // UnmarshalBinary interface implementation 49 func (m *BPFMapProperties) UnmarshalBinary(b []byte) error { 50 var res BPFMapProperties 51 if err := swag.ReadJSON(b, &res); err != nil { 52 return err 53 } 54 *m = res 55 return nil 56 }