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

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

func (g *GetDVRGlobals) GetAccepts() *components.Accepts {
	if g == nil {
		return nil
	}
	return g.Accepts
}

func (g *GetDVRGlobals) GetClientIdentifier() *string {
	if g == nil {
		return nil
	}
	return g.ClientIdentifier
}

func (g *GetDVRGlobals) GetProduct() *string {
	if g == nil {
		return nil
	}
	return g.Product
}

func (g *GetDVRGlobals) GetVersion() *string {
	if g == nil {
		return nil
	}
	return g.Version
}

func (g *GetDVRGlobals) GetPlatform() *string {
	if g == nil {
		return nil
	}
	return g.Platform
}

func (g *GetDVRGlobals) GetPlatformVersion() *string {
	if g == nil {
		return nil
	}
	return g.PlatformVersion
}

func (g *GetDVRGlobals) GetDevice() *string {
	if g == nil {
		return nil
	}
	return g.Device
}

func (g *GetDVRGlobals) GetModel() *string {
	if g == nil {
		return nil
	}
	return g.Model
}

func (g *GetDVRGlobals) GetDeviceVendor() *string {
	if g == nil {
		return nil
	}
	return g.DeviceVendor
}

func (g *GetDVRGlobals) GetDeviceName() *string {
	if g == nil {
		return nil
	}
	return g.DeviceName
}

func (g *GetDVRGlobals) GetMarketplace() *string {
	if g == nil {
		return nil
	}
	return g.Marketplace
}

type GetDVRRequest 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"`
}

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

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

func (g *GetDVRRequest) GetAccepts() *components.Accepts {
	if g == nil {
		return nil
	}
	return g.Accepts
}

func (g *GetDVRRequest) GetClientIdentifier() *string {
	if g == nil {
		return nil
	}
	return g.ClientIdentifier
}

func (g *GetDVRRequest) GetProduct() *string {
	if g == nil {
		return nil
	}
	return g.Product
}

func (g *GetDVRRequest) GetVersion() *string {
	if g == nil {
		return nil
	}
	return g.Version
}

func (g *GetDVRRequest) GetPlatform() *string {
	if g == nil {
		return nil
	}
	return g.Platform
}

func (g *GetDVRRequest) GetPlatformVersion() *string {
	if g == nil {
		return nil
	}
	return g.PlatformVersion
}

func (g *GetDVRRequest) GetDevice() *string {
	if g == nil {
		return nil
	}
	return g.Device
}

func (g *GetDVRRequest) GetModel() *string {
	if g == nil {
		return nil
	}
	return g.Model
}

func (g *GetDVRRequest) GetDeviceVendor() *string {
	if g == nil {
		return nil
	}
	return g.DeviceVendor
}

func (g *GetDVRRequest) GetDeviceName() *string {
	if g == nil {
		return nil
	}
	return g.DeviceName
}

func (g *GetDVRRequest) GetMarketplace() *string {
	if g == nil {
		return nil
	}
	return g.Marketplace
}

func (g *GetDVRRequest) GetDvrID() int64 {
	if g == nil {
		return 0
	}
	return g.DvrID
}

// GetDVRDVRsMediaContainer - `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 GetDVRDVRsMediaContainer 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 (g *GetDVRDVRsMediaContainer) GetIdentifier() *string {
	if g == nil {
		return nil
	}
	return g.Identifier
}

func (g *GetDVRDVRsMediaContainer) GetOffset() *int64 {
	if g == nil {
		return nil
	}
	return g.Offset
}

func (g *GetDVRDVRsMediaContainer) GetSize() *int64 {
	if g == nil {
		return nil
	}
	return g.Size
}

func (g *GetDVRDVRsMediaContainer) GetTotalSize() *int64 {
	if g == nil {
		return nil
	}
	return g.TotalSize
}

func (g *GetDVRDVRsMediaContainer) GetStatus() *int64 {
	if g == nil {
		return nil
	}
	return g.Status
}

type GetDVRDVR 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 (g *GetDVRDVR) GetDevice() []components.Device {
	if g == nil {
		return nil
	}
	return g.Device
}

func (g *GetDVRDVR) GetKey() *string {
	if g == nil {
		return nil
	}
	return g.Key
}

func (g *GetDVRDVR) GetLanguage() *string {
	if g == nil {
		return nil
	}
	return g.Language
}

func (g *GetDVRDVR) GetLineup() *string {
	if g == nil {
		return nil
	}
	return g.Lineup
}

func (g *GetDVRDVR) GetUUID() *string {
	if g == nil {
		return nil
	}
	return g.UUID
}

type GetDVRMediaContainer struct {
	MediaContainer *GetDVRDVRsMediaContainer `json:"MediaContainer,omitempty"`
	Dvr            []GetDVRDVR               `json:"DVR,omitempty"`
}

func (g *GetDVRMediaContainer) GetMediaContainer() *GetDVRDVRsMediaContainer {
	if g == nil {
		return nil
	}
	return g.MediaContainer
}

func (g *GetDVRMediaContainer) GetDvr() []GetDVRDVR {
	if g == nil {
		return nil
	}
	return g.Dvr
}

// GetDVRResponseBody - OK
type GetDVRResponseBody struct {
	MediaContainer *GetDVRMediaContainer `json:"MediaContainer,omitempty"`
}

func (g *GetDVRResponseBody) GetMediaContainer() *GetDVRMediaContainer {
	if g == nil {
		return nil
	}
	return g.MediaContainer
}

type GetDVRResponse 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  *GetDVRResponseBody
	Headers map[string][]string
}

func (g *GetDVRResponse) GetContentType() string {
	if g == nil {
		return ""
	}
	return g.ContentType
}

func (g *GetDVRResponse) GetStatusCode() int {
	if g == nil {
		return 0
	}
	return g.StatusCode
}

func (g *GetDVRResponse) GetRawResponse() *http.Response {
	if g == nil {
		return nil
	}
	return g.RawResponse
}

func (g *GetDVRResponse) GetObject() *GetDVRResponseBody {
	if g == nil {
		return nil
	}
	return g.Object
}

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