// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package operations

import (
	"encoding/json"
	"fmt"
	"github.com/LukeHagar/plexgo/internal/utils"
	"github.com/LukeHagar/plexgo/models/components"
	"io"
	"net/http"
)

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

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

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

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

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

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

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

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

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

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

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

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

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

type GetItemArtworkPathParamElement string

const (
	GetItemArtworkPathParamElementThumb     GetItemArtworkPathParamElement = "thumb"
	GetItemArtworkPathParamElementArt       GetItemArtworkPathParamElement = "art"
	GetItemArtworkPathParamElementClearLogo GetItemArtworkPathParamElement = "clearLogo"
	GetItemArtworkPathParamElementBanner    GetItemArtworkPathParamElement = "banner"
	GetItemArtworkPathParamElementPoster    GetItemArtworkPathParamElement = "poster"
	GetItemArtworkPathParamElementTheme     GetItemArtworkPathParamElement = "theme"
)

func (e GetItemArtworkPathParamElement) ToPointer() *GetItemArtworkPathParamElement {
	return &e
}
func (e *GetItemArtworkPathParamElement) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "thumb":
		fallthrough
	case "art":
		fallthrough
	case "clearLogo":
		fallthrough
	case "banner":
		fallthrough
	case "poster":
		fallthrough
	case "theme":
		*e = GetItemArtworkPathParamElement(v)
		return nil
	default:
		return fmt.Errorf("invalid value for GetItemArtworkPathParamElement: %v", v)
	}
}

type GetItemArtworkRequest 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"`
	Ids         string                         `pathParam:"style=simple,explode=false,name=ids"`
	Element     GetItemArtworkPathParamElement `pathParam:"style=simple,explode=false,name=element"`
	// A timestamp on the element used for cache management in the client
	Timestamp int64 `pathParam:"style=simple,explode=false,name=timestamp"`
}

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

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

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

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

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

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

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

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

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

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

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

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

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

func (g *GetItemArtworkRequest) GetIds() string {
	if g == nil {
		return ""
	}
	return g.Ids
}

func (g *GetItemArtworkRequest) GetElement() GetItemArtworkPathParamElement {
	if g == nil {
		return GetItemArtworkPathParamElement("")
	}
	return g.Element
}

func (g *GetItemArtworkRequest) GetTimestamp() int64 {
	if g == nil {
		return 0
	}
	return g.Timestamp
}

type GetItemArtworkResponse 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
	// The Close method must be called on this field, even if it is not used, to prevent resource leaks.
	TwoHundredAudioMpeg3ResponseStream io.ReadCloser
	// OK
	// The Close method must be called on this field, even if it is not used, to prevent resource leaks.
	TwoHundredImageJpegResponseStream io.ReadCloser
}

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

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

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

func (g *GetItemArtworkResponse) GetTwoHundredAudioMpeg3ResponseStream() io.ReadCloser {
	if g == nil {
		return nil
	}
	return g.TwoHundredAudioMpeg3ResponseStream
}

func (g *GetItemArtworkResponse) GetTwoHundredImageJpegResponseStream() io.ReadCloser {
	if g == nil {
		return nil
	}
	return g.TwoHundredImageJpegResponseStream
}
