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

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

func (r *RemoveDeviceFromDVRGlobals) GetAccepts() *components.Accepts {
	if r == nil {
		return nil
	}
	return r.Accepts
}

func (r *RemoveDeviceFromDVRGlobals) GetClientIdentifier() *string {
	if r == nil {
		return nil
	}
	return r.ClientIdentifier
}

func (r *RemoveDeviceFromDVRGlobals) GetProduct() *string {
	if r == nil {
		return nil
	}
	return r.Product
}

func (r *RemoveDeviceFromDVRGlobals) GetVersion() *string {
	if r == nil {
		return nil
	}
	return r.Version
}

func (r *RemoveDeviceFromDVRGlobals) GetPlatform() *string {
	if r == nil {
		return nil
	}
	return r.Platform
}

func (r *RemoveDeviceFromDVRGlobals) GetPlatformVersion() *string {
	if r == nil {
		return nil
	}
	return r.PlatformVersion
}

func (r *RemoveDeviceFromDVRGlobals) GetDevice() *string {
	if r == nil {
		return nil
	}
	return r.Device
}

func (r *RemoveDeviceFromDVRGlobals) GetModel() *string {
	if r == nil {
		return nil
	}
	return r.Model
}

func (r *RemoveDeviceFromDVRGlobals) GetDeviceVendor() *string {
	if r == nil {
		return nil
	}
	return r.DeviceVendor
}

func (r *RemoveDeviceFromDVRGlobals) GetDeviceName() *string {
	if r == nil {
		return nil
	}
	return r.DeviceName
}

func (r *RemoveDeviceFromDVRGlobals) GetMarketplace() *string {
	if r == nil {
		return nil
	}
	return r.Marketplace
}

type RemoveDeviceFromDVRRequest 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"`
	// The ID of the device to add.
	DeviceID int64 `pathParam:"style=simple,explode=false,name=deviceId"`
}

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

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

func (r *RemoveDeviceFromDVRRequest) GetAccepts() *components.Accepts {
	if r == nil {
		return nil
	}
	return r.Accepts
}

func (r *RemoveDeviceFromDVRRequest) GetClientIdentifier() *string {
	if r == nil {
		return nil
	}
	return r.ClientIdentifier
}

func (r *RemoveDeviceFromDVRRequest) GetProduct() *string {
	if r == nil {
		return nil
	}
	return r.Product
}

func (r *RemoveDeviceFromDVRRequest) GetVersion() *string {
	if r == nil {
		return nil
	}
	return r.Version
}

func (r *RemoveDeviceFromDVRRequest) GetPlatform() *string {
	if r == nil {
		return nil
	}
	return r.Platform
}

func (r *RemoveDeviceFromDVRRequest) GetPlatformVersion() *string {
	if r == nil {
		return nil
	}
	return r.PlatformVersion
}

func (r *RemoveDeviceFromDVRRequest) GetDevice() *string {
	if r == nil {
		return nil
	}
	return r.Device
}

func (r *RemoveDeviceFromDVRRequest) GetModel() *string {
	if r == nil {
		return nil
	}
	return r.Model
}

func (r *RemoveDeviceFromDVRRequest) GetDeviceVendor() *string {
	if r == nil {
		return nil
	}
	return r.DeviceVendor
}

func (r *RemoveDeviceFromDVRRequest) GetDeviceName() *string {
	if r == nil {
		return nil
	}
	return r.DeviceName
}

func (r *RemoveDeviceFromDVRRequest) GetMarketplace() *string {
	if r == nil {
		return nil
	}
	return r.Marketplace
}

func (r *RemoveDeviceFromDVRRequest) GetDvrID() int64 {
	if r == nil {
		return 0
	}
	return r.DvrID
}

func (r *RemoveDeviceFromDVRRequest) GetDeviceID() int64 {
	if r == nil {
		return 0
	}
	return r.DeviceID
}

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

func (r *RemoveDeviceFromDVRDVRsMediaContainer) GetOffset() *int64 {
	if r == nil {
		return nil
	}
	return r.Offset
}

func (r *RemoveDeviceFromDVRDVRsMediaContainer) GetSize() *int64 {
	if r == nil {
		return nil
	}
	return r.Size
}

func (r *RemoveDeviceFromDVRDVRsMediaContainer) GetTotalSize() *int64 {
	if r == nil {
		return nil
	}
	return r.TotalSize
}

func (r *RemoveDeviceFromDVRDVRsMediaContainer) GetStatus() *int64 {
	if r == nil {
		return nil
	}
	return r.Status
}

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

func (r *RemoveDeviceFromDVRDVR) GetKey() *string {
	if r == nil {
		return nil
	}
	return r.Key
}

func (r *RemoveDeviceFromDVRDVR) GetLanguage() *string {
	if r == nil {
		return nil
	}
	return r.Language
}

func (r *RemoveDeviceFromDVRDVR) GetLineup() *string {
	if r == nil {
		return nil
	}
	return r.Lineup
}

func (r *RemoveDeviceFromDVRDVR) GetUUID() *string {
	if r == nil {
		return nil
	}
	return r.UUID
}

type RemoveDeviceFromDVRMediaContainer struct {
	MediaContainer *RemoveDeviceFromDVRDVRsMediaContainer `json:"MediaContainer,omitempty"`
	Dvr            []RemoveDeviceFromDVRDVR               `json:"DVR,omitempty"`
}

func (r *RemoveDeviceFromDVRMediaContainer) GetMediaContainer() *RemoveDeviceFromDVRDVRsMediaContainer {
	if r == nil {
		return nil
	}
	return r.MediaContainer
}

func (r *RemoveDeviceFromDVRMediaContainer) GetDvr() []RemoveDeviceFromDVRDVR {
	if r == nil {
		return nil
	}
	return r.Dvr
}

// RemoveDeviceFromDVRResponseBody - OK
type RemoveDeviceFromDVRResponseBody struct {
	MediaContainer *RemoveDeviceFromDVRMediaContainer `json:"MediaContainer,omitempty"`
}

func (r *RemoveDeviceFromDVRResponseBody) GetMediaContainer() *RemoveDeviceFromDVRMediaContainer {
	if r == nil {
		return nil
	}
	return r.MediaContainer
}

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

func (r *RemoveDeviceFromDVRResponse) GetContentType() string {
	if r == nil {
		return ""
	}
	return r.ContentType
}

func (r *RemoveDeviceFromDVRResponse) GetStatusCode() int {
	if r == nil {
		return 0
	}
	return r.StatusCode
}

func (r *RemoveDeviceFromDVRResponse) GetRawResponse() *http.Response {
	if r == nil {
		return nil
	}
	return r.RawResponse
}

func (r *RemoveDeviceFromDVRResponse) GetObject() *RemoveDeviceFromDVRResponseBody {
	if r == nil {
		return nil
	}
	return r.Object
}

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