mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
* `PlexApi.LibraryPlaylists.AddPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetMetadataHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryCollections.MoveCollectionItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryCollections.DeleteCollectionItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryCollections.AddCollectionItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetSonicallySimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Butler.StopTask()`: `request.Request` **Changed** **Breaking** ⚠️ * `PlexApi.Butler.StartTask()`: `request.Request` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetSonicPath()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.DownloadQueue.GetItemDecision()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetAllHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetContinueWatching()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetPromotedHubs()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetAllLeaves()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetPostplayHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetRelatedHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetSectionHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.ListContent()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetAlbums()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Search.SearchHubs()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Search.VoiceSearchHubs()`: * `request.Request.Type` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryItems()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.IngestTransientItem()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryMatches()`: * `request.Request` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetMetadataItem()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetSections()`: `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.AddSection()`: * `request.Request` **Changed** * `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetTags()`: * `request.Request.Type` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetCollectionItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetAllItemLeaves()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Status.ListSessions()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.MovePlayQueueItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetExtras()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.DeletePlayQueueItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.Unshuffle()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListMatches()`: * `request.Request.Manual` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListSonicallySimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.ResetPlayQueue()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetRelatedItems()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListSimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.ClearPlayQueue()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetItemTree()`: `response.MediaContainer.MetadataItem.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.AddToPlayQueue()`: * `request.Request.Next` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.GetPlayQueue()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.MovePlaylistItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetPerson()`: `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListPersonMedia()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.GetPlaylistGeneratorItems()`: `response.MediaContainer.Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryDetails()`: * `request.Request.IncludeDetails` **Changed** * `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.ModifyPlaylistGenerator()`: * `request.Request.Item` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.Autocomplete()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetCollections()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetCommon()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.DeletePlaylistItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.ClearPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.Shuffle()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.CreatePlaylist()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Playlist.GetPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Playlist.GetPlaylist()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Collections.CreateCollection()`: * `request.Request.Type` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.DvRs.TuneChannel()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LiveTv.GetSessions()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LiveTv.GetLiveTvSession()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Playlist.ListPlaylists()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetAllSubscriptions()`: * `request.Request` **Changed** * `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.CreateSubscription()`: `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetScheduledRecordings()`: `response.MediaContainer.MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetTemplate()`: `response.MediaContainer.SubscriptionTemplate.[].MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetSubscription()`: * `request.Request` **Changed** * `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.EditSubscriptionPreferences()`: `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.ReorderSubscription()`: `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Transcoder.MakeDecision()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.RefreshItemsMetadata()`: * `request.Request.MarkUpdated` **Changed** * `PlexApi.Authentication.Post-Users-Sign-In-Data()`: **Added** * `PlexApi.Transcoder.StartTranscodeSession()`: `request.Request` **Changed** * `PlexApi.Devices.ModifyDevice()`: * `request.Request.Enabled` **Changed** * `PlexApi.Library.GetMediaPart()`: * `request.Request.Download` **Changed** * `PlexApi.Library.DetectIntros()`: * `request.Request.Force` **Changed** * `PlexApi.Library.RefreshSection()`: * `request.Request.Force` **Changed** * `PlexApi.LibraryPlaylists.UploadPlaylist()`: * `request.Request.Force` **Changed** * `PlexApi.Library.DeleteMediaItem()`: * `request.Request.Proxy` **Changed** * `PlexApi.Authentication.GetTokenDetails()`: **Added** * `PlexApi.Library.GetFirstCharacters()`: * `request.Request.MediaQuery` **Changed** * `PlexApi.Library.UpdateItems()`: * `request.Request.Field.locked` **Changed** * `PlexApi.Library.DeleteLibrarySection()`: * `request.Request.Async` **Changed** * `PlexApi.Library.SetStreamSelection()`: * `request.Request.AllParts` **Changed** * `PlexApi.PlayQueue.CreatePlayQueue()`: `request.Request` **Changed** * `PlexApi.Library.GetAugmentationStatus()`: * `request.Request.Wait` **Changed** * `PlexApi.Library.DetectVoiceActivity()`: `request.Request` **Changed** * `PlexApi.Transcoder.TranscodeImage()`: `request.Request` **Changed** * `PlexApi.Transcoder.TranscodeSubtitles()`: `request.Request` **Changed** * `PlexApi.Library.AddSubtitles()`: `request.Request` **Changed** * `PlexApi.Library.GetStream()`: * `request.Request.AutoAdjustSubtitle` **Changed** * `PlexApi.Library.StartBifGeneration()`: * `request.Request.Force` **Changed** * `PlexApi.Library.DetectCredits()`: `request.Request` **Changed** * `PlexApi.UltraBlur.GetImage()`: * `request.Request.Noise` **Changed** * `PlexApi.Library.GenerateThumbs()`: * `request.Request.Force` **Changed** * `PlexApi.Updater.ApplyUpdates()`: `request.Request` **Changed** * `PlexApi.Updater.CheckUpdates()`: * `request.Request.Download` **Changed** * `PlexApi.Library.DeleteMetadataItem()`: * `request.Request.Proxy` **Changed** * `PlexApi.Library.OptimizeDatabase()`: * `request.Request.Async` **Changed** * `PlexApi.Hubs.UpdateHubVisibility()`: `request.Request` **Changed** * `PlexApi.Hubs.CreateCustomHub()`: `request.Request` **Changed** * `PlexApi.Library.GetSectionImage()`: * `request.Request.MediaQuery` **Changed** * `PlexApi.DownloadQueue.AddDownloadQueueItems()`: `request.Request` **Changed** * `PlexApi.Timeline.Report()`: `request.Request` **Changed** * `PlexApi.General.GetSourceConnectionInformation()`: * `request.Request.Refresh` **Changed** * `PlexApi.Plex.Get-Server-Resources()`: **Added** * `PlexApi.Users.Get-Users()`: **Added**
645 lines
14 KiB
Go
645 lines
14 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package components
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/LukeHagar/plexgo/internal/utils"
|
|
)
|
|
|
|
// MailingListStatus - Your current mailing list status
|
|
type MailingListStatus string
|
|
|
|
const (
|
|
MailingListStatusActive MailingListStatus = "active"
|
|
MailingListStatusUnsubscribed MailingListStatus = "unsubscribed"
|
|
MailingListStatusRemoved MailingListStatus = "removed"
|
|
)
|
|
|
|
func (e MailingListStatus) ToPointer() *MailingListStatus {
|
|
return &e
|
|
}
|
|
func (e *MailingListStatus) UnmarshalJSON(data []byte) error {
|
|
var v string
|
|
if err := json.Unmarshal(data, &v); err != nil {
|
|
return err
|
|
}
|
|
switch v {
|
|
case "active":
|
|
fallthrough
|
|
case "unsubscribed":
|
|
fallthrough
|
|
case "removed":
|
|
*e = MailingListStatus(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for MailingListStatus: %v", v)
|
|
}
|
|
}
|
|
|
|
type UserPlexAccountStatus string
|
|
|
|
const (
|
|
UserPlexAccountStatusOnline UserPlexAccountStatus = "online"
|
|
UserPlexAccountStatusOffline UserPlexAccountStatus = "offline"
|
|
)
|
|
|
|
func (e UserPlexAccountStatus) ToPointer() *UserPlexAccountStatus {
|
|
return &e
|
|
}
|
|
|
|
// IsExact returns true if the value matches a known enum value, false otherwise.
|
|
func (e *UserPlexAccountStatus) IsExact() bool {
|
|
if e != nil {
|
|
switch *e {
|
|
case "online", "offline":
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
type Services struct {
|
|
Identifier string `json:"identifier"`
|
|
Endpoint string `json:"endpoint"`
|
|
Token *string `json:"token"`
|
|
Secret *string `json:"secret"`
|
|
Status UserPlexAccountStatus `json:"status"`
|
|
}
|
|
|
|
func (s *Services) GetIdentifier() string {
|
|
if s == nil {
|
|
return ""
|
|
}
|
|
return s.Identifier
|
|
}
|
|
|
|
func (s *Services) GetEndpoint() string {
|
|
if s == nil {
|
|
return ""
|
|
}
|
|
return s.Endpoint
|
|
}
|
|
|
|
func (s *Services) GetToken() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Token
|
|
}
|
|
|
|
func (s *Services) GetSecret() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Secret
|
|
}
|
|
|
|
func (s *Services) GetStatus() UserPlexAccountStatus {
|
|
if s == nil {
|
|
return UserPlexAccountStatus("")
|
|
}
|
|
return s.Status
|
|
}
|
|
|
|
// UserPlexAccountSubscriptionStatus - String representation of subscriptionActive
|
|
type UserPlexAccountSubscriptionStatus string
|
|
|
|
const (
|
|
UserPlexAccountSubscriptionStatusInactive UserPlexAccountSubscriptionStatus = "Inactive"
|
|
UserPlexAccountSubscriptionStatusActive UserPlexAccountSubscriptionStatus = "Active"
|
|
)
|
|
|
|
func (e UserPlexAccountSubscriptionStatus) ToPointer() *UserPlexAccountSubscriptionStatus {
|
|
return &e
|
|
}
|
|
|
|
// IsExact returns true if the value matches a known enum value, false otherwise.
|
|
func (e *UserPlexAccountSubscriptionStatus) IsExact() bool {
|
|
if e != nil {
|
|
switch *e {
|
|
case "Inactive", "Active":
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
// Subscription - If the account's Plex Pass subscription is active
|
|
type Subscription struct {
|
|
// List of features allowed on your Plex Pass subscription
|
|
Features []string `json:"features,omitempty"`
|
|
// If the account's Plex Pass subscription is active
|
|
Active *bool `json:"active,omitempty"`
|
|
// Date the account subscribed to Plex Pass
|
|
SubscribedAt *string `json:"subscribedAt,omitempty"`
|
|
// String representation of subscriptionActive
|
|
Status *UserPlexAccountSubscriptionStatus `json:"status,omitempty"`
|
|
// Payment service used for your Plex Pass subscription
|
|
PaymentService *string `json:"paymentService,omitempty"`
|
|
// Name of Plex Pass subscription plan
|
|
Plan *string `json:"plan,omitempty"`
|
|
}
|
|
|
|
func (s *Subscription) GetFeatures() []string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Features
|
|
}
|
|
|
|
func (s *Subscription) GetActive() *bool {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Active
|
|
}
|
|
|
|
func (s *Subscription) GetSubscribedAt() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.SubscribedAt
|
|
}
|
|
|
|
func (s *Subscription) GetStatus() *UserPlexAccountSubscriptionStatus {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Status
|
|
}
|
|
|
|
func (s *Subscription) GetPaymentService() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.PaymentService
|
|
}
|
|
|
|
func (s *Subscription) GetPlan() *string {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Plan
|
|
}
|
|
|
|
// UserPlexAccountSubscriptionsStatus - String representation of subscriptionActive
|
|
type UserPlexAccountSubscriptionsStatus string
|
|
|
|
const (
|
|
UserPlexAccountSubscriptionsStatusInactive UserPlexAccountSubscriptionsStatus = "Inactive"
|
|
UserPlexAccountSubscriptionsStatusActive UserPlexAccountSubscriptionsStatus = "Active"
|
|
)
|
|
|
|
func (e UserPlexAccountSubscriptionsStatus) ToPointer() *UserPlexAccountSubscriptionsStatus {
|
|
return &e
|
|
}
|
|
|
|
// IsExact returns true if the value matches a known enum value, false otherwise.
|
|
func (e *UserPlexAccountSubscriptionsStatus) IsExact() bool {
|
|
if e != nil {
|
|
switch *e {
|
|
case "Inactive", "Active":
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
type UserPlexAccountSubscription struct {
|
|
// List of features allowed on your Plex Pass subscription
|
|
Features []string `json:"features,omitempty"`
|
|
// If the account's Plex Pass subscription is active
|
|
Active *bool `json:"active,omitempty"`
|
|
// Date the account subscribed to Plex Pass
|
|
SubscribedAt *string `json:"subscribedAt,omitempty"`
|
|
// String representation of subscriptionActive
|
|
Status *UserPlexAccountSubscriptionsStatus `json:"status,omitempty"`
|
|
// Payment service used for your Plex Pass subscription
|
|
PaymentService *string `json:"paymentService,omitempty"`
|
|
// Name of Plex Pass subscription plan
|
|
Plan *string `json:"plan,omitempty"`
|
|
}
|
|
|
|
func (u *UserPlexAccountSubscription) GetFeatures() []string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Features
|
|
}
|
|
|
|
func (u *UserPlexAccountSubscription) GetActive() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Active
|
|
}
|
|
|
|
func (u *UserPlexAccountSubscription) GetSubscribedAt() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.SubscribedAt
|
|
}
|
|
|
|
func (u *UserPlexAccountSubscription) GetStatus() *UserPlexAccountSubscriptionsStatus {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Status
|
|
}
|
|
|
|
func (u *UserPlexAccountSubscription) GetPaymentService() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.PaymentService
|
|
}
|
|
|
|
func (u *UserPlexAccountSubscription) GetPlan() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Plan
|
|
}
|
|
|
|
type UserPlexAccount struct {
|
|
// Unknown
|
|
AdsConsent *bool `json:"adsConsent,omitempty"`
|
|
AdsConsentReminderAt *int64 `json:"adsConsentReminderAt,omitempty"`
|
|
AdsConsentSetAt *int64 `json:"adsConsentSetAt,omitempty"`
|
|
// Unknown
|
|
Anonymous *bool `default:"false" json:"anonymous"`
|
|
// The account token
|
|
AuthToken string `json:"authToken"`
|
|
// If the two-factor authentication backup codes have been created
|
|
BackupCodesCreated *bool `default:"false" json:"backupCodesCreated"`
|
|
// If the account has been confirmed
|
|
Confirmed *bool `default:"false" json:"confirmed"`
|
|
// The account country
|
|
Country *string `json:"country,omitempty"`
|
|
// The account email address
|
|
Email string `json:"email"`
|
|
// If login with email only is enabled
|
|
EmailOnlyAuth *bool `default:"false" json:"emailOnlyAuth"`
|
|
// If experimental features are enabled
|
|
ExperimentalFeatures *bool `default:"false" json:"experimentalFeatures"`
|
|
// Your account full name
|
|
FriendlyName string `json:"friendlyName"`
|
|
// List of devices your allowed to use with this account
|
|
Entitlements []string `json:"entitlements,omitempty"`
|
|
// If the account is a Plex Home guest user
|
|
Guest *bool `default:"false" json:"guest"`
|
|
// If the account has a password
|
|
HasPassword *bool `default:"true" json:"hasPassword"`
|
|
// If the account is a Plex Home user
|
|
Home *bool `default:"false" json:"home"`
|
|
// If the account is the Plex Home admin
|
|
HomeAdmin *bool `default:"false" json:"homeAdmin"`
|
|
// The number of accounts in the Plex Home
|
|
HomeSize *int `json:"homeSize,omitempty"`
|
|
// The Plex account ID
|
|
ID int `json:"id"`
|
|
// Unix epoch datetime in seconds
|
|
JoinedAt int64 `json:"joinedAt"`
|
|
// The account locale
|
|
Locale *string `json:"locale,omitempty"`
|
|
// If you are subscribed to the Plex newsletter
|
|
MailingListActive *bool `default:"false" json:"mailingListActive"`
|
|
// Your current mailing list status
|
|
MailingListStatus *MailingListStatus `json:"mailingListStatus,omitempty"`
|
|
// The maximum number of accounts allowed in the Plex Home
|
|
MaxHomeSize *int `json:"maxHomeSize,omitempty"`
|
|
// [Might be removed] The hashed Plex Home PIN
|
|
//
|
|
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
Pin *string `json:"pin,omitempty"`
|
|
Profile *UserProfile `json:"profile,omitempty"`
|
|
// If the account has a Plex Home PIN enabled
|
|
Protected *bool `default:"false" json:"protected"`
|
|
// Unix epoch datetime in seconds
|
|
RememberExpiresAt *int64 `json:"rememberExpiresAt,omitempty"`
|
|
// If the account is a Plex Home managed user
|
|
Restricted *bool `default:"false" json:"restricted"`
|
|
// [Might be removed] List of account roles. Plexpass membership listed here
|
|
Roles []string `json:"roles,omitempty"`
|
|
// Unknown
|
|
ScrobbleTypes *string `json:"scrobbleTypes,omitempty"`
|
|
Services []Services `json:"services,omitempty"`
|
|
// If the account's Plex Pass subscription is active
|
|
Subscription *Subscription `json:"subscription,omitempty"`
|
|
// Description of the Plex Pass subscription
|
|
SubscriptionDescription *string `json:"subscriptionDescription,omitempty"`
|
|
Subscriptions []UserPlexAccountSubscription `json:"subscriptions,omitempty"`
|
|
// URL of the account thumbnail
|
|
Thumb *string `json:"thumb,omitempty"`
|
|
// The title of the account (username or friendly name)
|
|
Title string `json:"title"`
|
|
// If two-factor authentication is enabled
|
|
TwoFactorEnabled *bool `default:"false" json:"twoFactorEnabled"`
|
|
// The account username
|
|
Username string `json:"username"`
|
|
// The account UUID
|
|
UUID string `json:"uuid"`
|
|
AttributionPartner *string `json:"attributionPartner,omitempty"`
|
|
}
|
|
|
|
func (u UserPlexAccount) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(u, "", false)
|
|
}
|
|
|
|
func (u *UserPlexAccount) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &u, "", false, []string{"authToken", "email", "friendlyName", "id", "joinedAt", "title", "username", "uuid"}); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetAdsConsent() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.AdsConsent
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetAdsConsentReminderAt() *int64 {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.AdsConsentReminderAt
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetAdsConsentSetAt() *int64 {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.AdsConsentSetAt
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetAnonymous() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Anonymous
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetAuthToken() string {
|
|
if u == nil {
|
|
return ""
|
|
}
|
|
return u.AuthToken
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetBackupCodesCreated() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.BackupCodesCreated
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetConfirmed() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Confirmed
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetCountry() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Country
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetEmail() string {
|
|
if u == nil {
|
|
return ""
|
|
}
|
|
return u.Email
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetEmailOnlyAuth() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.EmailOnlyAuth
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetExperimentalFeatures() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.ExperimentalFeatures
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetFriendlyName() string {
|
|
if u == nil {
|
|
return ""
|
|
}
|
|
return u.FriendlyName
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetEntitlements() []string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Entitlements
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetGuest() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Guest
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetHasPassword() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.HasPassword
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetHome() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Home
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetHomeAdmin() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.HomeAdmin
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetHomeSize() *int {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.HomeSize
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetID() int {
|
|
if u == nil {
|
|
return 0
|
|
}
|
|
return u.ID
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetJoinedAt() int64 {
|
|
if u == nil {
|
|
return 0
|
|
}
|
|
return u.JoinedAt
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetLocale() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Locale
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetMailingListActive() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.MailingListActive
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetMailingListStatus() *MailingListStatus {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.MailingListStatus
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetMaxHomeSize() *int {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.MaxHomeSize
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetPin() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Pin
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetProfile() *UserProfile {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Profile
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetProtected() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Protected
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetRememberExpiresAt() *int64 {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.RememberExpiresAt
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetRestricted() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Restricted
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetRoles() []string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Roles
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetScrobbleTypes() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.ScrobbleTypes
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetServices() []Services {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Services
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetSubscription() *Subscription {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Subscription
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetSubscriptionDescription() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.SubscriptionDescription
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetSubscriptions() []UserPlexAccountSubscription {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Subscriptions
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetThumb() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.Thumb
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetTitle() string {
|
|
if u == nil {
|
|
return ""
|
|
}
|
|
return u.Title
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetTwoFactorEnabled() *bool {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.TwoFactorEnabled
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetUsername() string {
|
|
if u == nil {
|
|
return ""
|
|
}
|
|
return u.Username
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetUUID() string {
|
|
if u == nil {
|
|
return ""
|
|
}
|
|
return u.UUID
|
|
}
|
|
|
|
func (u *UserPlexAccount) GetAttributionPartner() *string {
|
|
if u == nil {
|
|
return nil
|
|
}
|
|
return u.AttributionPartner
|
|
}
|