// 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"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// VolumeGroupActionReset Performs reset action on the volume group to update its status value
//
// swagger:model VolumeGroupActionReset
type VolumeGroupActionReset struct {

	// New status to be set for a volume group
	// Required: true
	// Enum: [available]
	Status *string `json:"status"`
}

// Validate validates this volume group action reset
func (m *VolumeGroupActionReset) Validate(formats strfmt.Registry) error {
	var res []error

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

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

var volumeGroupActionResetTypeStatusPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["available"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		volumeGroupActionResetTypeStatusPropEnum = append(volumeGroupActionResetTypeStatusPropEnum, v)
	}
}

const (

	// VolumeGroupActionResetStatusAvailable captures enum value "available"
	VolumeGroupActionResetStatusAvailable string = "available"
)

// prop value enum
func (m *VolumeGroupActionReset) validateStatusEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, volumeGroupActionResetTypeStatusPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (m *VolumeGroupActionReset) validateStatus(formats strfmt.Registry) error {

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

	// value enum
	if err := m.validateStatusEnum("status", "body", *m.Status); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this volume group action reset based on context it is used
func (m *VolumeGroupActionReset) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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