github.com/cilium/cilium@v1.16.2/api/v1/models/remote_cluster_config.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  // RemoteClusterConfig Cluster configuration exposed by the remote cluster
    19  //
    20  // +k8s:deepcopy-gen=true
    21  //
    22  // swagger:model RemoteClusterConfig
    23  type RemoteClusterConfig struct {
    24  
    25  	// The Cluster ID advertised by the remote cluster
    26  	ClusterID int64 `json:"cluster-id,omitempty"`
    27  
    28  	// Whether the remote cluster information is locally cached by kvstoremesh
    29  	Kvstoremesh bool `json:"kvstoremesh,omitempty"`
    30  
    31  	// Whether the configuration is required to be present
    32  	Required bool `json:"required,omitempty"`
    33  
    34  	// Whether the configuration has been correctly retrieved
    35  	Retrieved bool `json:"retrieved,omitempty"`
    36  
    37  	// Whether the remote cluster supports per-prefix "synced" canaries
    38  	SyncCanaries bool `json:"sync-canaries,omitempty"`
    39  }
    40  
    41  // Validate validates this remote cluster config
    42  func (m *RemoteClusterConfig) Validate(formats strfmt.Registry) error {
    43  	return nil
    44  }
    45  
    46  // ContextValidate validates this remote cluster config based on context it is used
    47  func (m *RemoteClusterConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    48  	return nil
    49  }
    50  
    51  // MarshalBinary interface implementation
    52  func (m *RemoteClusterConfig) 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 *RemoteClusterConfig) UnmarshalBinary(b []byte) error {
    61  	var res RemoteClusterConfig
    62  	if err := swag.ReadJSON(b, &res); err != nil {
    63  		return err
    64  	}
    65  	*m = res
    66  	return nil
    67  }