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

package components

import (
	"github.com/LukeHagar/plexgo/internal/utils"
)

type Hub struct {
	// A title for this grouping of content
	Title *string `json:"title,omitempty"`
	// The type of the items contained in this hub, or possibly `mixed` if there are multiple types
	Type    *string `json:"type,omitempty"`
	Context *string `json:"context,omitempty"`
	// A unique identifier for the hub
	HubIdentifier *string `json:"hubIdentifier,omitempty"`
	// A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional.
	//
	HubKey *string `json:"hubKey,omitempty"`
	// The key at which all of the content for this hub can be retrieved
	Key      *string    `json:"key,omitempty"`
	Metadata []Metadata `json:"Metadata,omitempty"`
	// "A boolean indicating that the hub contains more than what's included in the current response."
	//
	More *bool `json:"more,omitempty"`
	// Indicating if the hub should be promoted to the user's homescreen
	Promoted *bool `json:"promoted,omitempty"`
	// Indicating that the contents of the hub may change on each request
	Random *bool  `json:"random,omitempty"`
	Size   *int64 `json:"size,omitempty"`
	// A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell`
	Style *string `json:"style,omitempty"`
	// The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types
	Subtype              *string        `json:"subtype,omitempty"`
	TotalSize            *int64         `json:"totalSize,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

func (h Hub) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(h, "", false)
}

func (h *Hub) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &h, "", false, nil); err != nil {
		return err
	}
	return nil
}

func (h *Hub) GetTitle() *string {
	if h == nil {
		return nil
	}
	return h.Title
}

func (h *Hub) GetType() *string {
	if h == nil {
		return nil
	}
	return h.Type
}

func (h *Hub) GetContext() *string {
	if h == nil {
		return nil
	}
	return h.Context
}

func (h *Hub) GetHubIdentifier() *string {
	if h == nil {
		return nil
	}
	return h.HubIdentifier
}

func (h *Hub) GetHubKey() *string {
	if h == nil {
		return nil
	}
	return h.HubKey
}

func (h *Hub) GetKey() *string {
	if h == nil {
		return nil
	}
	return h.Key
}

func (h *Hub) GetMetadata() []Metadata {
	if h == nil {
		return nil
	}
	return h.Metadata
}

func (h *Hub) GetMore() *bool {
	if h == nil {
		return nil
	}
	return h.More
}

func (h *Hub) GetPromoted() *bool {
	if h == nil {
		return nil
	}
	return h.Promoted
}

func (h *Hub) GetRandom() *bool {
	if h == nil {
		return nil
	}
	return h.Random
}

func (h *Hub) GetSize() *int64 {
	if h == nil {
		return nil
	}
	return h.Size
}

func (h *Hub) GetStyle() *string {
	if h == nil {
		return nil
	}
	return h.Style
}

func (h *Hub) GetSubtype() *string {
	if h == nil {
		return nil
	}
	return h.Subtype
}

func (h *Hub) GetTotalSize() *int64 {
	if h == nil {
		return nil
	}
	return h.TotalSize
}

func (h *Hub) GetAdditionalProperties() map[string]any {
	if h == nil {
		return nil
	}
	return h.AdditionalProperties
}
