github.com/kubearmor/cilium@v1.6.12/api/v1/models/selector_identity_mapping.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package models
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	strfmt "github.com/go-openapi/strfmt"
    10  
    11  	"github.com/go-openapi/swag"
    12  )
    13  
    14  // SelectorIdentityMapping mapping of selector to identities which match it
    15  // swagger:model SelectorIdentityMapping
    16  type SelectorIdentityMapping struct {
    17  
    18  	// identities mapping to this selector
    19  	Identities []int64 `json:"identities"`
    20  
    21  	// string form of selector
    22  	Selector string `json:"selector,omitempty"`
    23  
    24  	// number of users of this selector in the cache
    25  	Users int64 `json:"users,omitempty"`
    26  }
    27  
    28  // Validate validates this selector identity mapping
    29  func (m *SelectorIdentityMapping) Validate(formats strfmt.Registry) error {
    30  	return nil
    31  }
    32  
    33  // MarshalBinary interface implementation
    34  func (m *SelectorIdentityMapping) MarshalBinary() ([]byte, error) {
    35  	if m == nil {
    36  		return nil, nil
    37  	}
    38  	return swag.WriteJSON(m)
    39  }
    40  
    41  // UnmarshalBinary interface implementation
    42  func (m *SelectorIdentityMapping) UnmarshalBinary(b []byte) error {
    43  	var res SelectorIdentityMapping
    44  	if err := swag.ReadJSON(b, &res); err != nil {
    45  		return err
    46  	}
    47  	*m = res
    48  	return nil
    49  }