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

package operations

import (
	"github.com/LukeHagar/plexgo/internal/utils"
	"github.com/LukeHagar/plexgo/models/components"
	"net/http"
)

type ListContentGlobals struct {
	// Indicates the client accepts the indicated media types
	Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
	// An opaque identifier unique to the client
	ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
	// The name of the client product
	Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
	// The version of the client application
	Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
	// The platform of the client
	Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
	// The version of the platform
	PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
	// A relatively friendly name for the client device
	Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
	// A potentially less friendly identifier for the device model
	Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
	// The device vendor
	DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
	// A friendly name for the client
	DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
	// The marketplace on which the client application is distributed
	Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}

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

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

func (l *ListContentGlobals) GetAccepts() *components.Accepts {
	if l == nil {
		return nil
	}
	return l.Accepts
}

func (l *ListContentGlobals) GetClientIdentifier() *string {
	if l == nil {
		return nil
	}
	return l.ClientIdentifier
}

func (l *ListContentGlobals) GetProduct() *string {
	if l == nil {
		return nil
	}
	return l.Product
}

func (l *ListContentGlobals) GetVersion() *string {
	if l == nil {
		return nil
	}
	return l.Version
}

func (l *ListContentGlobals) GetPlatform() *string {
	if l == nil {
		return nil
	}
	return l.Platform
}

func (l *ListContentGlobals) GetPlatformVersion() *string {
	if l == nil {
		return nil
	}
	return l.PlatformVersion
}

func (l *ListContentGlobals) GetDevice() *string {
	if l == nil {
		return nil
	}
	return l.Device
}

func (l *ListContentGlobals) GetModel() *string {
	if l == nil {
		return nil
	}
	return l.Model
}

func (l *ListContentGlobals) GetDeviceVendor() *string {
	if l == nil {
		return nil
	}
	return l.DeviceVendor
}

func (l *ListContentGlobals) GetDeviceName() *string {
	if l == nil {
		return nil
	}
	return l.DeviceName
}

func (l *ListContentGlobals) GetMarketplace() *string {
	if l == nil {
		return nil
	}
	return l.Marketplace
}

type ListContentRequest struct {
	// Indicates the client accepts the indicated media types
	Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
	// An opaque identifier unique to the client
	ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
	// The name of the client product
	Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
	// The version of the client application
	Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
	// The platform of the client
	Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
	// The version of the platform
	PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
	// A relatively friendly name for the client device
	Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
	// A potentially less friendly identifier for the device model
	Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
	// The device vendor
	DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
	// A friendly name for the client
	DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
	// The marketplace on which the client application is distributed
	Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
	// The index of the first item to return. If not specified, the first item will be returned.
	// If the number of items exceeds the limit, the response will be paginated.
	// By default this is 0
	//
	XPlexContainerStart *int `default:"0" queryParam:"style=form,explode=true,name=X-Plex-Container-Start"`
	// The number of items to return. If not specified, all items will be returned.
	// If the number of items exceeds the limit, the response will be paginated.
	// By default this is 50
	//
	XPlexContainerSize *int `default:"50" queryParam:"style=form,explode=true,name=X-Plex-Container-Size"`
	// A querystring-based filtering language used to select subsets of media. Can be provided as an object with typed properties for type safety, or as a string for complex queries with operators and boolean logic.
	//
	// The query supports:
	// - Fields: integer, boolean, tag, string, date, language
	// - Operators: =, !=, ==, !==, <=, >=, >>=, <<= (varies by field type)
	// - Boolean operators: & (AND), , (OR), push/pop (parentheses), or=1 (explicit OR)
	// - Sorting: sort parameter with :desc, :nullsLast modifiers
	// - Grouping: group parameter
	// - Limits: limit parameter
	//
	// Examples:
	// - Object format: `{type: 4, sourceType: 2, title: "24"}` → `type=4&sourceType=2&title=24`
	// - String format: `type=4&sourceType=2&title==24` - type = 4 AND sourceType = 2 AND title = "24"
	// - Complex: `push=1&index=1&or=1&rating=2&pop=1&duration=10` - (index = 1 OR rating = 2) AND duration = 10
	//
	// See [API Info section](#section/API-Info/Media-Queries) for detailed information on building media queries.
	//
	MediaQuery *components.MediaQuery `queryParam:"style=form,explode=true,name=mediaQuery"`
	// Adds the Meta object to the response
	//
	IncludeMeta *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=includeMeta"`
	// Adds the Guid object to the response
	//
	IncludeGuids *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=includeGuids"`
	// The id of the section
	SectionID string `pathParam:"style=simple,explode=false,name=sectionId"`
}

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

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

func (l *ListContentRequest) GetAccepts() *components.Accepts {
	if l == nil {
		return nil
	}
	return l.Accepts
}

func (l *ListContentRequest) GetClientIdentifier() *string {
	if l == nil {
		return nil
	}
	return l.ClientIdentifier
}

func (l *ListContentRequest) GetProduct() *string {
	if l == nil {
		return nil
	}
	return l.Product
}

func (l *ListContentRequest) GetVersion() *string {
	if l == nil {
		return nil
	}
	return l.Version
}

func (l *ListContentRequest) GetPlatform() *string {
	if l == nil {
		return nil
	}
	return l.Platform
}

func (l *ListContentRequest) GetPlatformVersion() *string {
	if l == nil {
		return nil
	}
	return l.PlatformVersion
}

func (l *ListContentRequest) GetDevice() *string {
	if l == nil {
		return nil
	}
	return l.Device
}

func (l *ListContentRequest) GetModel() *string {
	if l == nil {
		return nil
	}
	return l.Model
}

func (l *ListContentRequest) GetDeviceVendor() *string {
	if l == nil {
		return nil
	}
	return l.DeviceVendor
}

func (l *ListContentRequest) GetDeviceName() *string {
	if l == nil {
		return nil
	}
	return l.DeviceName
}

func (l *ListContentRequest) GetMarketplace() *string {
	if l == nil {
		return nil
	}
	return l.Marketplace
}

func (l *ListContentRequest) GetXPlexContainerStart() *int {
	if l == nil {
		return nil
	}
	return l.XPlexContainerStart
}

func (l *ListContentRequest) GetXPlexContainerSize() *int {
	if l == nil {
		return nil
	}
	return l.XPlexContainerSize
}

func (l *ListContentRequest) GetMediaQuery() *components.MediaQuery {
	if l == nil {
		return nil
	}
	return l.MediaQuery
}

func (l *ListContentRequest) GetIncludeMeta() *components.BoolInt {
	if l == nil {
		return nil
	}
	return l.IncludeMeta
}

func (l *ListContentRequest) GetIncludeGuids() *components.BoolInt {
	if l == nil {
		return nil
	}
	return l.IncludeGuids
}

func (l *ListContentRequest) GetSectionID() string {
	if l == nil {
		return ""
	}
	return l.SectionID
}

type ListContentResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
	// OK
	MediaContainerWithMetadata *components.MediaContainerWithMetadata
	Headers                    map[string][]string
}

func (l *ListContentResponse) GetContentType() string {
	if l == nil {
		return ""
	}
	return l.ContentType
}

func (l *ListContentResponse) GetStatusCode() int {
	if l == nil {
		return 0
	}
	return l.StatusCode
}

func (l *ListContentResponse) GetRawResponse() *http.Response {
	if l == nil {
		return nil
	}
	return l.RawResponse
}

func (l *ListContentResponse) GetMediaContainerWithMetadata() *components.MediaContainerWithMetadata {
	if l == nil {
		return nil
	}
	return l.MediaContainerWithMetadata
}

func (l *ListContentResponse) GetHeaders() map[string][]string {
	if l == nil {
		return map[string][]string{}
	}
	return l.Headers
}
