github.com/cilium/cilium@v1.16.2/api/v1/models/ip_a_m_address_response.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 // IPAMAddressResponse IPAM configuration of an individual address family 19 // 20 // swagger:model IPAMAddressResponse 21 type IPAMAddressResponse struct { 22 23 // List of CIDRs out of which IPs are allocated 24 Cidrs []string `json:"cidrs"` 25 26 // The UUID for the expiration timer. Set when expiration has been 27 // enabled while allocating. 28 // 29 ExpirationUUID string `json:"expiration-uuid,omitempty"` 30 31 // IP of gateway 32 Gateway string `json:"gateway,omitempty"` 33 34 // InterfaceNumber is a field for generically identifying an interface. This is only useful in ENI mode. 35 // 36 InterfaceNumber string `json:"interface-number,omitempty"` 37 38 // Allocated IP for endpoint 39 IP string `json:"ip,omitempty"` 40 41 // MAC of master interface if address is a slave/secondary of a master interface 42 MasterMac string `json:"master-mac,omitempty"` 43 } 44 45 // Validate validates this IP a m address response 46 func (m *IPAMAddressResponse) Validate(formats strfmt.Registry) error { 47 return nil 48 } 49 50 // ContextValidate validates this IP a m address response based on context it is used 51 func (m *IPAMAddressResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 52 return nil 53 } 54 55 // MarshalBinary interface implementation 56 func (m *IPAMAddressResponse) MarshalBinary() ([]byte, error) { 57 if m == nil { 58 return nil, nil 59 } 60 return swag.WriteJSON(m) 61 } 62 63 // UnmarshalBinary interface implementation 64 func (m *IPAMAddressResponse) UnmarshalBinary(b []byte) error { 65 var res IPAMAddressResponse 66 if err := swag.ReadJSON(b, &res); err != nil { 67 return err 68 } 69 *m = res 70 return nil 71 }