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

// NetworkStats container stats almost from cgroup resource usage.
// swagger:model NetworkStats
type NetworkStats struct {

	// Endpoint ID.
	EndpointID string `json:"endpoint_id,omitempty"`

	// Instance ID.
	InstanceID string `json:"instance_id,omitempty"`

	// Bytes received.
	RxBytes uint64 `json:"rx_bytes,omitempty"`

	// Incoming packets dropped.
	RxDropped uint64 `json:"rx_dropped,omitempty"`

	// Received errors.
	RxErrors uint64 `json:"rx_errors,omitempty"`

	// Packets received.
	RxPackets uint64 `json:"rx_packets,omitempty"`

	// Bytes sent.
	TxBytes uint64 `json:"tx_bytes,omitempty"`

	// Outgoing packets dropped.
	TxDropped uint64 `json:"tx_dropped,omitempty"`

	// Sent errors.
	TxErrors uint64 `json:"tx_errors,omitempty"`

	// Packets sent.
	TxPackets uint64 `json:"tx_packets,omitempty"`
}

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

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

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