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

// PlaylistItemDTO playlist item DTO
//
// swagger:model PlaylistItemDTO
type PlaylistItemDTO struct {

	// Title is an unused property -- it will be removed in the future
	Title string `json:"title,omitempty"`

	// Type of the item.
	Type string `json:"type,omitempty"`

	// Value depends on type and describes the playlist item.
	//
	// dashboard_by_id: The value is an internal numerical identifier set by Grafana. This
	// is not portable as the numerical identifier is non-deterministic between different instances.
	// Will be replaced by dashboard_by_uid in the future. (deprecated)
	// dashboard_by_tag: The value is a tag which is set on any number of dashboards. All
	// dashboards behind the tag will be added to the playlist.
	// dashboard_by_uid: The value is the dashboard UID
	Value string `json:"value,omitempty"`
}

// Validate validates this playlist item DTO
func (m *PlaylistItemDTO) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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