// 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 GetLineupChannelsGlobals 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 GetLineupChannelsGlobals) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLineupChannelsGlobals) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, nil); err != nil { return err } return nil } func (g *GetLineupChannelsGlobals) GetAccepts() *components.Accepts { if g == nil { return nil } return g.Accepts } func (g *GetLineupChannelsGlobals) GetClientIdentifier() *string { if g == nil { return nil } return g.ClientIdentifier } func (g *GetLineupChannelsGlobals) GetProduct() *string { if g == nil { return nil } return g.Product } func (g *GetLineupChannelsGlobals) GetVersion() *string { if g == nil { return nil } return g.Version } func (g *GetLineupChannelsGlobals) GetPlatform() *string { if g == nil { return nil } return g.Platform } func (g *GetLineupChannelsGlobals) GetPlatformVersion() *string { if g == nil { return nil } return g.PlatformVersion } func (g *GetLineupChannelsGlobals) GetDevice() *string { if g == nil { return nil } return g.Device } func (g *GetLineupChannelsGlobals) GetModel() *string { if g == nil { return nil } return g.Model } func (g *GetLineupChannelsGlobals) GetDeviceVendor() *string { if g == nil { return nil } return g.DeviceVendor } func (g *GetLineupChannelsGlobals) GetDeviceName() *string { if g == nil { return nil } return g.DeviceName } func (g *GetLineupChannelsGlobals) GetMarketplace() *string { if g == nil { return nil } return g.Marketplace } type GetLineupChannelsRequest 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 URIs describing the lineups Lineup []string `queryParam:"style=form,explode=true,name=lineup"` } func (g GetLineupChannelsRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLineupChannelsRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, []string{"lineup"}); err != nil { return err } return nil } func (g *GetLineupChannelsRequest) GetAccepts() *components.Accepts { if g == nil { return nil } return g.Accepts } func (g *GetLineupChannelsRequest) GetClientIdentifier() *string { if g == nil { return nil } return g.ClientIdentifier } func (g *GetLineupChannelsRequest) GetProduct() *string { if g == nil { return nil } return g.Product } func (g *GetLineupChannelsRequest) GetVersion() *string { if g == nil { return nil } return g.Version } func (g *GetLineupChannelsRequest) GetPlatform() *string { if g == nil { return nil } return g.Platform } func (g *GetLineupChannelsRequest) GetPlatformVersion() *string { if g == nil { return nil } return g.PlatformVersion } func (g *GetLineupChannelsRequest) GetDevice() *string { if g == nil { return nil } return g.Device } func (g *GetLineupChannelsRequest) GetModel() *string { if g == nil { return nil } return g.Model } func (g *GetLineupChannelsRequest) GetDeviceVendor() *string { if g == nil { return nil } return g.DeviceVendor } func (g *GetLineupChannelsRequest) GetDeviceName() *string { if g == nil { return nil } return g.DeviceName } func (g *GetLineupChannelsRequest) GetMarketplace() *string { if g == nil { return nil } return g.Marketplace } func (g *GetLineupChannelsRequest) GetLineup() []string { if g == nil { return []string{} } return g.Lineup } // LineupType - - `-1`: N/A // - `0`: Over the air // - `1`: Cable // - `2`: Satellite // - `3`: IPTV // - `4`: Virtual type LineupType int64 const ( LineupTypeMinus1 LineupType = -1 LineupTypeZero LineupType = 0 LineupTypeOne LineupType = 1 LineupTypeTwo LineupType = 2 LineupTypeThree LineupType = 3 LineupTypeFour LineupType = 4 ) func (e LineupType) ToPointer() *LineupType { return &e } func (e *LineupType) UnmarshalJSON(data []byte) error { var v int64 if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case -1: fallthrough case 0: fallthrough case 1: fallthrough case 2: fallthrough case 3: fallthrough case 4: *e = LineupType(v) return nil default: return fmt.Errorf("invalid value for LineupType: %v", v) } } type Lineup struct { Title *string `json:"title,omitempty"` // The type of this object (`lineup` in this case) Type *string `json:"type,omitempty"` // - `-1`: N/A // - `0`: Over the air // - `1`: Cable // - `2`: Satellite // - `3`: IPTV // - `4`: Virtual // LineupType *LineupType `json:"lineupType,omitempty"` Location *string `json:"location,omitempty"` // The uuid of this lineup UUID *string `json:"uuid,omitempty"` Channel []components.Channel `json:"Channel,omitempty"` } func (l *Lineup) GetTitle() *string { if l == nil { return nil } return l.Title } func (l *Lineup) GetType() *string { if l == nil { return nil } return l.Type } func (l *Lineup) GetLineupType() *LineupType { if l == nil { return nil } return l.LineupType } func (l *Lineup) GetLocation() *string { if l == nil { return nil } return l.Location } func (l *Lineup) GetUUID() *string { if l == nil { return nil } return l.UUID } func (l *Lineup) GetChannel() []components.Channel { if l == nil { return nil } return l.Channel } // GetLineupChannelsMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable. // Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination) // The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track. type GetLineupChannelsMediaContainer struct { Identifier *string `json:"identifier,omitempty"` // The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header. // Offset *int64 `json:"offset,omitempty"` Size *int64 `json:"size,omitempty"` // The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header. // TotalSize *int64 `json:"totalSize,omitempty"` Lineup []Lineup `json:"Lineup,omitempty"` } func (g *GetLineupChannelsMediaContainer) GetIdentifier() *string { if g == nil { return nil } return g.Identifier } func (g *GetLineupChannelsMediaContainer) GetOffset() *int64 { if g == nil { return nil } return g.Offset } func (g *GetLineupChannelsMediaContainer) GetSize() *int64 { if g == nil { return nil } return g.Size } func (g *GetLineupChannelsMediaContainer) GetTotalSize() *int64 { if g == nil { return nil } return g.TotalSize } func (g *GetLineupChannelsMediaContainer) GetLineup() []Lineup { if g == nil { return nil } return g.Lineup } // GetLineupChannelsResponseBody - OK type GetLineupChannelsResponseBody struct { MediaContainer *GetLineupChannelsMediaContainer `json:"MediaContainer,omitempty"` } func (g *GetLineupChannelsResponseBody) GetMediaContainer() *GetLineupChannelsMediaContainer { if g == nil { return nil } return g.MediaContainer } type GetLineupChannelsResponse 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 Object *GetLineupChannelsResponseBody } func (g *GetLineupChannelsResponse) GetContentType() string { if g == nil { return "" } return g.ContentType } func (g *GetLineupChannelsResponse) GetStatusCode() int { if g == nil { return 0 } return g.StatusCode } func (g *GetLineupChannelsResponse) GetRawResponse() *http.Response { if g == nil { return nil } return g.RawResponse } func (g *GetLineupChannelsResponse) GetObject() *GetLineupChannelsResponseBody { if g == nil { return nil } return g.Object }