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

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

func (t *TriggerFallbackGlobals) GetAccepts() *components.Accepts {
	if t == nil {
		return nil
	}
	return t.Accepts
}

func (t *TriggerFallbackGlobals) GetClientIdentifier() *string {
	if t == nil {
		return nil
	}
	return t.ClientIdentifier
}

func (t *TriggerFallbackGlobals) GetProduct() *string {
	if t == nil {
		return nil
	}
	return t.Product
}

func (t *TriggerFallbackGlobals) GetVersion() *string {
	if t == nil {
		return nil
	}
	return t.Version
}

func (t *TriggerFallbackGlobals) GetPlatform() *string {
	if t == nil {
		return nil
	}
	return t.Platform
}

func (t *TriggerFallbackGlobals) GetPlatformVersion() *string {
	if t == nil {
		return nil
	}
	return t.PlatformVersion
}

func (t *TriggerFallbackGlobals) GetDevice() *string {
	if t == nil {
		return nil
	}
	return t.Device
}

func (t *TriggerFallbackGlobals) GetModel() *string {
	if t == nil {
		return nil
	}
	return t.Model
}

func (t *TriggerFallbackGlobals) GetDeviceVendor() *string {
	if t == nil {
		return nil
	}
	return t.DeviceVendor
}

func (t *TriggerFallbackGlobals) GetDeviceName() *string {
	if t == nil {
		return nil
	}
	return t.DeviceName
}

func (t *TriggerFallbackGlobals) GetMarketplace() *string {
	if t == nil {
		return nil
	}
	return t.Marketplace
}

type TriggerFallbackRequest 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"`
	// Type of transcode media
	TranscodeType components.TranscodeType `pathParam:"style=simple,explode=false,name=transcodeType"`
	// Transcode session UUID
	TranscodeSessionID *string `queryParam:"style=form,explode=true,name=transcodeSessionId"`
}

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

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

func (t *TriggerFallbackRequest) GetAccepts() *components.Accepts {
	if t == nil {
		return nil
	}
	return t.Accepts
}

func (t *TriggerFallbackRequest) GetClientIdentifier() *string {
	if t == nil {
		return nil
	}
	return t.ClientIdentifier
}

func (t *TriggerFallbackRequest) GetProduct() *string {
	if t == nil {
		return nil
	}
	return t.Product
}

func (t *TriggerFallbackRequest) GetVersion() *string {
	if t == nil {
		return nil
	}
	return t.Version
}

func (t *TriggerFallbackRequest) GetPlatform() *string {
	if t == nil {
		return nil
	}
	return t.Platform
}

func (t *TriggerFallbackRequest) GetPlatformVersion() *string {
	if t == nil {
		return nil
	}
	return t.PlatformVersion
}

func (t *TriggerFallbackRequest) GetDevice() *string {
	if t == nil {
		return nil
	}
	return t.Device
}

func (t *TriggerFallbackRequest) GetModel() *string {
	if t == nil {
		return nil
	}
	return t.Model
}

func (t *TriggerFallbackRequest) GetDeviceVendor() *string {
	if t == nil {
		return nil
	}
	return t.DeviceVendor
}

func (t *TriggerFallbackRequest) GetDeviceName() *string {
	if t == nil {
		return nil
	}
	return t.DeviceName
}

func (t *TriggerFallbackRequest) GetMarketplace() *string {
	if t == nil {
		return nil
	}
	return t.Marketplace
}

func (t *TriggerFallbackRequest) GetTranscodeType() components.TranscodeType {
	if t == nil {
		return components.TranscodeType("")
	}
	return t.TranscodeType
}

func (t *TriggerFallbackRequest) GetTranscodeSessionID() *string {
	if t == nil {
		return nil
	}
	return t.TranscodeSessionID
}

type TriggerFallbackResponse 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
}

func (t *TriggerFallbackResponse) GetContentType() string {
	if t == nil {
		return ""
	}
	return t.ContentType
}

func (t *TriggerFallbackResponse) GetStatusCode() int {
	if t == nil {
		return 0
	}
	return t.StatusCode
}

func (t *TriggerFallbackResponse) GetRawResponse() *http.Response {
	if t == nil {
		return nil
	}
	return t.RawResponse
}
