diff --git a/generate/swagger.json b/generate/swagger.json index 3a109a4..f266f8f 100644 --- a/generate/swagger.json +++ b/generate/swagger.json @@ -13,6 +13,9 @@ }, "operator": { "$ref": "#/definitions/cluster.Operator" + }, + "syncStatus": { + "$ref": "#/definitions/clusters.SyncStatus" } }, "type": "object" @@ -174,6 +177,93 @@ }, "type": "object" }, + "clusters.ErrorItem": { + "properties": { + "error": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "clusters.LastSync": { + "properties": { + "routegroups": { + "$ref": "#/definitions/clusters.SyncCollectionStatus" + }, + "sandboxes": { + "$ref": "#/definitions/clusters.SyncCollectionStatus" + }, + "time": { + "description": "The time at which the last sync occured.", + "type": "string" + } + }, + "type": "object" + }, + "clusters.ReadinessStats": { + "properties": { + "count": { + "type": "integer" + }, + "readyCondition": { + "type": "string" + }, + "readyReason": { + "type": "string" + } + }, + "type": "object" + }, + "clusters.SyncCollectionStatus": { + "properties": { + "clusterState": { + "description": "A snapshot of the cluster prior to sync.", + "items": { + "$ref": "#/definitions/clusters.ReadinessStats" + }, + "type": "array" + }, + "creations": { + "description": "The number of creations applied to ClusterState.", + "type": "integer" + }, + "deletions": { + "description": "The number of deletions applied to ClusterState.", + "type": "integer" + }, + "errors": { + "description": "Names and errorsassociated items which did not successfully sync,\npossibly truncated.", + "items": { + "$ref": "#/definitions/clusters.ErrorItem" + }, + "type": "array" + }, + "updates": { + "description": "The number of updates applied to ClusterState.", + "type": "integer" + } + }, + "type": "object" + }, + "clusters.SyncStatus": { + "properties": { + "lastError": { + "description": "The last global error of a sync, preventing any synchronisation\nfrom occuring.", + "type": "string" + }, + "lastErrorTime": { + "description": "The time of the last global error of a sync.", + "type": "string" + }, + "lastSync": { + "$ref": "#/definitions/clusters.LastSync" + } + }, + "type": "object" + }, "local": { "properties": { "from": { diff --git a/go.mod b/go.mod index d3fa4d1..19c3c8f 100644 --- a/go.mod +++ b/go.mod @@ -26,9 +26,9 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect go.mongodb.org/mongo-driver v1.12.1 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index f98a52f..1832af3 100644 --- a/go.sum +++ b/go.sum @@ -162,14 +162,14 @@ go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4x go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= diff --git a/models/cluster.go b/models/cluster.go index 421628c..04d67bf 100644 --- a/models/cluster.go +++ b/models/cluster.go @@ -26,6 +26,9 @@ type Cluster struct { // operator Operator *ClusterOperator `json:"operator,omitempty"` + + // sync status + SyncStatus *ClustersSyncStatus `json:"syncStatus,omitempty"` } // Validate validates this cluster @@ -36,6 +39,10 @@ func (m *Cluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSyncStatus(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -61,6 +68,25 @@ func (m *Cluster) validateOperator(formats strfmt.Registry) error { return nil } +func (m *Cluster) validateSyncStatus(formats strfmt.Registry) error { + if swag.IsZero(m.SyncStatus) { // not required + return nil + } + + if m.SyncStatus != nil { + if err := m.SyncStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("syncStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("syncStatus") + } + return err + } + } + + return nil +} + // ContextValidate validate this cluster based on the context it is used func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -69,6 +95,10 @@ func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateSyncStatus(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -96,6 +126,27 @@ func (m *Cluster) contextValidateOperator(ctx context.Context, formats strfmt.Re return nil } +func (m *Cluster) contextValidateSyncStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.SyncStatus != nil { + + if swag.IsZero(m.SyncStatus) { // not required + return nil + } + + if err := m.SyncStatus.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("syncStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("syncStatus") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *Cluster) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/models/clusters_error_item.go b/models/clusters_error_item.go new file mode 100644 index 0000000..9510437 --- /dev/null +++ b/models/clusters_error_item.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClustersErrorItem clusters error item +// +// swagger:model clusters.ErrorItem +type ClustersErrorItem struct { + + // error + Error string `json:"error,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this clusters error item +func (m *ClustersErrorItem) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this clusters error item based on context it is used +func (m *ClustersErrorItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClustersErrorItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClustersErrorItem) UnmarshalBinary(b []byte) error { + var res ClustersErrorItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/clusters_last_sync.go b/models/clusters_last_sync.go new file mode 100644 index 0000000..0ce22e1 --- /dev/null +++ b/models/clusters_last_sync.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClustersLastSync clusters last sync +// +// swagger:model clusters.LastSync +type ClustersLastSync struct { + + // routegroups + Routegroups *ClustersSyncCollectionStatus `json:"routegroups,omitempty"` + + // sandboxes + Sandboxes *ClustersSyncCollectionStatus `json:"sandboxes,omitempty"` + + // The time at which the last sync occured. + Time string `json:"time,omitempty"` +} + +// Validate validates this clusters last sync +func (m *ClustersLastSync) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRoutegroups(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSandboxes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClustersLastSync) validateRoutegroups(formats strfmt.Registry) error { + if swag.IsZero(m.Routegroups) { // not required + return nil + } + + if m.Routegroups != nil { + if err := m.Routegroups.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("routegroups") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("routegroups") + } + return err + } + } + + return nil +} + +func (m *ClustersLastSync) validateSandboxes(formats strfmt.Registry) error { + if swag.IsZero(m.Sandboxes) { // not required + return nil + } + + if m.Sandboxes != nil { + if err := m.Sandboxes.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sandboxes") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sandboxes") + } + return err + } + } + + return nil +} + +// ContextValidate validate this clusters last sync based on the context it is used +func (m *ClustersLastSync) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRoutegroups(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSandboxes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClustersLastSync) contextValidateRoutegroups(ctx context.Context, formats strfmt.Registry) error { + + if m.Routegroups != nil { + + if swag.IsZero(m.Routegroups) { // not required + return nil + } + + if err := m.Routegroups.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("routegroups") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("routegroups") + } + return err + } + } + + return nil +} + +func (m *ClustersLastSync) contextValidateSandboxes(ctx context.Context, formats strfmt.Registry) error { + + if m.Sandboxes != nil { + + if swag.IsZero(m.Sandboxes) { // not required + return nil + } + + if err := m.Sandboxes.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sandboxes") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sandboxes") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ClustersLastSync) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClustersLastSync) UnmarshalBinary(b []byte) error { + var res ClustersLastSync + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/clusters_readiness_stats.go b/models/clusters_readiness_stats.go new file mode 100644 index 0000000..8d73e88 --- /dev/null +++ b/models/clusters_readiness_stats.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClustersReadinessStats clusters readiness stats +// +// swagger:model clusters.ReadinessStats +type ClustersReadinessStats struct { + + // count + Count int64 `json:"count,omitempty"` + + // ready condition + ReadyCondition string `json:"readyCondition,omitempty"` + + // ready reason + ReadyReason string `json:"readyReason,omitempty"` +} + +// Validate validates this clusters readiness stats +func (m *ClustersReadinessStats) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this clusters readiness stats based on context it is used +func (m *ClustersReadinessStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClustersReadinessStats) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClustersReadinessStats) UnmarshalBinary(b []byte) error { + var res ClustersReadinessStats + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/clusters_sync_collection_status.go b/models/clusters_sync_collection_status.go new file mode 100644 index 0000000..27c74d5 --- /dev/null +++ b/models/clusters_sync_collection_status.go @@ -0,0 +1,193 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClustersSyncCollectionStatus clusters sync collection status +// +// swagger:model clusters.SyncCollectionStatus +type ClustersSyncCollectionStatus struct { + + // A snapshot of the cluster prior to sync. + ClusterState []*ClustersReadinessStats `json:"clusterState"` + + // The number of creations applied to ClusterState. + Creations int64 `json:"creations,omitempty"` + + // The number of deletions applied to ClusterState. + Deletions int64 `json:"deletions,omitempty"` + + // Names and errorsassociated items which did not successfully sync, + // possibly truncated. + Errors []*ClustersErrorItem `json:"errors"` + + // The number of updates applied to ClusterState. + Updates int64 `json:"updates,omitempty"` +} + +// Validate validates this clusters sync collection status +func (m *ClustersSyncCollectionStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClustersSyncCollectionStatus) validateClusterState(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterState) { // not required + return nil + } + + for i := 0; i < len(m.ClusterState); i++ { + if swag.IsZero(m.ClusterState[i]) { // not required + continue + } + + if m.ClusterState[i] != nil { + if err := m.ClusterState[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterState" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterState" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ClustersSyncCollectionStatus) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this clusters sync collection status based on the context it is used +func (m *ClustersSyncCollectionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateClusterState(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClustersSyncCollectionStatus) contextValidateClusterState(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ClusterState); i++ { + + if m.ClusterState[i] != nil { + + if swag.IsZero(m.ClusterState[i]) { // not required + return nil + } + + if err := m.ClusterState[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterState" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterState" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ClustersSyncCollectionStatus) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ClustersSyncCollectionStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClustersSyncCollectionStatus) UnmarshalBinary(b []byte) error { + var res ClustersSyncCollectionStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/models/clusters_sync_status.go b/models/clusters_sync_status.go new file mode 100644 index 0000000..3f0aec7 --- /dev/null +++ b/models/clusters_sync_status.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClustersSyncStatus clusters sync status +// +// swagger:model clusters.SyncStatus +type ClustersSyncStatus struct { + + // The last global error of a sync, preventing any synchronisation + // from occuring. + LastError string `json:"lastError,omitempty"` + + // The time of the last global error of a sync. + LastErrorTime string `json:"lastErrorTime,omitempty"` + + // last sync + LastSync *ClustersLastSync `json:"lastSync,omitempty"` +} + +// Validate validates this clusters sync status +func (m *ClustersSyncStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastSync(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClustersSyncStatus) validateLastSync(formats strfmt.Registry) error { + if swag.IsZero(m.LastSync) { // not required + return nil + } + + if m.LastSync != nil { + if err := m.LastSync.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastSync") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastSync") + } + return err + } + } + + return nil +} + +// ContextValidate validate this clusters sync status based on the context it is used +func (m *ClustersSyncStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLastSync(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClustersSyncStatus) contextValidateLastSync(ctx context.Context, formats strfmt.Registry) error { + + if m.LastSync != nil { + + if swag.IsZero(m.LastSync) { // not required + return nil + } + + if err := m.LastSync.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastSync") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastSync") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ClustersSyncStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClustersSyncStatus) UnmarshalBinary(b []byte) error { + var res ClustersSyncStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +}