Files
plexgo/models/operations/gettokendetails.go

1304 lines
38 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"net/http"
"time"
)
var GetTokenDetailsServerList = []string{
"https://plex.tv/api/v2/",
}
// MailingListStatus - Your current mailing list status
type MailingListStatus string
const (
MailingListStatusActive MailingListStatus = "active"
MailingListStatusUnsubscribed MailingListStatus = "unsubscribed"
)
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":
*e = MailingListStatus(v)
return nil
default:
return fmt.Errorf("invalid value for MailingListStatus: %v", v)
}
}
// AutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
type AutoSelectSubtitle int
const (
AutoSelectSubtitleDisable AutoSelectSubtitle = 0
AutoSelectSubtitleEnable AutoSelectSubtitle = 1
)
func (e AutoSelectSubtitle) ToPointer() *AutoSelectSubtitle {
return &e
}
func (e *AutoSelectSubtitle) UnmarshalJSON(data []byte) error {
var v int
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = AutoSelectSubtitle(v)
return nil
default:
return fmt.Errorf("invalid value for AutoSelectSubtitle: %v", v)
}
}
// DefaultSubtitleAccessibility - The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
type DefaultSubtitleAccessibility int
const (
DefaultSubtitleAccessibilityDisable DefaultSubtitleAccessibility = 0
DefaultSubtitleAccessibilityEnable DefaultSubtitleAccessibility = 1
)
func (e DefaultSubtitleAccessibility) ToPointer() *DefaultSubtitleAccessibility {
return &e
}
func (e *DefaultSubtitleAccessibility) UnmarshalJSON(data []byte) error {
var v int
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = DefaultSubtitleAccessibility(v)
return nil
default:
return fmt.Errorf("invalid value for DefaultSubtitleAccessibility: %v", v)
}
}
// DefaultSubtitleForced - The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
type DefaultSubtitleForced int
const (
DefaultSubtitleForcedDisable DefaultSubtitleForced = 0
DefaultSubtitleForcedEnable DefaultSubtitleForced = 1
)
func (e DefaultSubtitleForced) ToPointer() *DefaultSubtitleForced {
return &e
}
func (e *DefaultSubtitleForced) UnmarshalJSON(data []byte) error {
var v int
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = DefaultSubtitleForced(v)
return nil
default:
return fmt.Errorf("invalid value for DefaultSubtitleForced: %v", v)
}
}
// WatchedIndicator - Whether or not media watched indicators are enabled (little orange dot on media)
type WatchedIndicator int
const (
WatchedIndicatorDisable WatchedIndicator = 0
WatchedIndicatorEnable WatchedIndicator = 1
)
func (e WatchedIndicator) ToPointer() *WatchedIndicator {
return &e
}
func (e *WatchedIndicator) UnmarshalJSON(data []byte) error {
var v int
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = WatchedIndicator(v)
return nil
default:
return fmt.Errorf("invalid value for WatchedIndicator: %v", v)
}
}
// MediaReviewsVisibility - Whether or not the account has media reviews visibility enabled
type MediaReviewsVisibility int
const (
MediaReviewsVisibilityDisable MediaReviewsVisibility = 0
MediaReviewsVisibilityEnable MediaReviewsVisibility = 1
)
func (e MediaReviewsVisibility) ToPointer() *MediaReviewsVisibility {
return &e
}
func (e *MediaReviewsVisibility) UnmarshalJSON(data []byte) error {
var v int
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = MediaReviewsVisibility(v)
return nil
default:
return fmt.Errorf("invalid value for MediaReviewsVisibility: %v", v)
}
}
type UserProfile struct {
// If the account has automatically select audio and subtitle tracks enabled
AutoSelectAudio *bool `default:"true" json:"autoSelectAudio"`
// The preferred audio language for the account
DefaultAudioLanguage *string `json:"defaultAudioLanguage"`
// The preferred subtitle language for the account
DefaultSubtitleLanguage *string `json:"defaultSubtitleLanguage"`
AutoSelectSubtitle *AutoSelectSubtitle `default:"0" json:"autoSelectSubtitle"`
DefaultSubtitleAccessibility *DefaultSubtitleAccessibility `default:"0" json:"defaultSubtitleAccessibility"`
DefaultSubtitleForced *DefaultSubtitleForced `default:"0" json:"defaultSubtitleForced"`
WatchedIndicator *WatchedIndicator `default:"0" json:"watchedIndicator"`
MediaReviewsVisibility *MediaReviewsVisibility `default:"0" json:"mediaReviewsVisibility"`
}
func (u UserProfile) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(u, "", false)
}
func (u *UserProfile) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &u, "", false, false); err != nil {
return err
}
return nil
}
func (o *UserProfile) GetAutoSelectAudio() *bool {
if o == nil {
return nil
}
return o.AutoSelectAudio
}
func (o *UserProfile) GetDefaultAudioLanguage() *string {
if o == nil {
return nil
}
return o.DefaultAudioLanguage
}
func (o *UserProfile) GetDefaultSubtitleLanguage() *string {
if o == nil {
return nil
}
return o.DefaultSubtitleLanguage
}
func (o *UserProfile) GetAutoSelectSubtitle() *AutoSelectSubtitle {
if o == nil {
return nil
}
return o.AutoSelectSubtitle
}
func (o *UserProfile) GetDefaultSubtitleAccessibility() *DefaultSubtitleAccessibility {
if o == nil {
return nil
}
return o.DefaultSubtitleAccessibility
}
func (o *UserProfile) GetDefaultSubtitleForced() *DefaultSubtitleForced {
if o == nil {
return nil
}
return o.DefaultSubtitleForced
}
func (o *UserProfile) GetWatchedIndicator() *WatchedIndicator {
if o == nil {
return nil
}
return o.WatchedIndicator
}
func (o *UserProfile) GetMediaReviewsVisibility() *MediaReviewsVisibility {
if o == nil {
return nil
}
return o.MediaReviewsVisibility
}
type GetTokenDetailsStatus string
const (
GetTokenDetailsStatusOnline GetTokenDetailsStatus = "online"
GetTokenDetailsStatusOffline GetTokenDetailsStatus = "offline"
)
func (e GetTokenDetailsStatus) ToPointer() *GetTokenDetailsStatus {
return &e
}
func (e *GetTokenDetailsStatus) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "online":
fallthrough
case "offline":
*e = GetTokenDetailsStatus(v)
return nil
default:
return fmt.Errorf("invalid value for GetTokenDetailsStatus: %v", v)
}
}
type Services struct {
Identifier string `json:"identifier"`
Endpoint string `json:"endpoint"`
Token *string `json:"token"`
Secret *string `json:"secret"`
Status GetTokenDetailsStatus `json:"status"`
}
func (o *Services) GetIdentifier() string {
if o == nil {
return ""
}
return o.Identifier
}
func (o *Services) GetEndpoint() string {
if o == nil {
return ""
}
return o.Endpoint
}
func (o *Services) GetToken() *string {
if o == nil {
return nil
}
return o.Token
}
func (o *Services) GetSecret() *string {
if o == nil {
return nil
}
return o.Secret
}
func (o *Services) GetStatus() GetTokenDetailsStatus {
if o == nil {
return GetTokenDetailsStatus("")
}
return o.Status
}
type Features string
const (
FeaturesAndroidDolbyVision Features = "Android - Dolby Vision"
FeaturesAndroidPiP Features = "Android - PiP"
FeaturesCuSunset Features = "CU Sunset"
FeaturesHrkEnableEur Features = "HRK_enable_EUR"
FeaturesTrebleShowFeatures Features = "TREBLE-show-features"
FeaturesAdCountdownTimer Features = "ad-countdown-timer"
FeaturesAdaptiveBitrate Features = "adaptive_bitrate"
FeaturesAmazonLoopDebug Features = "amazon-loop-debug"
FeaturesAvodAdAnalysis Features = "avod-ad-analysis"
FeaturesAvodNewMedia Features = "avod-new-media"
FeaturesBlacklistGetSignin Features = "blacklist_get_signin"
FeaturesClientRadioStations Features = "client-radio-stations"
FeaturesCloudflareTurnstileRequired Features = "cloudflare-turnstile-required"
FeaturesCollections Features = "collections"
FeaturesCommentsAndRepliesPushNotifications Features = "comments_and_replies_push_notifications"
FeaturesCommunityAccessPlexTv Features = "community_access_plex_tv"
FeaturesCompanionsSonos Features = "companions_sonos"
FeaturesCustomHomeRemoval Features = "custom-home-removal"
FeaturesDisableHomeUserFriendships Features = "disable_home_user_friendships"
FeaturesDisableSharingFriendships Features = "disable_sharing_friendships"
FeaturesDrmSupport Features = "drm_support"
FeaturesExcludeRestrictions Features = "exclude restrictions"
FeaturesFederatedAuth Features = "federated-auth"
FeaturesFriendRequestPushNotifications Features = "friend_request_push_notifications"
FeaturesGuidedUpgrade Features = "guided-upgrade"
FeaturesHome Features = "home"
FeaturesIncreasePasswordComplexity Features = "increase-password-complexity"
FeaturesIos14PrivacyBanner Features = "ios14-privacy-banner"
FeaturesIterableNotificationTokens Features = "iterable-notification-tokens"
FeaturesKeepPaymentMethod Features = "keep-payment-method"
FeaturesKevinBacon Features = "kevin-bacon"
FeaturesKoreaConsent Features = "korea-consent"
FeaturesLeIsrgRootX1 Features = "le_isrg_root_x1"
FeaturesLetsEncrypt Features = "lets_encrypt"
FeaturesLightningDvrPivot Features = "lightning-dvr-pivot"
FeaturesLiveTvSupportIncompleteSegments Features = "live-tv-support-incomplete-segments"
FeaturesLivetv Features = "livetv"
FeaturesMetadataSearch Features = "metadata_search"
FeaturesNewPlexPassPrices Features = "new_plex_pass_prices"
FeaturesNewsProviderSunsetModal Features = "news-provider-sunset-modal"
FeaturesPhotosFavorites Features = "photos-favorites"
FeaturesPhotosMetadataEdition Features = "photos-metadata-edition"
FeaturesPmsHealth Features = "pms_health"
FeaturesRadio Features = "radio"
FeaturesRateLimitClientToken Features = "rate-limit-client-token"
FeaturesScrobblingServicePlexTv Features = "scrobbling-service-plex-tv"
FeaturesSharedServerNotification Features = "shared_server_notification"
FeaturesSharedSourceNotification Features = "shared_source_notification"
FeaturesSigninWithApple Features = "signin_with_apple"
FeaturesSpringServeAdProvider Features = "spring_serve_ad_provider"
FeaturesTranscoderCache Features = "transcoder_cache"
FeaturesTunerSharing Features = "tuner-sharing"
FeaturesTwoFactorAuthentication Features = "two-factor-authentication"
FeaturesUnsupportedtuners Features = "unsupportedtuners"
FeaturesUpgrade3ds2 Features = "upgrade-3ds2"
FeaturesVodSchema Features = "vod-schema"
FeaturesVodCloudflare Features = "vod_cloudflare"
FeaturesWatchTogetherInvite Features = "watch-together-invite"
FeaturesWebServerDashboard Features = "web_server_dashboard"
)
func (e Features) ToPointer() *Features {
return &e
}
func (e *Features) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "Android - Dolby Vision":
fallthrough
case "Android - PiP":
fallthrough
case "CU Sunset":
fallthrough
case "HRK_enable_EUR":
fallthrough
case "TREBLE-show-features":
fallthrough
case "ad-countdown-timer":
fallthrough
case "adaptive_bitrate":
fallthrough
case "amazon-loop-debug":
fallthrough
case "avod-ad-analysis":
fallthrough
case "avod-new-media":
fallthrough
case "blacklist_get_signin":
fallthrough
case "client-radio-stations":
fallthrough
case "cloudflare-turnstile-required":
fallthrough
case "collections":
fallthrough
case "comments_and_replies_push_notifications":
fallthrough
case "community_access_plex_tv":
fallthrough
case "companions_sonos":
fallthrough
case "custom-home-removal":
fallthrough
case "disable_home_user_friendships":
fallthrough
case "disable_sharing_friendships":
fallthrough
case "drm_support":
fallthrough
case "exclude restrictions":
fallthrough
case "federated-auth":
fallthrough
case "friend_request_push_notifications":
fallthrough
case "guided-upgrade":
fallthrough
case "home":
fallthrough
case "increase-password-complexity":
fallthrough
case "ios14-privacy-banner":
fallthrough
case "iterable-notification-tokens":
fallthrough
case "keep-payment-method":
fallthrough
case "kevin-bacon":
fallthrough
case "korea-consent":
fallthrough
case "le_isrg_root_x1":
fallthrough
case "lets_encrypt":
fallthrough
case "lightning-dvr-pivot":
fallthrough
case "live-tv-support-incomplete-segments":
fallthrough
case "livetv":
fallthrough
case "metadata_search":
fallthrough
case "new_plex_pass_prices":
fallthrough
case "news-provider-sunset-modal":
fallthrough
case "photos-favorites":
fallthrough
case "photos-metadata-edition":
fallthrough
case "pms_health":
fallthrough
case "radio":
fallthrough
case "rate-limit-client-token":
fallthrough
case "scrobbling-service-plex-tv":
fallthrough
case "shared_server_notification":
fallthrough
case "shared_source_notification":
fallthrough
case "signin_with_apple":
fallthrough
case "spring_serve_ad_provider":
fallthrough
case "transcoder_cache":
fallthrough
case "tuner-sharing":
fallthrough
case "two-factor-authentication":
fallthrough
case "unsupportedtuners":
fallthrough
case "upgrade-3ds2":
fallthrough
case "vod-schema":
fallthrough
case "vod_cloudflare":
fallthrough
case "watch-together-invite":
fallthrough
case "web_server_dashboard":
*e = Features(v)
return nil
default:
return fmt.Errorf("invalid value for Features: %v", v)
}
}
// GetTokenDetailsAuthenticationStatus - String representation of subscriptionActive
type GetTokenDetailsAuthenticationStatus string
const (
GetTokenDetailsAuthenticationStatusInactive GetTokenDetailsAuthenticationStatus = "Inactive"
GetTokenDetailsAuthenticationStatusActive GetTokenDetailsAuthenticationStatus = "Active"
)
func (e GetTokenDetailsAuthenticationStatus) ToPointer() *GetTokenDetailsAuthenticationStatus {
return &e
}
func (e *GetTokenDetailsAuthenticationStatus) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "Inactive":
fallthrough
case "Active":
*e = GetTokenDetailsAuthenticationStatus(v)
return nil
default:
return fmt.Errorf("invalid value for GetTokenDetailsAuthenticationStatus: %v", v)
}
}
// Subscription - If the accounts Plex Pass subscription is active
type Subscription struct {
// List of features allowed on your Plex Pass subscription
Features []Features `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 *GetTokenDetailsAuthenticationStatus `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 (o *Subscription) GetFeatures() []Features {
if o == nil {
return nil
}
return o.Features
}
func (o *Subscription) GetActive() *bool {
if o == nil {
return nil
}
return o.Active
}
func (o *Subscription) GetSubscribedAt() *string {
if o == nil {
return nil
}
return o.SubscribedAt
}
func (o *Subscription) GetStatus() *GetTokenDetailsAuthenticationStatus {
if o == nil {
return nil
}
return o.Status
}
func (o *Subscription) GetPaymentService() *string {
if o == nil {
return nil
}
return o.PaymentService
}
func (o *Subscription) GetPlan() *string {
if o == nil {
return nil
}
return o.Plan
}
type GetTokenDetailsFeatures string
const (
GetTokenDetailsFeaturesAndroidDolbyVision GetTokenDetailsFeatures = "Android - Dolby Vision"
GetTokenDetailsFeaturesAndroidPiP GetTokenDetailsFeatures = "Android - PiP"
GetTokenDetailsFeaturesCuSunset GetTokenDetailsFeatures = "CU Sunset"
GetTokenDetailsFeaturesHrkEnableEur GetTokenDetailsFeatures = "HRK_enable_EUR"
GetTokenDetailsFeaturesTrebleShowFeatures GetTokenDetailsFeatures = "TREBLE-show-features"
GetTokenDetailsFeaturesAdCountdownTimer GetTokenDetailsFeatures = "ad-countdown-timer"
GetTokenDetailsFeaturesAdaptiveBitrate GetTokenDetailsFeatures = "adaptive_bitrate"
GetTokenDetailsFeaturesAmazonLoopDebug GetTokenDetailsFeatures = "amazon-loop-debug"
GetTokenDetailsFeaturesAvodAdAnalysis GetTokenDetailsFeatures = "avod-ad-analysis"
GetTokenDetailsFeaturesAvodNewMedia GetTokenDetailsFeatures = "avod-new-media"
GetTokenDetailsFeaturesBlacklistGetSignin GetTokenDetailsFeatures = "blacklist_get_signin"
GetTokenDetailsFeaturesClientRadioStations GetTokenDetailsFeatures = "client-radio-stations"
GetTokenDetailsFeaturesCloudflareTurnstileRequired GetTokenDetailsFeatures = "cloudflare-turnstile-required"
GetTokenDetailsFeaturesCollections GetTokenDetailsFeatures = "collections"
GetTokenDetailsFeaturesCommentsAndRepliesPushNotifications GetTokenDetailsFeatures = "comments_and_replies_push_notifications"
GetTokenDetailsFeaturesCommunityAccessPlexTv GetTokenDetailsFeatures = "community_access_plex_tv"
GetTokenDetailsFeaturesCompanionsSonos GetTokenDetailsFeatures = "companions_sonos"
GetTokenDetailsFeaturesCustomHomeRemoval GetTokenDetailsFeatures = "custom-home-removal"
GetTokenDetailsFeaturesDisableHomeUserFriendships GetTokenDetailsFeatures = "disable_home_user_friendships"
GetTokenDetailsFeaturesDisableSharingFriendships GetTokenDetailsFeatures = "disable_sharing_friendships"
GetTokenDetailsFeaturesDrmSupport GetTokenDetailsFeatures = "drm_support"
GetTokenDetailsFeaturesExcludeRestrictions GetTokenDetailsFeatures = "exclude restrictions"
GetTokenDetailsFeaturesFederatedAuth GetTokenDetailsFeatures = "federated-auth"
GetTokenDetailsFeaturesFriendRequestPushNotifications GetTokenDetailsFeatures = "friend_request_push_notifications"
GetTokenDetailsFeaturesGuidedUpgrade GetTokenDetailsFeatures = "guided-upgrade"
GetTokenDetailsFeaturesHome GetTokenDetailsFeatures = "home"
GetTokenDetailsFeaturesIncreasePasswordComplexity GetTokenDetailsFeatures = "increase-password-complexity"
GetTokenDetailsFeaturesIos14PrivacyBanner GetTokenDetailsFeatures = "ios14-privacy-banner"
GetTokenDetailsFeaturesIterableNotificationTokens GetTokenDetailsFeatures = "iterable-notification-tokens"
GetTokenDetailsFeaturesKeepPaymentMethod GetTokenDetailsFeatures = "keep-payment-method"
GetTokenDetailsFeaturesKevinBacon GetTokenDetailsFeatures = "kevin-bacon"
GetTokenDetailsFeaturesKoreaConsent GetTokenDetailsFeatures = "korea-consent"
GetTokenDetailsFeaturesLeIsrgRootX1 GetTokenDetailsFeatures = "le_isrg_root_x1"
GetTokenDetailsFeaturesLetsEncrypt GetTokenDetailsFeatures = "lets_encrypt"
GetTokenDetailsFeaturesLightningDvrPivot GetTokenDetailsFeatures = "lightning-dvr-pivot"
GetTokenDetailsFeaturesLiveTvSupportIncompleteSegments GetTokenDetailsFeatures = "live-tv-support-incomplete-segments"
GetTokenDetailsFeaturesLivetv GetTokenDetailsFeatures = "livetv"
GetTokenDetailsFeaturesMetadataSearch GetTokenDetailsFeatures = "metadata_search"
GetTokenDetailsFeaturesNewPlexPassPrices GetTokenDetailsFeatures = "new_plex_pass_prices"
GetTokenDetailsFeaturesNewsProviderSunsetModal GetTokenDetailsFeatures = "news-provider-sunset-modal"
GetTokenDetailsFeaturesPhotosFavorites GetTokenDetailsFeatures = "photos-favorites"
GetTokenDetailsFeaturesPhotosMetadataEdition GetTokenDetailsFeatures = "photos-metadata-edition"
GetTokenDetailsFeaturesPmsHealth GetTokenDetailsFeatures = "pms_health"
GetTokenDetailsFeaturesRadio GetTokenDetailsFeatures = "radio"
GetTokenDetailsFeaturesRateLimitClientToken GetTokenDetailsFeatures = "rate-limit-client-token"
GetTokenDetailsFeaturesScrobblingServicePlexTv GetTokenDetailsFeatures = "scrobbling-service-plex-tv"
GetTokenDetailsFeaturesSharedServerNotification GetTokenDetailsFeatures = "shared_server_notification"
GetTokenDetailsFeaturesSharedSourceNotification GetTokenDetailsFeatures = "shared_source_notification"
GetTokenDetailsFeaturesSigninWithApple GetTokenDetailsFeatures = "signin_with_apple"
GetTokenDetailsFeaturesSpringServeAdProvider GetTokenDetailsFeatures = "spring_serve_ad_provider"
GetTokenDetailsFeaturesTranscoderCache GetTokenDetailsFeatures = "transcoder_cache"
GetTokenDetailsFeaturesTunerSharing GetTokenDetailsFeatures = "tuner-sharing"
GetTokenDetailsFeaturesTwoFactorAuthentication GetTokenDetailsFeatures = "two-factor-authentication"
GetTokenDetailsFeaturesUnsupportedtuners GetTokenDetailsFeatures = "unsupportedtuners"
GetTokenDetailsFeaturesUpgrade3ds2 GetTokenDetailsFeatures = "upgrade-3ds2"
GetTokenDetailsFeaturesVodSchema GetTokenDetailsFeatures = "vod-schema"
GetTokenDetailsFeaturesVodCloudflare GetTokenDetailsFeatures = "vod_cloudflare"
GetTokenDetailsFeaturesWatchTogetherInvite GetTokenDetailsFeatures = "watch-together-invite"
GetTokenDetailsFeaturesWebServerDashboard GetTokenDetailsFeatures = "web_server_dashboard"
)
func (e GetTokenDetailsFeatures) ToPointer() *GetTokenDetailsFeatures {
return &e
}
func (e *GetTokenDetailsFeatures) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "Android - Dolby Vision":
fallthrough
case "Android - PiP":
fallthrough
case "CU Sunset":
fallthrough
case "HRK_enable_EUR":
fallthrough
case "TREBLE-show-features":
fallthrough
case "ad-countdown-timer":
fallthrough
case "adaptive_bitrate":
fallthrough
case "amazon-loop-debug":
fallthrough
case "avod-ad-analysis":
fallthrough
case "avod-new-media":
fallthrough
case "blacklist_get_signin":
fallthrough
case "client-radio-stations":
fallthrough
case "cloudflare-turnstile-required":
fallthrough
case "collections":
fallthrough
case "comments_and_replies_push_notifications":
fallthrough
case "community_access_plex_tv":
fallthrough
case "companions_sonos":
fallthrough
case "custom-home-removal":
fallthrough
case "disable_home_user_friendships":
fallthrough
case "disable_sharing_friendships":
fallthrough
case "drm_support":
fallthrough
case "exclude restrictions":
fallthrough
case "federated-auth":
fallthrough
case "friend_request_push_notifications":
fallthrough
case "guided-upgrade":
fallthrough
case "home":
fallthrough
case "increase-password-complexity":
fallthrough
case "ios14-privacy-banner":
fallthrough
case "iterable-notification-tokens":
fallthrough
case "keep-payment-method":
fallthrough
case "kevin-bacon":
fallthrough
case "korea-consent":
fallthrough
case "le_isrg_root_x1":
fallthrough
case "lets_encrypt":
fallthrough
case "lightning-dvr-pivot":
fallthrough
case "live-tv-support-incomplete-segments":
fallthrough
case "livetv":
fallthrough
case "metadata_search":
fallthrough
case "new_plex_pass_prices":
fallthrough
case "news-provider-sunset-modal":
fallthrough
case "photos-favorites":
fallthrough
case "photos-metadata-edition":
fallthrough
case "pms_health":
fallthrough
case "radio":
fallthrough
case "rate-limit-client-token":
fallthrough
case "scrobbling-service-plex-tv":
fallthrough
case "shared_server_notification":
fallthrough
case "shared_source_notification":
fallthrough
case "signin_with_apple":
fallthrough
case "spring_serve_ad_provider":
fallthrough
case "transcoder_cache":
fallthrough
case "tuner-sharing":
fallthrough
case "two-factor-authentication":
fallthrough
case "unsupportedtuners":
fallthrough
case "upgrade-3ds2":
fallthrough
case "vod-schema":
fallthrough
case "vod_cloudflare":
fallthrough
case "watch-together-invite":
fallthrough
case "web_server_dashboard":
*e = GetTokenDetailsFeatures(v)
return nil
default:
return fmt.Errorf("invalid value for GetTokenDetailsFeatures: %v", v)
}
}
// GetTokenDetailsAuthenticationResponseStatus - String representation of subscriptionActive
type GetTokenDetailsAuthenticationResponseStatus string
const (
GetTokenDetailsAuthenticationResponseStatusInactive GetTokenDetailsAuthenticationResponseStatus = "Inactive"
GetTokenDetailsAuthenticationResponseStatusActive GetTokenDetailsAuthenticationResponseStatus = "Active"
)
func (e GetTokenDetailsAuthenticationResponseStatus) ToPointer() *GetTokenDetailsAuthenticationResponseStatus {
return &e
}
func (e *GetTokenDetailsAuthenticationResponseStatus) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "Inactive":
fallthrough
case "Active":
*e = GetTokenDetailsAuthenticationResponseStatus(v)
return nil
default:
return fmt.Errorf("invalid value for GetTokenDetailsAuthenticationResponseStatus: %v", v)
}
}
type GetTokenDetailsSubscription struct {
// List of features allowed on your Plex Pass subscription
Features []GetTokenDetailsFeatures `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 *GetTokenDetailsAuthenticationResponseStatus `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 (o *GetTokenDetailsSubscription) GetFeatures() []GetTokenDetailsFeatures {
if o == nil {
return nil
}
return o.Features
}
func (o *GetTokenDetailsSubscription) GetActive() *bool {
if o == nil {
return nil
}
return o.Active
}
func (o *GetTokenDetailsSubscription) GetSubscribedAt() *string {
if o == nil {
return nil
}
return o.SubscribedAt
}
func (o *GetTokenDetailsSubscription) GetStatus() *GetTokenDetailsAuthenticationResponseStatus {
if o == nil {
return nil
}
return o.Status
}
func (o *GetTokenDetailsSubscription) GetPaymentService() *string {
if o == nil {
return nil
}
return o.PaymentService
}
func (o *GetTokenDetailsSubscription) GetPlan() *string {
if o == nil {
return nil
}
return o.Plan
}
// GetTokenDetailsUserPlexAccount - Logged in user details
type GetTokenDetailsUserPlexAccount struct {
// Unknown
AdsConsent *bool `json:"adsConsent"`
// Unknown
AdsConsentReminderAt *time.Time `json:"adsConsentReminderAt"`
// Unknown
AdsConsentSetAt *time.Time `json:"adsConsentSetAt"`
// 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"`
// 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"`
// 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"`
// The Plex account ID
ID int `json:"id"`
// Unix epoch datetime in seconds
JoinedAt int64 `json:"joinedAt"`
// The account locale
Locale *string `json:"locale"`
// If you are subscribed to the Plex newsletter
MailingListActive *bool `default:"false" json:"mailingListActive"`
// Your current mailing list status
MailingListStatus MailingListStatus `json:"mailingListStatus"`
// The maximum number of accounts allowed in the Plex Home
MaxHomeSize int `json:"maxHomeSize"`
// [Might be removed] The hashed Plex Home PIN
//
// Deprecated field: 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"`
// If the account has a Plex Home PIN enabled
Protected *bool `default:"false" json:"protected"`
// Unix epoch datetime in seconds
RememberExpiresAt int64 `json:"rememberExpiresAt"`
// 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"`
Services []Services `json:"services"`
// If the accounts Plex Pass subscription is active
Subscription Subscription `json:"subscription"`
// Description of the Plex Pass subscription
SubscriptionDescription *string `json:"subscriptionDescription"`
Subscriptions []GetTokenDetailsSubscription `json:"subscriptions"`
// URL of the account thumbnail
Thumb string `json:"thumb"`
// 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"`
}
func (g GetTokenDetailsUserPlexAccount) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetTokenDetailsUserPlexAccount) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetTokenDetailsUserPlexAccount) GetAdsConsent() *bool {
if o == nil {
return nil
}
return o.AdsConsent
}
func (o *GetTokenDetailsUserPlexAccount) GetAdsConsentReminderAt() *time.Time {
if o == nil {
return nil
}
return o.AdsConsentReminderAt
}
func (o *GetTokenDetailsUserPlexAccount) GetAdsConsentSetAt() *time.Time {
if o == nil {
return nil
}
return o.AdsConsentSetAt
}
func (o *GetTokenDetailsUserPlexAccount) GetAnonymous() *bool {
if o == nil {
return nil
}
return o.Anonymous
}
func (o *GetTokenDetailsUserPlexAccount) GetAuthToken() string {
if o == nil {
return ""
}
return o.AuthToken
}
func (o *GetTokenDetailsUserPlexAccount) GetBackupCodesCreated() *bool {
if o == nil {
return nil
}
return o.BackupCodesCreated
}
func (o *GetTokenDetailsUserPlexAccount) GetConfirmed() *bool {
if o == nil {
return nil
}
return o.Confirmed
}
func (o *GetTokenDetailsUserPlexAccount) GetCountry() string {
if o == nil {
return ""
}
return o.Country
}
func (o *GetTokenDetailsUserPlexAccount) GetEmail() string {
if o == nil {
return ""
}
return o.Email
}
func (o *GetTokenDetailsUserPlexAccount) GetEmailOnlyAuth() *bool {
if o == nil {
return nil
}
return o.EmailOnlyAuth
}
func (o *GetTokenDetailsUserPlexAccount) GetExperimentalFeatures() *bool {
if o == nil {
return nil
}
return o.ExperimentalFeatures
}
func (o *GetTokenDetailsUserPlexAccount) GetFriendlyName() string {
if o == nil {
return ""
}
return o.FriendlyName
}
func (o *GetTokenDetailsUserPlexAccount) GetEntitlements() []string {
if o == nil {
return []string{}
}
return o.Entitlements
}
func (o *GetTokenDetailsUserPlexAccount) GetGuest() *bool {
if o == nil {
return nil
}
return o.Guest
}
func (o *GetTokenDetailsUserPlexAccount) GetHasPassword() *bool {
if o == nil {
return nil
}
return o.HasPassword
}
func (o *GetTokenDetailsUserPlexAccount) GetHome() *bool {
if o == nil {
return nil
}
return o.Home
}
func (o *GetTokenDetailsUserPlexAccount) GetHomeAdmin() *bool {
if o == nil {
return nil
}
return o.HomeAdmin
}
func (o *GetTokenDetailsUserPlexAccount) GetHomeSize() int {
if o == nil {
return 0
}
return o.HomeSize
}
func (o *GetTokenDetailsUserPlexAccount) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *GetTokenDetailsUserPlexAccount) GetJoinedAt() int64 {
if o == nil {
return 0
}
return o.JoinedAt
}
func (o *GetTokenDetailsUserPlexAccount) GetLocale() *string {
if o == nil {
return nil
}
return o.Locale
}
func (o *GetTokenDetailsUserPlexAccount) GetMailingListActive() *bool {
if o == nil {
return nil
}
return o.MailingListActive
}
func (o *GetTokenDetailsUserPlexAccount) GetMailingListStatus() MailingListStatus {
if o == nil {
return MailingListStatus("")
}
return o.MailingListStatus
}
func (o *GetTokenDetailsUserPlexAccount) GetMaxHomeSize() int {
if o == nil {
return 0
}
return o.MaxHomeSize
}
func (o *GetTokenDetailsUserPlexAccount) GetPin() *string {
if o == nil {
return nil
}
return o.Pin
}
func (o *GetTokenDetailsUserPlexAccount) GetProfile() UserProfile {
if o == nil {
return UserProfile{}
}
return o.Profile
}
func (o *GetTokenDetailsUserPlexAccount) GetProtected() *bool {
if o == nil {
return nil
}
return o.Protected
}
func (o *GetTokenDetailsUserPlexAccount) GetRememberExpiresAt() int64 {
if o == nil {
return 0
}
return o.RememberExpiresAt
}
func (o *GetTokenDetailsUserPlexAccount) GetRestricted() *bool {
if o == nil {
return nil
}
return o.Restricted
}
func (o *GetTokenDetailsUserPlexAccount) GetRoles() []string {
if o == nil {
return nil
}
return o.Roles
}
func (o *GetTokenDetailsUserPlexAccount) GetScrobbleTypes() string {
if o == nil {
return ""
}
return o.ScrobbleTypes
}
func (o *GetTokenDetailsUserPlexAccount) GetServices() []Services {
if o == nil {
return []Services{}
}
return o.Services
}
func (o *GetTokenDetailsUserPlexAccount) GetSubscription() Subscription {
if o == nil {
return Subscription{}
}
return o.Subscription
}
func (o *GetTokenDetailsUserPlexAccount) GetSubscriptionDescription() *string {
if o == nil {
return nil
}
return o.SubscriptionDescription
}
func (o *GetTokenDetailsUserPlexAccount) GetSubscriptions() []GetTokenDetailsSubscription {
if o == nil {
return []GetTokenDetailsSubscription{}
}
return o.Subscriptions
}
func (o *GetTokenDetailsUserPlexAccount) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
func (o *GetTokenDetailsUserPlexAccount) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *GetTokenDetailsUserPlexAccount) GetTwoFactorEnabled() *bool {
if o == nil {
return nil
}
return o.TwoFactorEnabled
}
func (o *GetTokenDetailsUserPlexAccount) GetUsername() string {
if o == nil {
return ""
}
return o.Username
}
func (o *GetTokenDetailsUserPlexAccount) GetUUID() string {
if o == nil {
return ""
}
return o.UUID
}
type GetTokenDetailsResponse 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
// Logged in user details
UserPlexAccount *GetTokenDetailsUserPlexAccount
}
func (o *GetTokenDetailsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetTokenDetailsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetTokenDetailsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetTokenDetailsResponse) GetUserPlexAccount() *GetTokenDetailsUserPlexAccount {
if o == nil {
return nil
}
return o.UserPlexAccount
}