// Code generated by go-swagger; DO NOT EDIT.

// Copyright Authors of Cilium
// SPDX-License-Identifier: Apache-2.0

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"
)

// ModuleHealth Report module health status
//
// swagger:model ModuleHealth
type ModuleHealth struct {

	// Time at which the last OK check occurred
	LastOk string `json:"last-ok,omitempty"`

	// Time of last health update
	LastUpdated string `json:"last-updated,omitempty"`

	// Describes the health status level
	Level string `json:"level,omitempty"`

	// Reports the associated health message
	Message string `json:"message,omitempty"`

	// Describes the module identitier
	ModuleID string `json:"module-id,omitempty"`
}

// Validate validates this module health
func (m *ModuleHealth) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this module health based on context it is used
func (m *ModuleHealth) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *ModuleHealth) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *ModuleHealth) UnmarshalBinary(b []byte) error {
	var res ModuleHealth
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
