// 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 RefreshPlaylistGlobals 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 RefreshPlaylistGlobals) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(r, "", false) } func (r *RefreshPlaylistGlobals) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &r, "", false, nil); err != nil { return err } return nil } func (r *RefreshPlaylistGlobals) GetAccepts() *components.Accepts { if r == nil { return nil } return r.Accepts } func (r *RefreshPlaylistGlobals) GetClientIdentifier() *string { if r == nil { return nil } return r.ClientIdentifier } func (r *RefreshPlaylistGlobals) GetProduct() *string { if r == nil { return nil } return r.Product } func (r *RefreshPlaylistGlobals) GetVersion() *string { if r == nil { return nil } return r.Version } func (r *RefreshPlaylistGlobals) GetPlatform() *string { if r == nil { return nil } return r.Platform } func (r *RefreshPlaylistGlobals) GetPlatformVersion() *string { if r == nil { return nil } return r.PlatformVersion } func (r *RefreshPlaylistGlobals) GetDevice() *string { if r == nil { return nil } return r.Device } func (r *RefreshPlaylistGlobals) GetModel() *string { if r == nil { return nil } return r.Model } func (r *RefreshPlaylistGlobals) GetDeviceVendor() *string { if r == nil { return nil } return r.DeviceVendor } func (r *RefreshPlaylistGlobals) GetDeviceName() *string { if r == nil { return nil } return r.DeviceName } func (r *RefreshPlaylistGlobals) GetMarketplace() *string { if r == nil { return nil } return r.Marketplace } // Action - The action to perform for this item on this optimizer queue type Action string const ( ActionReprocess Action = "reprocess" ActionDisable Action = "disable" ActionEnable Action = "enable" ) func (e Action) ToPointer() *Action { return &e } func (e *Action) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "reprocess": fallthrough case "disable": fallthrough case "enable": *e = Action(v) return nil default: return fmt.Errorf("invalid value for Action: %v", v) } } type RefreshPlaylistRequest 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 playlist PlaylistID int64 `pathParam:"style=simple,explode=false,name=playlistId"` // The generator item ID to act on GeneratorID int64 `pathParam:"style=simple,explode=false,name=generatorId"` // The metadata item ID to act on MetadataID int64 `pathParam:"style=simple,explode=false,name=metadataId"` // The action to perform for this item on this optimizer queue Action Action `pathParam:"style=simple,explode=false,name=action"` } func (r RefreshPlaylistRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(r, "", false) } func (r *RefreshPlaylistRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &r, "", false, []string{"playlistId", "generatorId", "metadataId", "action"}); err != nil { return err } return nil } func (r *RefreshPlaylistRequest) GetAccepts() *components.Accepts { if r == nil { return nil } return r.Accepts } func (r *RefreshPlaylistRequest) GetClientIdentifier() *string { if r == nil { return nil } return r.ClientIdentifier } func (r *RefreshPlaylistRequest) GetProduct() *string { if r == nil { return nil } return r.Product } func (r *RefreshPlaylistRequest) GetVersion() *string { if r == nil { return nil } return r.Version } func (r *RefreshPlaylistRequest) GetPlatform() *string { if r == nil { return nil } return r.Platform } func (r *RefreshPlaylistRequest) GetPlatformVersion() *string { if r == nil { return nil } return r.PlatformVersion } func (r *RefreshPlaylistRequest) GetDevice() *string { if r == nil { return nil } return r.Device } func (r *RefreshPlaylistRequest) GetModel() *string { if r == nil { return nil } return r.Model } func (r *RefreshPlaylistRequest) GetDeviceVendor() *string { if r == nil { return nil } return r.DeviceVendor } func (r *RefreshPlaylistRequest) GetDeviceName() *string { if r == nil { return nil } return r.DeviceName } func (r *RefreshPlaylistRequest) GetMarketplace() *string { if r == nil { return nil } return r.Marketplace } func (r *RefreshPlaylistRequest) GetPlaylistID() int64 { if r == nil { return 0 } return r.PlaylistID } func (r *RefreshPlaylistRequest) GetGeneratorID() int64 { if r == nil { return 0 } return r.GeneratorID } func (r *RefreshPlaylistRequest) GetMetadataID() int64 { if r == nil { return 0 } return r.MetadataID } func (r *RefreshPlaylistRequest) GetAction() Action { if r == nil { return Action("") } return r.Action } type RefreshPlaylistResponse 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 (r *RefreshPlaylistResponse) GetContentType() string { if r == nil { return "" } return r.ContentType } func (r *RefreshPlaylistResponse) GetStatusCode() int { if r == nil { return 0 } return r.StatusCode } func (r *RefreshPlaylistResponse) GetRawResponse() *http.Response { if r == nil { return nil } return r.RawResponse }