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

// Route route
//
// swagger:model route
type Route struct {

	// The destination network or destination host
	Destination string `json:"destination,omitempty"`

	// Defines whether this is an IPv4 (4) or IPv6 route (6)
	Family int32 `json:"family,omitempty"`

	// Gateway address where the packets are sent
	Gateway string `json:"gateway,omitempty"`

	// Interface to which packets for this route will be sent
	Interface string `json:"interface,omitempty"`

	// Route priority metric
	Metric int32 `json:"metric,omitempty"`
}

// Validate validates this route
func (m *Route) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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