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

package components

import (
	"encoding/json"
	"fmt"
	"github.com/LukeHagar/plexgo/internal/utils"
	"github.com/LukeHagar/plexgo/types"
)

// PlaylistType - The type of the playlist.
type PlaylistType string

const (
	PlaylistTypeAudio PlaylistType = "audio"
	PlaylistTypeVideo PlaylistType = "video"
	PlaylistTypePhoto PlaylistType = "photo"
)

func (e PlaylistType) ToPointer() *PlaylistType {
	return &e
}
func (e *PlaylistType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "audio":
		fallthrough
	case "video":
		fallthrough
	case "photo":
		*e = PlaylistType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for PlaylistType: %v", v)
	}
}

type MediaContainerWithPlaylistMetadataGuids struct {
	// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
	//
	ID string `json:"id"`
}

func (m *MediaContainerWithPlaylistMetadataGuids) GetID() string {
	if m == nil {
		return ""
	}
	return m.ID
}

// MediaContainerWithPlaylistMetadataMetadata - Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a "media item" will have one or more "media parts" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.
//
// Note that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.
//
// Metadata items can often live in a hierarchy with relationships between them.  For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item.  A similar hierarchy exists with track, album, and artist and photos and photo album.  The relationships may be expressed via relative terms and absolute terms.  For example, "leaves" refer to metadata items which has associated media (there is no media for a season nor show).  A show will have "children" in the form of seasons and a season will have "children" in the form of episodes and episodes have "parent" in the form of a season which has a "parent" in the form of a show.  Similarly, a show has "grandchildren" in the form of episodse and an episode has a "grandparent" in the form of a show.
type MediaContainerWithPlaylistMetadataMetadata struct {
	// If we return this as true then this playlist cannot be altered or deleted directly by the client.
	ReadOnly *bool `json:"readOnly,omitempty"`
	// When present, the URL for a composite image for descendent items (e.g. photo albums or playlists).
	Composite *string `json:"composite,omitempty"`
	// When present, the duration for the item, in units of milliseconds.
	Duration *int `json:"duration,omitempty"`
	// The key at which the item's details can be fetched.  In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details.
	Key string `json:"key"`
	// For shows and seasons, contains the number of total episodes.
	LeafCount *int `json:"leafCount,omitempty"`
	// The type of the playlist.
	PlaylistType *PlaylistType `json:"playlistType,omitempty"`
	// Whether or not the playlist is smart.
	Smart *bool `json:"smart,omitempty"`
	// If this is a special playlist, this returns its type (e.g. favorites).
	SpecialPlaylistType *string `json:"specialPlaylistType,omitempty"`
	// The title of the item (e.g. “300” or “The Simpsons”)
	Title string `json:"title"`
	// The type of the video item, such as `movie`, `episode`, or `clip`.
	Type string `json:"type"`
	// When present, contains the disc number for a track on multi-disc albums.
	AbsoluteIndex *int `json:"absoluteIndex,omitempty"`
	// In units of seconds since the epoch, returns the time at which the item was added to the library.
	AddedAt int64 `json:"addedAt"`
	// When present, the URL for the background artwork for the item.
	Art *string `json:"art,omitempty"`
	// Some rating systems separate reviewer ratings from audience ratings
	AudienceRating *float32 `json:"audienceRating,omitempty"`
	// A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled).
	AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
	Autotag             []Tag   `json:"Autotag,omitempty"`
	// When present, the URL for a banner graphic for the item.
	Banner *string `json:"banner,omitempty"`
	// When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two).
	ChapterSource *string `json:"chapterSource,omitempty"`
	// The number of child items associated with this media item.
	ChildCount *int `json:"childCount,omitempty"`
	// If known, the content rating (e.g. MPAA) for an item.
	ContentRating *string `json:"contentRating,omitempty"`
	Country       []Tag   `json:"Country,omitempty"`
	Director      []Tag   `json:"Director,omitempty"`
	// Typically only seen in metadata at a library's top level
	Filter []Filter `json:"Filter,omitempty"`
	Genre  []Tag    `json:"Genre,omitempty"`
	// The `art` of the grandparent
	GrandparentArt *string `json:"grandparentArt,omitempty"`
	// The GUID of the grandparent media item.
	GrandparentGUID *string `json:"grandparentGuid,omitempty"`
	// The `hero` of the grandparent
	GrandparentHero *string `json:"grandparentHero,omitempty"`
	// The `key` of the grandparent
	GrandparentKey *string `json:"grandparentKey,omitempty"`
	// The `ratingKey` of the grandparent
	GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
	// The `theme` of the grandparent
	GrandparentTheme *string `json:"grandparentTheme,omitempty"`
	// The `thumb` of the grandparent
	GrandparentThumb *string `json:"grandparentThumb,omitempty"`
	// The `title` of the grandparent
	GrandparentTitle *string `json:"grandparentTitle,omitempty"`
	// The globally unique identifier for the media item.
	GUID  *string                                   `json:"guid,omitempty"`
	Guids []MediaContainerWithPlaylistMetadataGuids `json:"Guid,omitempty"`
	// When present, the URL for a hero image for the item.
	Hero  *string `json:"hero,omitempty"`
	Image []Image `json:"Image,omitempty"`
	// When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks.
	Index        *int    `json:"index,omitempty"`
	LastViewedAt *int64  `json:"lastViewedAt,omitempty"`
	Media        []Media `json:"Media,omitempty"`
	// When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well.
	OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
	// When present, used to indicate an item's original title, e.g. a movie's foreign title.
	OriginalTitle *string `json:"originalTitle,omitempty"`
	// The GUID of the parent media item.
	ParentGUID *string `json:"parentGuid,omitempty"`
	// The `hero` of the parent
	ParentHero *string `json:"parentHero,omitempty"`
	// The `index` of the parent
	ParentIndex *int `json:"parentIndex,omitempty"`
	// The `key` of the parent
	ParentKey *string `json:"parentKey,omitempty"`
	// The `ratingKey` of the parent
	ParentRatingKey *string `json:"parentRatingKey,omitempty"`
	// The `thumb` of the parent
	ParentThumb *string `json:"parentThumb,omitempty"`
	// The `title` of the parent
	ParentTitle *string `json:"parentTitle,omitempty"`
	// Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item.
	PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
	// Prompt to give the user for this directory (such as `Search Movies`)
	Prompt *string `json:"prompt,omitempty"`
	// When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from.
	Rating      *float32 `json:"rating,omitempty"`
	RatingArray []Tag    `json:"Rating,omitempty"`
	// Number of ratings under this metadata
	RatingCount *int `json:"ratingCount,omitempty"`
	// When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten.
	RatingImage *string `json:"ratingImage,omitempty"`
	// This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them.  While it often appears to be numeric, this is not guaranteed.
	RatingKey *string `json:"ratingKey,omitempty"`
	Role      []Tag   `json:"Role,omitempty"`
	// Indicates this is a search directory
	Search *bool `json:"search,omitempty"`
	// Used by old clients to provide nested menus allowing for primative (but structured) navigation.
	Secondary *bool `json:"secondary,omitempty"`
	// When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc.
	SkipChildren *bool `json:"skipChildren,omitempty"`
	// When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show).
	SkipParent *bool `json:"skipParent,omitempty"`
	// Typically only seen in metadata at a library's top level
	Sort []Sort `json:"Sort,omitempty"`
	// When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums).
	Studio *string `json:"studio,omitempty"`
	// The subtype of the video item, such as `photo` when the video item is in a photo library
	Subtype *string `json:"subtype,omitempty"`
	// When present, the extended textual information about the item (e.g. movie plot, artist biography, album review).
	Summary *string `json:"summary,omitempty"`
	// When present, a pithy one-liner about the item (usually only seen for movies).
	Tagline *string `json:"tagline,omitempty"`
	// When present, the URL for theme music for the item (usually only for TV shows).
	Theme *string `json:"theme,omitempty"`
	// When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail.
	Thumb *string `json:"thumb,omitempty"`
	// Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”).
	TitleSort *string `json:"titleSort,omitempty"`
	// In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated).
	UpdatedAt *int64 `json:"updatedAt,omitempty"`
	// When the user has rated an item, this contains the user rating
	UserRating *float32 `json:"userRating,omitempty"`
	// When a users has completed watched or listened to an item, this attribute contains the number of consumptions.
	ViewCount *int `json:"viewCount,omitempty"`
	// For shows and seasons, contains the number of viewed episodes.
	ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
	// When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds.
	ViewOffset *int  `json:"viewOffset,omitempty"`
	Writer     []Tag `json:"Writer,omitempty"`
	// When present, the year associated with the item's release (e.g. release year for a movie).
	Year                 *int           `json:"year,omitempty"`
	AdditionalProperties map[string]any `additionalProperties:"true" json:"-"`
}

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

func (m *MediaContainerWithPlaylistMetadataMetadata) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &m, "", false, []string{"key", "title", "type", "addedAt"}); err != nil {
		return err
	}
	return nil
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetReadOnly() *bool {
	if m == nil {
		return nil
	}
	return m.ReadOnly
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetComposite() *string {
	if m == nil {
		return nil
	}
	return m.Composite
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetDuration() *int {
	if m == nil {
		return nil
	}
	return m.Duration
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetKey() string {
	if m == nil {
		return ""
	}
	return m.Key
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetLeafCount() *int {
	if m == nil {
		return nil
	}
	return m.LeafCount
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetPlaylistType() *PlaylistType {
	if m == nil {
		return nil
	}
	return m.PlaylistType
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSmart() *bool {
	if m == nil {
		return nil
	}
	return m.Smart
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSpecialPlaylistType() *string {
	if m == nil {
		return nil
	}
	return m.SpecialPlaylistType
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetTitle() string {
	if m == nil {
		return ""
	}
	return m.Title
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetType() string {
	if m == nil {
		return ""
	}
	return m.Type
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetAbsoluteIndex() *int {
	if m == nil {
		return nil
	}
	return m.AbsoluteIndex
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetAddedAt() int64 {
	if m == nil {
		return 0
	}
	return m.AddedAt
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetArt() *string {
	if m == nil {
		return nil
	}
	return m.Art
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetAudienceRating() *float32 {
	if m == nil {
		return nil
	}
	return m.AudienceRating
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetAudienceRatingImage() *string {
	if m == nil {
		return nil
	}
	return m.AudienceRatingImage
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetAutotag() []Tag {
	if m == nil {
		return nil
	}
	return m.Autotag
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetBanner() *string {
	if m == nil {
		return nil
	}
	return m.Banner
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetChapterSource() *string {
	if m == nil {
		return nil
	}
	return m.ChapterSource
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetChildCount() *int {
	if m == nil {
		return nil
	}
	return m.ChildCount
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetContentRating() *string {
	if m == nil {
		return nil
	}
	return m.ContentRating
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetCountry() []Tag {
	if m == nil {
		return nil
	}
	return m.Country
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetDirector() []Tag {
	if m == nil {
		return nil
	}
	return m.Director
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetFilter() []Filter {
	if m == nil {
		return nil
	}
	return m.Filter
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGenre() []Tag {
	if m == nil {
		return nil
	}
	return m.Genre
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentArt() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentArt
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentGUID() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentGUID
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentHero() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentHero
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentKey() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentKey
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentRatingKey() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentRatingKey
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentTheme() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentTheme
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentThumb() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentThumb
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGrandparentTitle() *string {
	if m == nil {
		return nil
	}
	return m.GrandparentTitle
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGUID() *string {
	if m == nil {
		return nil
	}
	return m.GUID
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetGuids() []MediaContainerWithPlaylistMetadataGuids {
	if m == nil {
		return nil
	}
	return m.Guids
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetHero() *string {
	if m == nil {
		return nil
	}
	return m.Hero
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetImage() []Image {
	if m == nil {
		return nil
	}
	return m.Image
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetIndex() *int {
	if m == nil {
		return nil
	}
	return m.Index
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetLastViewedAt() *int64 {
	if m == nil {
		return nil
	}
	return m.LastViewedAt
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetMedia() []Media {
	if m == nil {
		return nil
	}
	return m.Media
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetOriginallyAvailableAt() *types.Date {
	if m == nil {
		return nil
	}
	return m.OriginallyAvailableAt
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetOriginalTitle() *string {
	if m == nil {
		return nil
	}
	return m.OriginalTitle
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentGUID() *string {
	if m == nil {
		return nil
	}
	return m.ParentGUID
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentHero() *string {
	if m == nil {
		return nil
	}
	return m.ParentHero
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentIndex() *int {
	if m == nil {
		return nil
	}
	return m.ParentIndex
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentKey() *string {
	if m == nil {
		return nil
	}
	return m.ParentKey
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentRatingKey() *string {
	if m == nil {
		return nil
	}
	return m.ParentRatingKey
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentThumb() *string {
	if m == nil {
		return nil
	}
	return m.ParentThumb
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetParentTitle() *string {
	if m == nil {
		return nil
	}
	return m.ParentTitle
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetPrimaryExtraKey() *string {
	if m == nil {
		return nil
	}
	return m.PrimaryExtraKey
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetPrompt() *string {
	if m == nil {
		return nil
	}
	return m.Prompt
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetRating() *float32 {
	if m == nil {
		return nil
	}
	return m.Rating
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingArray() []Tag {
	if m == nil {
		return nil
	}
	return m.RatingArray
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingCount() *int {
	if m == nil {
		return nil
	}
	return m.RatingCount
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingImage() *string {
	if m == nil {
		return nil
	}
	return m.RatingImage
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetRatingKey() *string {
	if m == nil {
		return nil
	}
	return m.RatingKey
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetRole() []Tag {
	if m == nil {
		return nil
	}
	return m.Role
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSearch() *bool {
	if m == nil {
		return nil
	}
	return m.Search
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSecondary() *bool {
	if m == nil {
		return nil
	}
	return m.Secondary
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSkipChildren() *bool {
	if m == nil {
		return nil
	}
	return m.SkipChildren
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSkipParent() *bool {
	if m == nil {
		return nil
	}
	return m.SkipParent
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSort() []Sort {
	if m == nil {
		return nil
	}
	return m.Sort
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetStudio() *string {
	if m == nil {
		return nil
	}
	return m.Studio
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSubtype() *string {
	if m == nil {
		return nil
	}
	return m.Subtype
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetSummary() *string {
	if m == nil {
		return nil
	}
	return m.Summary
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetTagline() *string {
	if m == nil {
		return nil
	}
	return m.Tagline
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetTheme() *string {
	if m == nil {
		return nil
	}
	return m.Theme
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetThumb() *string {
	if m == nil {
		return nil
	}
	return m.Thumb
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetTitleSort() *string {
	if m == nil {
		return nil
	}
	return m.TitleSort
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetUpdatedAt() *int64 {
	if m == nil {
		return nil
	}
	return m.UpdatedAt
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetUserRating() *float32 {
	if m == nil {
		return nil
	}
	return m.UserRating
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetViewCount() *int {
	if m == nil {
		return nil
	}
	return m.ViewCount
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetViewedLeafCount() *int {
	if m == nil {
		return nil
	}
	return m.ViewedLeafCount
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetViewOffset() *int {
	if m == nil {
		return nil
	}
	return m.ViewOffset
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetWriter() []Tag {
	if m == nil {
		return nil
	}
	return m.Writer
}

func (m *MediaContainerWithPlaylistMetadataMetadata) GetYear() *int {
	if m == nil {
		return nil
	}
	return m.Year
}

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

// MediaContainerWithPlaylistMetadataMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type MediaContainerWithPlaylistMetadataMediaContainer struct {
	Identifier *string `json:"identifier,omitempty"`
	// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
	//
	Offset *int64 `json:"offset,omitempty"`
	Size   *int64 `json:"size,omitempty"`
	// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
	//
	TotalSize *int64                                       `json:"totalSize,omitempty"`
	Metadata  []MediaContainerWithPlaylistMetadataMetadata `json:"Metadata,omitempty"`
}

func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetIdentifier() *string {
	if m == nil {
		return nil
	}
	return m.Identifier
}

func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetOffset() *int64 {
	if m == nil {
		return nil
	}
	return m.Offset
}

func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetSize() *int64 {
	if m == nil {
		return nil
	}
	return m.Size
}

func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetTotalSize() *int64 {
	if m == nil {
		return nil
	}
	return m.TotalSize
}

func (m *MediaContainerWithPlaylistMetadataMediaContainer) GetMetadata() []MediaContainerWithPlaylistMetadataMetadata {
	if m == nil {
		return nil
	}
	return m.Metadata
}

type MediaContainerWithPlaylistMetadata struct {
	MediaContainer *MediaContainerWithPlaylistMetadataMediaContainer `json:"MediaContainer,omitempty"`
}

func (m *MediaContainerWithPlaylistMetadata) GetMediaContainer() *MediaContainerWithPlaylistMetadataMediaContainer {
	if m == nil {
		return nil
	}
	return m.MediaContainer
}
