// 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" "net/http" ) type UpdateItemArtworkGlobals 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 UpdateItemArtworkGlobals) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u, "", false) } func (u *UpdateItemArtworkGlobals) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &u, "", false, nil); err != nil { return err } return nil } func (u *UpdateItemArtworkGlobals) GetAccepts() *components.Accepts { if u == nil { return nil } return u.Accepts } func (u *UpdateItemArtworkGlobals) GetClientIdentifier() *string { if u == nil { return nil } return u.ClientIdentifier } func (u *UpdateItemArtworkGlobals) GetProduct() *string { if u == nil { return nil } return u.Product } func (u *UpdateItemArtworkGlobals) GetVersion() *string { if u == nil { return nil } return u.Version } func (u *UpdateItemArtworkGlobals) GetPlatform() *string { if u == nil { return nil } return u.Platform } func (u *UpdateItemArtworkGlobals) GetPlatformVersion() *string { if u == nil { return nil } return u.PlatformVersion } func (u *UpdateItemArtworkGlobals) GetDevice() *string { if u == nil { return nil } return u.Device } func (u *UpdateItemArtworkGlobals) GetModel() *string { if u == nil { return nil } return u.Model } func (u *UpdateItemArtworkGlobals) GetDeviceVendor() *string { if u == nil { return nil } return u.DeviceVendor } func (u *UpdateItemArtworkGlobals) GetDeviceName() *string { if u == nil { return nil } return u.DeviceName } func (u *UpdateItemArtworkGlobals) GetMarketplace() *string { if u == nil { return nil } return u.Marketplace } type PathParamElement string const ( PathParamElementThumb PathParamElement = "thumb" PathParamElementArt PathParamElement = "art" PathParamElementClearLogo PathParamElement = "clearLogo" PathParamElementBanner PathParamElement = "banner" PathParamElementPoster PathParamElement = "poster" PathParamElementTheme PathParamElement = "theme" ) func (e PathParamElement) ToPointer() *PathParamElement { return &e } func (e *PathParamElement) 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 = PathParamElement(v) return nil default: return fmt.Errorf("invalid value for PathParamElement: %v", v) } } type UpdateItemArtworkRequest 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 PathParamElement `pathParam:"style=simple,explode=false,name=element"` // The url of the new asset. URL *string `queryParam:"style=form,explode=true,name=url"` } func (u UpdateItemArtworkRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u, "", false) } func (u *UpdateItemArtworkRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &u, "", false, []string{"ids", "element"}); err != nil { return err } return nil } func (u *UpdateItemArtworkRequest) GetAccepts() *components.Accepts { if u == nil { return nil } return u.Accepts } func (u *UpdateItemArtworkRequest) GetClientIdentifier() *string { if u == nil { return nil } return u.ClientIdentifier } func (u *UpdateItemArtworkRequest) GetProduct() *string { if u == nil { return nil } return u.Product } func (u *UpdateItemArtworkRequest) GetVersion() *string { if u == nil { return nil } return u.Version } func (u *UpdateItemArtworkRequest) GetPlatform() *string { if u == nil { return nil } return u.Platform } func (u *UpdateItemArtworkRequest) GetPlatformVersion() *string { if u == nil { return nil } return u.PlatformVersion } func (u *UpdateItemArtworkRequest) GetDevice() *string { if u == nil { return nil } return u.Device } func (u *UpdateItemArtworkRequest) GetModel() *string { if u == nil { return nil } return u.Model } func (u *UpdateItemArtworkRequest) GetDeviceVendor() *string { if u == nil { return nil } return u.DeviceVendor } func (u *UpdateItemArtworkRequest) GetDeviceName() *string { if u == nil { return nil } return u.DeviceName } func (u *UpdateItemArtworkRequest) GetMarketplace() *string { if u == nil { return nil } return u.Marketplace } func (u *UpdateItemArtworkRequest) GetIds() string { if u == nil { return "" } return u.Ids } func (u *UpdateItemArtworkRequest) GetElement() PathParamElement { if u == nil { return PathParamElement("") } return u.Element } func (u *UpdateItemArtworkRequest) GetURL() *string { if u == nil { return nil } return u.URL } type UpdateItemArtworkResponse 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 *UpdateItemArtworkResponse) GetContentType() string { if u == nil { return "" } return u.ContentType } func (u *UpdateItemArtworkResponse) GetStatusCode() int { if u == nil { return 0 } return u.StatusCode } func (u *UpdateItemArtworkResponse) GetRawResponse() *http.Response { if u == nil { return nil } return u.RawResponse }