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

package types

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// MemoryStats MemoryStats aggregates all memory stats since container inception on Linux.
// swagger:model MemoryStats
type MemoryStats struct {

	// number of times memory usage hits limits.
	Failcnt uint64 `json:"failcnt,omitempty"`

	// xxx
	Limit uint64 `json:"limit,omitempty"`

	// maximum usage ever recorded.
	MaxUsage uint64 `json:"max_usage,omitempty"`

	// all the stats exported via memory.stat.
	Stats map[string]uint64 `json:"stats,omitempty"`

	// current res_counter usage for memory
	Usage uint64 `json:"usage,omitempty"`
}

// Validate validates this memory stats
func (m *MemoryStats) Validate(formats strfmt.Registry) error {
	return nil
}

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

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