// 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 SetDVRPreferencesGlobals 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 (s SetDVRPreferencesGlobals) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

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

func (s *SetDVRPreferencesGlobals) GetAccepts() *components.Accepts {
	if s == nil {
		return nil
	}
	return s.Accepts
}

func (s *SetDVRPreferencesGlobals) GetClientIdentifier() *string {
	if s == nil {
		return nil
	}
	return s.ClientIdentifier
}

func (s *SetDVRPreferencesGlobals) GetProduct() *string {
	if s == nil {
		return nil
	}
	return s.Product
}

func (s *SetDVRPreferencesGlobals) GetVersion() *string {
	if s == nil {
		return nil
	}
	return s.Version
}

func (s *SetDVRPreferencesGlobals) GetPlatform() *string {
	if s == nil {
		return nil
	}
	return s.Platform
}

func (s *SetDVRPreferencesGlobals) GetPlatformVersion() *string {
	if s == nil {
		return nil
	}
	return s.PlatformVersion
}

func (s *SetDVRPreferencesGlobals) GetDevice() *string {
	if s == nil {
		return nil
	}
	return s.Device
}

func (s *SetDVRPreferencesGlobals) GetModel() *string {
	if s == nil {
		return nil
	}
	return s.Model
}

func (s *SetDVRPreferencesGlobals) GetDeviceVendor() *string {
	if s == nil {
		return nil
	}
	return s.DeviceVendor
}

func (s *SetDVRPreferencesGlobals) GetDeviceName() *string {
	if s == nil {
		return nil
	}
	return s.DeviceName
}

func (s *SetDVRPreferencesGlobals) GetMarketplace() *string {
	if s == nil {
		return nil
	}
	return s.Marketplace
}

type SetDVRPreferencesRequest 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 ID of the DVR.
	DvrID int64 `pathParam:"style=simple,explode=false,name=dvrId"`
	// Set the `name` preference to the provided value
	Name *string `queryParam:"style=form,explode=true,name=name"`
}

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

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

func (s *SetDVRPreferencesRequest) GetAccepts() *components.Accepts {
	if s == nil {
		return nil
	}
	return s.Accepts
}

func (s *SetDVRPreferencesRequest) GetClientIdentifier() *string {
	if s == nil {
		return nil
	}
	return s.ClientIdentifier
}

func (s *SetDVRPreferencesRequest) GetProduct() *string {
	if s == nil {
		return nil
	}
	return s.Product
}

func (s *SetDVRPreferencesRequest) GetVersion() *string {
	if s == nil {
		return nil
	}
	return s.Version
}

func (s *SetDVRPreferencesRequest) GetPlatform() *string {
	if s == nil {
		return nil
	}
	return s.Platform
}

func (s *SetDVRPreferencesRequest) GetPlatformVersion() *string {
	if s == nil {
		return nil
	}
	return s.PlatformVersion
}

func (s *SetDVRPreferencesRequest) GetDevice() *string {
	if s == nil {
		return nil
	}
	return s.Device
}

func (s *SetDVRPreferencesRequest) GetModel() *string {
	if s == nil {
		return nil
	}
	return s.Model
}

func (s *SetDVRPreferencesRequest) GetDeviceVendor() *string {
	if s == nil {
		return nil
	}
	return s.DeviceVendor
}

func (s *SetDVRPreferencesRequest) GetDeviceName() *string {
	if s == nil {
		return nil
	}
	return s.DeviceName
}

func (s *SetDVRPreferencesRequest) GetMarketplace() *string {
	if s == nil {
		return nil
	}
	return s.Marketplace
}

func (s *SetDVRPreferencesRequest) GetDvrID() int64 {
	if s == nil {
		return 0
	}
	return s.DvrID
}

func (s *SetDVRPreferencesRequest) GetName() *string {
	if s == nil {
		return nil
	}
	return s.Name
}

// SetDVRPreferencesDVRsMediaContainer - `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 SetDVRPreferencesDVRsMediaContainer 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"`
	// A status indicator. If present and non-zero, indicates an error
	Status *int64 `json:"status,omitempty"`
}

func (s *SetDVRPreferencesDVRsMediaContainer) GetIdentifier() *string {
	if s == nil {
		return nil
	}
	return s.Identifier
}

func (s *SetDVRPreferencesDVRsMediaContainer) GetOffset() *int64 {
	if s == nil {
		return nil
	}
	return s.Offset
}

func (s *SetDVRPreferencesDVRsMediaContainer) GetSize() *int64 {
	if s == nil {
		return nil
	}
	return s.Size
}

func (s *SetDVRPreferencesDVRsMediaContainer) GetTotalSize() *int64 {
	if s == nil {
		return nil
	}
	return s.TotalSize
}

func (s *SetDVRPreferencesDVRsMediaContainer) GetStatus() *int64 {
	if s == nil {
		return nil
	}
	return s.Status
}

type SetDVRPreferencesDVR struct {
	Device   []components.Device `json:"Device,omitempty"`
	Key      *string             `json:"key,omitempty"`
	Language *string             `json:"language,omitempty"`
	Lineup   *string             `json:"lineup,omitempty"`
	UUID     *string             `json:"uuid,omitempty"`
}

func (s *SetDVRPreferencesDVR) GetDevice() []components.Device {
	if s == nil {
		return nil
	}
	return s.Device
}

func (s *SetDVRPreferencesDVR) GetKey() *string {
	if s == nil {
		return nil
	}
	return s.Key
}

func (s *SetDVRPreferencesDVR) GetLanguage() *string {
	if s == nil {
		return nil
	}
	return s.Language
}

func (s *SetDVRPreferencesDVR) GetLineup() *string {
	if s == nil {
		return nil
	}
	return s.Lineup
}

func (s *SetDVRPreferencesDVR) GetUUID() *string {
	if s == nil {
		return nil
	}
	return s.UUID
}

type SetDVRPreferencesMediaContainer struct {
	MediaContainer *SetDVRPreferencesDVRsMediaContainer `json:"MediaContainer,omitempty"`
	Dvr            []SetDVRPreferencesDVR               `json:"DVR,omitempty"`
}

func (s *SetDVRPreferencesMediaContainer) GetMediaContainer() *SetDVRPreferencesDVRsMediaContainer {
	if s == nil {
		return nil
	}
	return s.MediaContainer
}

func (s *SetDVRPreferencesMediaContainer) GetDvr() []SetDVRPreferencesDVR {
	if s == nil {
		return nil
	}
	return s.Dvr
}

// SetDVRPreferencesResponseBody - OK
type SetDVRPreferencesResponseBody struct {
	MediaContainer *SetDVRPreferencesMediaContainer `json:"MediaContainer,omitempty"`
}

func (s *SetDVRPreferencesResponseBody) GetMediaContainer() *SetDVRPreferencesMediaContainer {
	if s == nil {
		return nil
	}
	return s.MediaContainer
}

type SetDVRPreferencesResponse 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
	Object  *SetDVRPreferencesResponseBody
	Headers map[string][]string
}

func (s *SetDVRPreferencesResponse) GetContentType() string {
	if s == nil {
		return ""
	}
	return s.ContentType
}

func (s *SetDVRPreferencesResponse) GetStatusCode() int {
	if s == nil {
		return 0
	}
	return s.StatusCode
}

func (s *SetDVRPreferencesResponse) GetRawResponse() *http.Response {
	if s == nil {
		return nil
	}
	return s.RawResponse
}

func (s *SetDVRPreferencesResponse) GetObject() *SetDVRPreferencesResponseBody {
	if s == nil {
		return nil
	}
	return s.Object
}

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