github.com/cilium/cilium@v1.16.2/api/v1/models/address_pair.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  // AddressPair Addressing information of an endpoint
    19  //
    20  // swagger:model AddressPair
    21  type AddressPair struct {
    22  
    23  	// IPv4 address
    24  	IPV4 string `json:"ipv4,omitempty"`
    25  
    26  	// UUID of IPv4 expiration timer
    27  	IPV4ExpirationUUID string `json:"ipv4-expiration-uuid,omitempty"`
    28  
    29  	// IPAM pool from which this IPv4 address was allocated
    30  	IPV4PoolName string `json:"ipv4-pool-name,omitempty"`
    31  
    32  	// IPv6 address
    33  	IPV6 string `json:"ipv6,omitempty"`
    34  
    35  	// UUID of IPv6 expiration timer
    36  	IPV6ExpirationUUID string `json:"ipv6-expiration-uuid,omitempty"`
    37  
    38  	// IPAM pool from which this IPv6 address was allocated
    39  	IPV6PoolName string `json:"ipv6-pool-name,omitempty"`
    40  }
    41  
    42  // Validate validates this address pair
    43  func (m *AddressPair) Validate(formats strfmt.Registry) error {
    44  	return nil
    45  }
    46  
    47  // ContextValidate validates this address pair based on context it is used
    48  func (m *AddressPair) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    49  	return nil
    50  }
    51  
    52  // MarshalBinary interface implementation
    53  func (m *AddressPair) MarshalBinary() ([]byte, error) {
    54  	if m == nil {
    55  		return nil, nil
    56  	}
    57  	return swag.WriteJSON(m)
    58  }
    59  
    60  // UnmarshalBinary interface implementation
    61  func (m *AddressPair) UnmarshalBinary(b []byte) error {
    62  	var res AddressPair
    63  	if err := swag.ReadJSON(b, &res); err != nil {
    64  		return err
    65  	}
    66  	*m = res
    67  	return nil
    68  }