// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package components

import (
	"encoding/json"
	"fmt"
)

// LineupType - - `-1`: N/A
// - `0`: Over the air
// - `1`: Cable
// - `2`: Satellite
// - `3`: IPTV
// - `4`: Virtual
type LineupType int64

const (
	LineupTypeMinus1 LineupType = -1
	LineupTypeZero   LineupType = 0
	LineupTypeOne    LineupType = 1
	LineupTypeTwo    LineupType = 2
	LineupTypeThree  LineupType = 3
	LineupTypeFour   LineupType = 4
)

func (e LineupType) ToPointer() *LineupType {
	return &e
}
func (e *LineupType) UnmarshalJSON(data []byte) error {
	var v int64
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case -1:
		fallthrough
	case 0:
		fallthrough
	case 1:
		fallthrough
	case 2:
		fallthrough
	case 3:
		fallthrough
	case 4:
		*e = LineupType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for LineupType: %v", v)
	}
}

type Lineup struct {
	Title *string `json:"title,omitempty"`
	// The type of this object (`lineup` in this case)
	Type *string `json:"type,omitempty"`
	// - `-1`: N/A
	// - `0`: Over the air
	// - `1`: Cable
	// - `2`: Satellite
	// - `3`: IPTV
	// - `4`: Virtual
	//
	LineupType *LineupType `json:"lineupType,omitempty"`
	Location   *string     `json:"location,omitempty"`
	// The uuid of this lineup
	UUID *string `json:"uuid,omitempty"`
}

func (l *Lineup) GetTitle() *string {
	if l == nil {
		return nil
	}
	return l.Title
}

func (l *Lineup) GetType() *string {
	if l == nil {
		return nil
	}
	return l.Type
}

func (l *Lineup) GetLineupType() *LineupType {
	if l == nil {
		return nil
	}
	return l.LineupType
}

func (l *Lineup) GetLocation() *string {
	if l == nil {
		return nil
	}
	return l.Location
}

func (l *Lineup) GetUUID() *string {
	if l == nil {
		return nil
	}
	return l.UUID
}
