github.com/cilium/cilium@v1.16.2/api/v1/models/bgp_family.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  // BgpFamily Address Family Indicator (AFI) and Subsequent Address Family Indicator (SAFI) of the path
    19  //
    20  // swagger:model BgpFamily
    21  type BgpFamily struct {
    22  
    23  	// Address Family Indicator (AFI) of the path
    24  	Afi string `json:"afi,omitempty"`
    25  
    26  	// Subsequent Address Family Indicator (SAFI) of the path
    27  	Safi string `json:"safi,omitempty"`
    28  }
    29  
    30  // Validate validates this bgp family
    31  func (m *BgpFamily) Validate(formats strfmt.Registry) error {
    32  	return nil
    33  }
    34  
    35  // ContextValidate validates this bgp family based on context it is used
    36  func (m *BgpFamily) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    37  	return nil
    38  }
    39  
    40  // MarshalBinary interface implementation
    41  func (m *BgpFamily) 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 *BgpFamily) UnmarshalBinary(b []byte) error {
    50  	var res BgpFamily
    51  	if err := swag.ReadJSON(b, &res); err != nil {
    52  		return err
    53  	}
    54  	*m = res
    55  	return nil
    56  }