github.com/cilium/cilium@v1.16.2/api/v1/models/ip_list_entry_metadata.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 // IPListEntryMetadata Additional metadata assigned to an IP list entry 19 // 20 // swagger:model IPListEntryMetadata 21 type IPListEntryMetadata struct { 22 23 // Name assigned to the IP (e.g. Kubernetes pod name) 24 Name string `json:"name,omitempty"` 25 26 // Namespace of the IP (e.g. Kubernetes namespace) 27 Namespace string `json:"namespace,omitempty"` 28 29 // Source of the IP entry and its metadata 30 // Example: k8s 31 Source string `json:"source,omitempty"` 32 } 33 34 // Validate validates this IP list entry metadata 35 func (m *IPListEntryMetadata) Validate(formats strfmt.Registry) error { 36 return nil 37 } 38 39 // ContextValidate validates this IP list entry metadata based on context it is used 40 func (m *IPListEntryMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 41 return nil 42 } 43 44 // MarshalBinary interface implementation 45 func (m *IPListEntryMetadata) MarshalBinary() ([]byte, error) { 46 if m == nil { 47 return nil, nil 48 } 49 return swag.WriteJSON(m) 50 } 51 52 // UnmarshalBinary interface implementation 53 func (m *IPListEntryMetadata) UnmarshalBinary(b []byte) error { 54 var res IPListEntryMetadata 55 if err := swag.ReadJSON(b, &res); err != nil { 56 return err 57 } 58 *m = res 59 return nil 60 }