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

// HashicorpCloudVagrant20220930BoxSummary hashicorp cloud vagrant 20220930 box summary
//
// swagger:model hashicorp.cloud.vagrant_20220930.BoxSummary
type HashicorpCloudVagrant20220930BoxSummary struct {

	// The date the most recent version was released
	// Format: date-time
	LatestReleasedAt strfmt.DateTime `json:"latest_released_at,omitempty"`

	// List of providers taht have versions available for this box
	ProviderNames []string `json:"provider_names"`

	// Total number of versions available on this box.
	VersionsCount string `json:"versions_count,omitempty"`
}

// Validate validates this hashicorp cloud vagrant 20220930 box summary
func (m *HashicorpCloudVagrant20220930BoxSummary) Validate(formats strfmt.Registry) error {
	var res []error

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

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

func (m *HashicorpCloudVagrant20220930BoxSummary) validateLatestReleasedAt(formats strfmt.Registry) error {
	if swag.IsZero(m.LatestReleasedAt) { // not required
		return nil
	}

	if err := validate.FormatOf("latest_released_at", "body", "date-time", m.LatestReleasedAt.String(), formats); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this hashicorp cloud vagrant 20220930 box summary based on context it is used
func (m *HashicorpCloudVagrant20220930BoxSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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