// 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 (
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// Status status
//
// swagger:model Status
type Status struct {

	// average response time
	AverageResponseTime float64 `json:"AverageResponseTime,omitempty"`

	// d b state
	DBState string `json:"DBState,omitempty"`

	// last request
	LastRequest string `json:"LastRequest,omitempty"`

	// requests bo t
	RequestsBoT int64 `json:"RequestsBoT,omitempty"`

	// requests last hour
	RequestsLastHour int64 `json:"RequestsLastHour,omitempty"`

	// requests today
	RequestsToday int64 `json:"RequestsToday,omitempty"`

	// system state
	// Required: true
	SystemState *string `json:"SystemState"`
}

// Validate validates this status
func (m *Status) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateSystemState(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *Status) validateSystemState(formats strfmt.Registry) error {

	if err := validate.Required("SystemState", "body", m.SystemState); err != nil {
		return err
	}

	return nil
}

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

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