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

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

func (u *UploadPlaylistGlobals) GetAccepts() *components.Accepts {
	if u == nil {
		return nil
	}
	return u.Accepts
}

func (u *UploadPlaylistGlobals) GetClientIdentifier() *string {
	if u == nil {
		return nil
	}
	return u.ClientIdentifier
}

func (u *UploadPlaylistGlobals) GetProduct() *string {
	if u == nil {
		return nil
	}
	return u.Product
}

func (u *UploadPlaylistGlobals) GetVersion() *string {
	if u == nil {
		return nil
	}
	return u.Version
}

func (u *UploadPlaylistGlobals) GetPlatform() *string {
	if u == nil {
		return nil
	}
	return u.Platform
}

func (u *UploadPlaylistGlobals) GetPlatformVersion() *string {
	if u == nil {
		return nil
	}
	return u.PlatformVersion
}

func (u *UploadPlaylistGlobals) GetDevice() *string {
	if u == nil {
		return nil
	}
	return u.Device
}

func (u *UploadPlaylistGlobals) GetModel() *string {
	if u == nil {
		return nil
	}
	return u.Model
}

func (u *UploadPlaylistGlobals) GetDeviceVendor() *string {
	if u == nil {
		return nil
	}
	return u.DeviceVendor
}

func (u *UploadPlaylistGlobals) GetDeviceName() *string {
	if u == nil {
		return nil
	}
	return u.DeviceName
}

func (u *UploadPlaylistGlobals) GetMarketplace() *string {
	if u == nil {
		return nil
	}
	return u.Marketplace
}

type UploadPlaylistRequest 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"`
	// Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename.
	Path *string `queryParam:"style=form,explode=true,name=path"`
	// Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
	Force *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=force"`
}

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

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

func (u *UploadPlaylistRequest) GetAccepts() *components.Accepts {
	if u == nil {
		return nil
	}
	return u.Accepts
}

func (u *UploadPlaylistRequest) GetClientIdentifier() *string {
	if u == nil {
		return nil
	}
	return u.ClientIdentifier
}

func (u *UploadPlaylistRequest) GetProduct() *string {
	if u == nil {
		return nil
	}
	return u.Product
}

func (u *UploadPlaylistRequest) GetVersion() *string {
	if u == nil {
		return nil
	}
	return u.Version
}

func (u *UploadPlaylistRequest) GetPlatform() *string {
	if u == nil {
		return nil
	}
	return u.Platform
}

func (u *UploadPlaylistRequest) GetPlatformVersion() *string {
	if u == nil {
		return nil
	}
	return u.PlatformVersion
}

func (u *UploadPlaylistRequest) GetDevice() *string {
	if u == nil {
		return nil
	}
	return u.Device
}

func (u *UploadPlaylistRequest) GetModel() *string {
	if u == nil {
		return nil
	}
	return u.Model
}

func (u *UploadPlaylistRequest) GetDeviceVendor() *string {
	if u == nil {
		return nil
	}
	return u.DeviceVendor
}

func (u *UploadPlaylistRequest) GetDeviceName() *string {
	if u == nil {
		return nil
	}
	return u.DeviceName
}

func (u *UploadPlaylistRequest) GetMarketplace() *string {
	if u == nil {
		return nil
	}
	return u.Marketplace
}

func (u *UploadPlaylistRequest) GetPath() *string {
	if u == nil {
		return nil
	}
	return u.Path
}

func (u *UploadPlaylistRequest) GetForce() *components.BoolInt {
	if u == nil {
		return nil
	}
	return u.Force
}

type UploadPlaylistResponse 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 (u *UploadPlaylistResponse) GetContentType() string {
	if u == nil {
		return ""
	}
	return u.ContentType
}

func (u *UploadPlaylistResponse) GetStatusCode() int {
	if u == nil {
		return 0
	}
	return u.StatusCode
}

func (u *UploadPlaylistResponse) GetRawResponse() *http.Response {
	if u == nil {
		return nil
	}
	return u.RawResponse
}
