github.com/cilium/cilium@v1.16.2/api/v1/models/bgp_peer_families.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  // BgpPeerFamilies BGP AFI SAFI state of the peer
    19  //
    20  // +k8s:deepcopy-gen=true
    21  //
    22  // swagger:model BgpPeerFamilies
    23  type BgpPeerFamilies struct {
    24  
    25  	// Number of routes accepted from the peer of this address family
    26  	Accepted int64 `json:"accepted,omitempty"`
    27  
    28  	// Number of routes advertised of this address family to the peer
    29  	Advertised int64 `json:"advertised,omitempty"`
    30  
    31  	// BGP address family indicator
    32  	Afi string `json:"afi,omitempty"`
    33  
    34  	// Number of routes received from the peer of this address family
    35  	Received int64 `json:"received,omitempty"`
    36  
    37  	// BGP subsequent address family indicator
    38  	Safi string `json:"safi,omitempty"`
    39  }
    40  
    41  // Validate validates this bgp peer families
    42  func (m *BgpPeerFamilies) Validate(formats strfmt.Registry) error {
    43  	return nil
    44  }
    45  
    46  // ContextValidate validates this bgp peer families based on context it is used
    47  func (m *BgpPeerFamilies) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    48  	return nil
    49  }
    50  
    51  // MarshalBinary interface implementation
    52  func (m *BgpPeerFamilies) MarshalBinary() ([]byte, error) {
    53  	if m == nil {
    54  		return nil, nil
    55  	}
    56  	return swag.WriteJSON(m)
    57  }
    58  
    59  // UnmarshalBinary interface implementation
    60  func (m *BgpPeerFamilies) UnmarshalBinary(b []byte) error {
    61  	var res BgpPeerFamilies
    62  	if err := swag.ReadJSON(b, &res); err != nil {
    63  		return err
    64  	}
    65  	*m = res
    66  	return nil
    67  }