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

// DiskSkipFormattingParams Allows an addition or removal of a host disk from the host's skip_formatting_disks list
//
// swagger:model disk-skip-formatting-params
type DiskSkipFormattingParams struct {

	// The ID of the disk that is being added to or removed from the host's skip_formatting_disks list
	// Required: true
	DiskID *string `json:"disk_id"`

	// True if you wish to add the disk to the skip_formatting_disks list, false if you wish to remove it
	// Required: true
	SkipFormatting *bool `json:"skip_formatting"`
}

// Validate validates this disk skip formatting params
func (m *DiskSkipFormattingParams) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *DiskSkipFormattingParams) validateDiskID(formats strfmt.Registry) error {

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

	return nil
}

func (m *DiskSkipFormattingParams) validateSkipFormatting(formats strfmt.Registry) error {

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

	return nil
}

// ContextValidate validates this disk skip formatting params based on context it is used
func (m *DiskSkipFormattingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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