// 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 ListTopUsersGlobals 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 (l ListTopUsersGlobals) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(l, "", false) } func (l *ListTopUsersGlobals) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &l, "", false, nil); err != nil { return err } return nil } func (l *ListTopUsersGlobals) GetAccepts() *components.Accepts { if l == nil { return nil } return l.Accepts } func (l *ListTopUsersGlobals) GetClientIdentifier() *string { if l == nil { return nil } return l.ClientIdentifier } func (l *ListTopUsersGlobals) GetProduct() *string { if l == nil { return nil } return l.Product } func (l *ListTopUsersGlobals) GetVersion() *string { if l == nil { return nil } return l.Version } func (l *ListTopUsersGlobals) GetPlatform() *string { if l == nil { return nil } return l.Platform } func (l *ListTopUsersGlobals) GetPlatformVersion() *string { if l == nil { return nil } return l.PlatformVersion } func (l *ListTopUsersGlobals) GetDevice() *string { if l == nil { return nil } return l.Device } func (l *ListTopUsersGlobals) GetModel() *string { if l == nil { return nil } return l.Model } func (l *ListTopUsersGlobals) GetDeviceVendor() *string { if l == nil { return nil } return l.DeviceVendor } func (l *ListTopUsersGlobals) GetDeviceName() *string { if l == nil { return nil } return l.DeviceName } func (l *ListTopUsersGlobals) GetMarketplace() *string { if l == nil { return nil } return l.Marketplace } type ListTopUsersRequest 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"` } func (l ListTopUsersRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(l, "", false) } func (l *ListTopUsersRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &l, "", false, []string{"ids"}); err != nil { return err } return nil } func (l *ListTopUsersRequest) GetAccepts() *components.Accepts { if l == nil { return nil } return l.Accepts } func (l *ListTopUsersRequest) GetClientIdentifier() *string { if l == nil { return nil } return l.ClientIdentifier } func (l *ListTopUsersRequest) GetProduct() *string { if l == nil { return nil } return l.Product } func (l *ListTopUsersRequest) GetVersion() *string { if l == nil { return nil } return l.Version } func (l *ListTopUsersRequest) GetPlatform() *string { if l == nil { return nil } return l.Platform } func (l *ListTopUsersRequest) GetPlatformVersion() *string { if l == nil { return nil } return l.PlatformVersion } func (l *ListTopUsersRequest) GetDevice() *string { if l == nil { return nil } return l.Device } func (l *ListTopUsersRequest) GetModel() *string { if l == nil { return nil } return l.Model } func (l *ListTopUsersRequest) GetDeviceVendor() *string { if l == nil { return nil } return l.DeviceVendor } func (l *ListTopUsersRequest) GetDeviceName() *string { if l == nil { return nil } return l.DeviceName } func (l *ListTopUsersRequest) GetMarketplace() *string { if l == nil { return nil } return l.Marketplace } func (l *ListTopUsersRequest) GetIds() string { if l == nil { return "" } return l.Ids } type Account struct { GlobalViewCount *int64 `json:"globalViewCount,omitempty"` ID *int64 `json:"id,omitempty"` } func (a *Account) GetGlobalViewCount() *int64 { if a == nil { return nil } return a.GlobalViewCount } func (a *Account) GetID() *int64 { if a == nil { return nil } return a.ID } // ListTopUsersMediaContainer - `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 ListTopUsersMediaContainer 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"` Account []Account `json:"Account,omitempty"` } func (l *ListTopUsersMediaContainer) GetIdentifier() *string { if l == nil { return nil } return l.Identifier } func (l *ListTopUsersMediaContainer) GetOffset() *int64 { if l == nil { return nil } return l.Offset } func (l *ListTopUsersMediaContainer) GetSize() *int64 { if l == nil { return nil } return l.Size } func (l *ListTopUsersMediaContainer) GetTotalSize() *int64 { if l == nil { return nil } return l.TotalSize } func (l *ListTopUsersMediaContainer) GetAccount() []Account { if l == nil { return nil } return l.Account } // ListTopUsersResponseBody - OK type ListTopUsersResponseBody struct { MediaContainer *ListTopUsersMediaContainer `json:"MediaContainer,omitempty"` } func (l *ListTopUsersResponseBody) GetMediaContainer() *ListTopUsersMediaContainer { if l == nil { return nil } return l.MediaContainer } type ListTopUsersResponse 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 *ListTopUsersResponseBody } func (l *ListTopUsersResponse) GetContentType() string { if l == nil { return "" } return l.ContentType } func (l *ListTopUsersResponse) GetStatusCode() int { if l == nil { return 0 } return l.StatusCode } func (l *ListTopUsersResponse) GetRawResponse() *http.Response { if l == nil { return nil } return l.RawResponse } func (l *ListTopUsersResponse) GetObject() *ListTopUsersResponseBody { if l == nil { return nil } return l.Object }